일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
31 |
- Navigator
- Firebase
- reference
- multiprovider
- snackbar
- Snapshot
- Swift
- changenotifier
- consumer
- divider
- Camera
- controller
- 문법
- ListView.builder
- Stream
- borderRadius
- provider
- setstate
- enum
- transform
- runTransaction
- permission
- datetime
- changenotifierprovider
- swift 문법
- user
- signout
- globalkey
- platformexception
- switch
- Today
- Total
목록Flutter (103)
코딩하는 제리

소스코드 // post.dart import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_project_IJ/constants/common_size.dart'; import 'my_progress_indicator.dart'; class Post extends StatelessWidget { // final : 한번 데이터가 저장되면 바뀌지 않음. final int index; Size size; Post( this.index, { Key key, }) : super(key: key); @override Widget build(Bui..

소스코드 // my_progress_indicator.dart import 'package:flutter/material.dart'; class MyProgressIndicator extends StatelessWidget { final double containerSize; final double progressSize; const MyProgressIndicator( {Key key, this.containerSize, this.progressSize = 60}) : super(key: key); @override Widget build(BuildContext context) { return Container( // width, height가 같아야 정사각형 위젯을 만듦 // size.width 해당..

소스코드 // post.dart import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; class Post extends StatelessWidget { // final : 한번 데이터가 저장되면 바뀌지 않음. final int index; Size size; Post( this.index, { Key key, }) : super(key: key); @override Widget build(BuildContext context) { // 해당 디바이스의 화면 사이즈를 가져옴 if (size == null) size = MediaQuery.of(context).size; re..

fit: BoxFit.??? fill : 가로, 세로 비율 상관 없이 이미지를 늘려서(줄여서)박스를 꽉 채움 contain : 가로, 세로 비율을 유지하면서 박스 사이즈에 맞게 가능한 크게 cover : 박스 사이즈에 맞게 이미지를 자르더라도 꽉 채움 fitWidth : 박스의 가로 사이즈에만 맞게 채움. 세로가 좁으면 이미지를 자름 fitHeight : 박스의 세로 사이즈에만 맞게 채움. 가로가 좁으면 이미지를 자름 none : 이미지의 원본을 유지함. 기본적으로 가운데 정렬. 이미지 사이즈보다 박스가 작으면 이미지를 잘라냄 scaleDown : 이미지 원본 크기를 유지하지만 박스의 크기가 작아지면 사이즈를 줄임. none+contain 소스코드 및 pubspec.yaml dependencies: ca..

appBar: CupertinoNavigationBar() appBar: AppBar 대신 appBar: CupertinoNavigationBar() 를 적용하는 이유는 기본적으로 MaterialApp은 안드로이드 디바이스에 실행했을 때 appbar의 타이틀이 좌측으로 정렬되며 아이폰은 중앙으로 정렬된다. 똑같은 앱바를 적용하기위해 사용한다. mainAxisSize: MainAxisSize.min 의 사용 Row() 디폴트로 그 자리를 전부 차지하게 되어있다. Row()의 사이즈를 최소한으로 하기위해 사용. 소스코드 및 pubspec.yaml // feed_screen.dart import 'package:flutter/cupertino.dart'; import 'package:flutter/materi..

ListView.builder()는 itemBuilder: 를 필수로 한다. itemBuilder: 는 Widget function명(BuildContext context, int index); 를 필요로 한다. Widget feedListBuilder(BuildContext context, int index) { return Container( // itemCount 갯수만큼 index에 0부터 하나씩 넣어 accents 리스트의 색상을 가져옴 color: Colors.accents[index % Colors.accents.length], height: 100, ); }