본문 바로가기

flutter

(10)
Flutter Widget Exepended | Row나 Column 안에서 원하는 위젯만 선택해서 제어하고싶을 때! 한 개의 Row 위젯의 children 안에 3개의 위젯이 있다고 해봐요. 그 모양은 와 같습니다. 이중 하나의 위젯만 골라서 와 같이 넓게 퍼뜨려 여유 공간을 채우고 싶다면 어떤 위젯을 사용해야 할까요? Expanded 위젯으로 감싸면 됩니다. 예시를 들어보죠 1 2 3 4 5 6 7 8 9 Row( children: [ MyWidget(), Expanded( child: MyWidget() ), MyWidget(), ], ) cs d 와 같이 가운데에 있는 위젯을 감싸주면 이렇게 가운데 위젯이 넓어집니다. 이렇게 Row, Column 안에서 원하는 위젯을 골라서 제어할 수 있는 위젯입니다. 감사합니다!
flutter Widget AboutDialog (flutter Widget of the week at 5.30) 앱을 판매하기 위해서는 법률 용어를 둘 공간이 필요하다. (법률용어 = 버전 번호, 허가증 같은 것들) 스토어 별로, 자기들이 요구하는 정보를 입력하지 않으면 앱을 출시하지 않는 경우도 있다. 이때 이 정보들을 입력할 공간으로 적합한 위젯이 바로 AboutDialog이다. 사용방법 showAboutDialog() 함수를 호출하여 사용하자. 어디에 호출할지만 결정하면 된다. 사용 방법 (예제 코드) 1 2 3 4 5 6 7 8 9 showAboutDialog( context: context, applicationVersion: '2.0.1', // 버전 번호 applicationIcon: MyAppIcon(), // 애플리케이션 아이콘 applicationLegalese: 'Blah blah.', // 작..
API에 있는 데이터를 한방에 Dart 언어로 변환시켜주는 사이트가 있다!? 오늘은 여러분께 엄청난 사이트를 소개시켜 드리겠습니다 바로 https://javiercbk.github.io/json_to_dart/ JSON to Dart JSON to Dart Paste your JSON in the textarea below, click convert and get your Dart classes for free. Handcrafted by Javier Lecuona Github json_to_dart Code Twitter javiercbk.github.io JSON type의 데이터를 Dart언어로 변환시켜주는 사이트인데요. 한 방에, 자료구조 기능을 수행하는 코드를 생성할 수 있습니다. 우선 Postman을 설치하시죠 설치 url: https://www.postman.com/..
Flutter Bloc패턴, http 통신 http.get 예제 오늘의 주제는 플러터의 프론트앤드, 백앤드 개발을 분리하는 방법인 Bloc패턴에 대해 알려주겠다. 오늘 게시글의 특이사항은, Data Flow를 본인 손으로 종이에 직접 작성하여 주석을 써서 코드의 이해를 도왔다는 점이다. 아래는 그 코드이다. 이 코드는 인터넷 강의인 https://survivalcoding.com/courses/ 오준석의 생존코딩 How to learn mobile development 교육하는 개발자 오준석입니다. 모바일 개발을 더 빨리 배우세요 survivalcoding.com 에 가면 배울 수 있다. 차분한 목소리와 초보도 따라할 수 있는 속도가 인상적인 강의이다. 나도 많이 배우고있다. 참고로 출처도 밝힐 의도임을 알린다. 아래는 main.dart 1 2 3 4 5 6 7 8 ..
Dart - What is < > in dart language? If you build a flutter project on android studio, you will get codes like below in this code, you can see some codes like WTF is the and What do the do?? It is a class named 'State' that contains a class named 'MyHomePage' So, it's a class. and it contains a class. Do you understand? I don't lol If you Ctrl + click State, you can go to here. it measn T is a class, you can use class T in the clas..
flutter dialog width change Hello guys today, Im going to tell you "How to make your dialog's width be full of your device screen!" How? 1. find the file 'dialog.dart' from \flutter\packages\flutter\lib\src\cupertino (this is the location where you installed your flutter) 2. change the line padding: MediaQuery.of(context).viewInsets + const EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0), to padding: MediaQuery.of(c..
flutter share through other apps Hello guys today, Im going to tell you about the function below This function uses the library called 'share' and you can get it in https://pub.dev/packages/share#-readme-tab- after you come here attach dependencies: share: ^0.6.4 at yami file & attach import 'package:share/share.dart'; at your dart file so now, you are ready to use it. Here are my codes below 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15..
Flutter에서 Shared Preferences (캐싱) 사용법 주제 - Flutter에서 Id, Pw를 입력받아서 저장 (캐싱) 하기. - 어플을 종료해도 입력한 값을 기억하고 있는다. 필요한 패키지: shared_preferences 링크: https://pub.dev/packages/shared_preferences shared_preferences | Flutter Package Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android. pub.dev yami 파일에 1 2 dependencies: shared_preferences: ^0.5.3+2 cs 와 같이 의존성 추가를 해주자. -아래는 결..