목록[Flutter] (37)
민프
Flutter SDK 다운로드 https://docs.flutter.dev/get-started/install Install Install Flutter and get started. Downloads available for Windows, macOS, Linux, and ChromeOS operating systems. docs.flutter.dev 위 링크를 따라 들어가서 아래 사진과 같이 macOS를 클릭하고 Apple Sillcon .zip파일을 다운받는다. .zip을 받고 나면 문서에 나온 커맨드 대로 내가 원하는 경로에 이동 후 unzip을 해준 후에 PATH 변수를 설정해주면 된다. 위 와 같이 설정하게 되면 현재 터미널 창에서만 PATH 변수가 설정 되는 것 이므로 영구적으로 PATH 설..
POST http.Response response = await http.post( url, headers: { 'Content-Type': 'application/json', }, body: text, ); GET을 할때 body에 데이터를 넣어야할때에도 있는데 이때에는 url에 아래와 같이 쿼리파라미터로 넣어줘야 한다. final newURI = uri.replace(queryParameters: params); or final newURI = Uri.http('www.example.com', '/path', queryParameters); http.Response response = await http.get( newURI, headers: { 'Content-Type': 'application/j..
Flutter에서 기본으로 제공해주는 Switch는 안드로이드 스타일 https://api.flutter.dev/flutter/material/Switch-class.html Switch class - material library - Dart API A Material Design switch. Used to toggle the on/off state of a single setting. The switch itself does not maintain any state. Instead, when the state of the switch changes, the widget calls the onChanged callback. Most widgets that use a switch will listen ..
Flutter Button에 사용되는 Ripple 효과를 없애보자 ElevatedButton( onPressed: onPressed, style: ElevatedButton.styleFrom( splashFactory: NoSplash.splashFactory, ), child: child, );
https://pub.dev/packages/image_picker image_picker | Flutter Package Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera. pub.dev 먼저 pubspec.yaml에 아래와 같이 넣어보자 dependencies: image_picker: ^0.8.6 다음으로 ios > Runner > info.plist에 들어가 다음 코드를 작성한다. 아래 코드는 최초 카메라 접근 시 이용동의 알림창에 나오는 글들을 의미한다. NSCameraUsageDescription Used to demonstrate ima..
Uri.parse를 이용한다. final String url = "https://jsonplaceholder.typicode.com/photos?albumId=$albumId"; var uri = Uri.parse(url);
https://api.flutter.dev/flutter/widgets/State/dispose.html dispose method - State class - widgets library - Dart API void dispose() Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again. After the framework calls dispose, the State object is considered unmounted and the mounted property api.flutter.dev Flutter ..