일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Navigation
- Compose
- livedata
- data
- 안드로이드
- intent
- textfield
- 계측
- drift
- android
- tabbar
- activity
- binding
- viewmodel
- scroll
- CustomScrollView
- 테스트
- 앱
- Flutter
- Coroutines
- appbar
- 앱바
- ScrollView
- Dialog
- textview
- DART
- TEST
- Button
- LifeCycle
- Kotlin
- Today
- Total
목록Flutter (85)
Study Record

✍ Text Class 단일 스타일의 텍스트를 보여준다. Text( String this.data, { super.key, this.style, this.strutStyle, this.textAlign, this.textDirection, this.locale, this.softWrap, this.overflow, this.textScaleFactor, this.maxLines, this.semanticsLabel, this.textWidthBasis, this.textHeightBehavior, this.selectionColor, }) ※ 인자값 1. 글자 데이터(String this.data) 보여줄 텍스트를 지정한다. 2. 글자 스타일(TextStyle this.style) 텍스트의 스타일을 결정..
✍ DateTime Dart 에서 날짜 계산을 할 때 유용한 class 이다. 현재 날짜 DateTime now = DateTime.now(); print(now);// 2023-01-31 23:40:53.435 print(now.year);// 2023 print(now.month)// 1 print(now.day);// 31 print(now.hour);// 23 print(now.minute);// 40 print(now.second);// 53 print(now.millisecond);//435 특정 날짜 // DateTime() 인자값 DateTime( int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second =..
✍ timer 사용법 import 'dart:async'; import 'package:flutter/services.dart'; Timer timer = Timer.periodic(Duration(milliseconds:1000), (timer) { print("1초마다 한번씩 실행된다."); }); timer?.cancel();

✍ 상태바 글자/아이콘 색상 바꾸기 // 하얀색 SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); // 검은색 SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);

✍ PageView Widget? 페이지별로 설정한 리스트 내용대로 스크롤 가능한 위젯이다. PageController 를 통해 PageVeiw 를 컨트롤할 수 있다. ※ 인자 PageView 의 인자는 다음과 같다. PageView({ super.key, this.scrollDirection = Axis.horizontal, this.reverse = false, PageController? controller, this.physics, this.pageSnapping = true, this.onPageChanged, List children = const [], this.dragStartBehavior = DragStartBehavior.start, this.allowImplicitScrolling ..

✍ 클래스 생성 단축키 stful : StatefulWidget 생성 단축키 stless : StatelessWidget 생성 단축키 ✍ StatelesssWidget 상태를 관리할 수 없는 위젯이다. Constructor 로 생성된 후 바로 build 함수가 실행된다. 변경이 필요하면 새로운 위젯을 만든다. (색 변경 등) 하나의 StatelessWidget은 라이프사이클동안 단 한 번만 build 함수를 실행한다. ※ 생명 주기 아래의 코드와 같이 StatelessWidget 을 상속받으면 StatelessWidget 을 생성할 수 있다. build() 함수의 return 값으로 생성하고자 하는 위젯을 리턴하면 된다. class HomeScreen extends StatelessWidget{ Stri..

✍ pub.dev 사이트에서 WebView 오픈소스 살펴보기 pub.dev 사이트는 Flutter 와 관련된 오픈소스 프로젝트들이 모여있는 공간이다. pub.dev 사이트에서 webView를 검색하면 여러 가지 프로젝트들을 볼 수 있는데 그중 flutter.dev 는 flutter 공식 개발 팀을 의미한다. ✍ WebView_flutter 프로젝트에 적용하기 webview_flutter 프로젝트의 installing 탭에 적용하는 방법이 나와있는데 명령어 "flutter pub add webview_flutter" 를 먼저 실행한다. 그다음 pubspec.yaml 파일에 다음과 같이 webview_flutter: ^x.x.x 와 같이 추가되어 있는지 확인한 다음 [pub get] 버튼을 누른다. (web..

🎁Column Widget 세로를 기준으로 자식 위젯들을 배치할 수 있는 위젯이다. 😶 argments 1. mainAxisAlignment 주축(세로)을 기준으로 어떻게 배치될지 설정하는 인자다. value 설명 MainAxisAlignment.start 시작(위)를 기준으로 배치한다. MainAxisAlignment.end 끝(아래)를 기준으로 배치한다. MainAxisAlignment.center 가운데를 기준으로 배치한다. MainAxisAlignment.spaceBetween 각 위젯 사이의 간격이 동일하게 배치한다. MainAxisAlignment.spaceEvenly 각 위젯 사이의 간격이 동일하게 배치되지만 끝과 끝이 위젯이 아닌 빈 가격으로 시작한다. MainAxisAlignment.sp..