본문 바로가기

안드로이드/Flutter

(30)
flutter toast 사용법 안드로이드에서 사용자에게 정보를 보여주기 위해 잠깐 띄우는 토스트 메세지를 플러터에서도 구현해보도록 하겠습니다. 우선은 https://pub.dev/로 가서 fluttertoast로 검색을 합니다. 그럼 검색 결과로 fluttertoast가 나타나게 됩니다. 선택을 해주시고 installing 을 누릅니다. 그럼 사용방법에 대한 예시가 나타나게됩니다. 설명에 나온대로 따라하면 됩니다. pubspec.yaml 에 dependencies 안에 fluttertoast: ^4.0.1 를 추가해줍니다. 그리고 안드로이드 스튜디오에서 packages get 을 선택해줍니다. 그럼 아래와같이 패키지를 다운받게 됩니다. 다운이 완료되면 이제 사용할 수 있습니다. 이제 사용하는 방법을 알아보겠습니다. 1. 사용하고싶은 ..
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..
github에서 라이브러리를 가져오는 방법 저번에 pub.dev에서 라이브러리를 가져오는 방법을 알아봤다. 오늘은 github에서 라이브러리를 가져오는 방법을 알아보려고 한다. 1. 내가 필요로 하는 라이브러리를 찾는다. 필자는 캘린더 라이브러리가 필요하기에 calendar을 검색했다. 2. clone or download를 눌러서 다운로드를 받는다. 3. 다운받은 파일중 필요한 lib파일을 자신의 프로젝트에 추가한다. 4. pubspec.yaml 파일의 dependencies: 에 table_calendar: ^2.2.3을 추가하고 get pub를 누른다. 5. 다트 코드에 import 'package:table_calendar/table_calendar.dart'; 를 입력한다. 이로써 자신의 프로젝트에 라이브러리를 사용할 수 있게 된다
Flutter - how to use custom Icons If you have a designer or your company has designers, you may need to use customIcons on the app you are building. I can teach you how to use custom Icons in flutter 1. go to https://fluttericon.com/ FlutterIcon - Flutter custom icons generator This site will not work if cookies are completely disabled. {"assets_hash":"a0d3c796513dbfa17549fded5fc6a373","page_data":{},"locale":"en-US","layout":"f..
플러터 비동기 post방식 사용법 인터넷에 get사용법은 많으나 post 사용법이 별로 없어서 포스팅을 하게 되었다. 1. pubspec.yaml에 를 추가한다. 2. 다음을 임포트한다. import 'dart:async'; import 'package:http/http.dart' as http; import 'dart:convert'; 3. 이와 같은 형식으로 사용한다. url에는 각자의 상황에 맞게 설정하면 된다.
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..
Taps, drags, and other gestures This document explains how to listen for, and respond to, gestures in Flutter. Examples of gestures include taps, drags, and scaling. The gesture system in Flutter has two separate layers. The first layer has raw pointer events that describe the location and movement of pointers (for example, touches, mice, and styli) across the screen. The second layer has gestures that describe semantic action..
How to make a right size of Widgets in Flutter Hello friends~ today Im going to tell you how to make a right size of widgets in flutter. flutter provides a logical pixels but I dont fuxxing know how to use it it is not compatible with dpi! My pages are broken so,, This is what Im using now. That is MediaQuery with this code like width: MediaQuery.of(context).size.width height: MediaQuery.of(context).size.height fontSize: MediaQuery.of(contex..