일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 앱
- Coroutines
- appbar
- viewmodel
- scroll
- intent
- android
- Flutter
- DART
- Kotlin
- 테스트
- textview
- tabbar
- Button
- Dialog
- TEST
- drift
- LifeCycle
- CustomScrollView
- 안드로이드
- livedata
- data
- Navigation
- ScrollView
- textfield
- 계측
- 앱바
- binding
- activity
- Compose
- Today
- Total
목록Flutter (74)
Study Record

✍ video_picker https://pub.dev/packages/video_player video_player | Flutter Package Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. pub.dev 1. 초기 세팅 flutter pub add video_player 터미널에서 위와 같은 명령어를 실행하거나 직접 pubspec.yaml 파일에 video_player: ^2.5.1 을 입력한다. 그런 다음 [Pub get] 버튼을 누르면 초기 세팅이 완료된다. 2. 사용법 비디오를 재생하기 위해서는 VideoPlayerController 와 VideoPlayer()가 필요..

🎁 image_picker https://pub.dev/packages/image_picker#handling-mainactivity-destruction-on-android 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 갤러리에서 파일을 가져오거나 직접 카메라를 이용해 사진, 비디오를 찍어 파일을 쉽게 가져올 수 있다. 😶 초기 세팅 $ flutter pub add image_picker 터미널에 다음과 같이 명령어를 치거나 pubspec.yaml 에 image_picker..

✍ Container 일반적인 그림 그리기, 위치 지정 및 크기 조정을 편리하게 해주는 위젯이다. Container({ Key? key, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, Color? color, Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, EdgeInsetsGeometry? margin, Matrix4? transform, AlignmentGeometry? transformAlignment, Widget? child, Clip clipBehavior = Clip.non..

✍ Gradient Class 2D gradient를 위한 인터페이스로 BoxDecoration에서 LinearGradient, RadialGradient, SweepGradient 를 사용할 수 있게 해 준다. ✍ LinearGradient 선형 그러데이션 효과를 줄 수 있다. 시작점(begin) 과 끝점(end)의 두 개의 포인트가 있는데 시작점은 0.0 에 해당하고 끝점은 1.0 에 해당한다. 리스트로 설정된 colors 들을 참고하여 시작점에서 끝점까지 그라데이션 효과를 준다. 단순하게 Alignment.topLeft 등 숫자가 아닌 위치로 나타내도 된다. LinearGradient({ AlignmentGeometry begin = Alignment.centerLeft, AlignmentGeome..

🎁 Navigator Class Navigator 위젯은 스택 규칙(Last In First Out)에 따라 위젯들을 관리한다. 모바일 앱은 '화면', 혹은 '페이지'라 불리는 전체 화면 요소가 있는데 이걸 Flutter에서는 Route라고 부른다. Navigator는 이 Route 객체를 스택으로 관리한다. 앱에서 우리가 보는 화면은 Route Stack의 최상단에 있는 Route이고 다른 화면으로 전환하는 것은 Route Stack에 전환할 화면의 정보가 담긴 Route를 추가(push) 한 것이다. Route Stack에서 최상단에 있는 Route를 제거하면(pop) 그다음 상위 Route로 전환되면서 이전 화면으로 되돌아간다. HomeScreen → TestScreen → FinalScreen 순..

✍ Button 만들기 Text Button을 만들 수 있는 방법은 여러 가지가 있겠지만 3가지를 소개하자면 TextButton, ElevatedButton, OutlinedButton 이 있다. 이 3개의 위젯 모두 설정할 수 있는 인자들이 같다. 또한 각각 서로의 위젯을 만들 수 있다. (Ex. TextButton으로 ElevatedButton을 만들거나 OutlinedButton으로 ElevatedButton을 만들 수 있다.) 서로가 서로의 위젯을 똑같이 만들 수 있는데 하나의 클래스로 존재하지 않고 따로 존재하는 건 그 쓰임의 용도를 다르게 하기 위해서다. 따라서 사용할 때 각각의 쓰임에 맞는 위젯을 사용하는 것이 좋다. ElevatedButton({ Key? key, required void ..

✍ Slider Widget 사용자가 인디케이터를 움직임으로써 값을 설정할 수 있는 위젯이다. import 'package:flutterd/material.art'; Slider({ Key? key, required double value, required void Function(double)? onChanged, void Function(double)? onChangeStart, void Function(double)? onChangeEnd, double min = 0.0, double max = 1.0, int? divisions, String? label, Color? activeColor, Color? inactiveColor, Color? thumbColor, MouseCursor? mouse..
✍ 난수 생성하기 Dart 에서 난수를 생성하려면 Random() 클래스를 사용한다. import 'dart:math'; void main(){ final random = Random(); } 3가지 타입(bool, double, int)의 난수를 생성할 수 있다. var intValue = Random().nextInt(10); // intValue is >= 0 and = 50 and = 0.0 and < 1.0. doubleValue = Random().nextDouble(..