Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- enum
- datetime
- signout
- swift 문법
- setstate
- platformexception
- permission
- Stream
- runTransaction
- divider
- Navigator
- changenotifierprovider
- Snapshot
- Firebase
- changenotifier
- consumer
- provider
- reference
- ListView.builder
- 문법
- borderRadius
- Camera
- multiprovider
- Swift
- user
- snackbar
- globalkey
- transform
- controller
- switch
Archives
- Today
- Total
코딩하는 제리
[Flutter/Project](Instagram Clone) 포스트 작성 레이아웃1 본문
Flutter/Project_InstaClone(완)
[Flutter/Project](Instagram Clone) 포스트 작성 레이아웃1
JerryCho 2021. 2. 17. 15:14소스코드 및 pubspec.yaml
// screens/share_post_screen.dart
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_project_IJ/constants/common_size.dart';
import 'package:flutter_project_IJ/constants/screen_size.dart';
class SharePostScreen extends StatelessWidget {
final File imageFile;
final String postKey;
const SharePostScreen(this.imageFile, {Key key, @required this.postKey})
: super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('New Post'),
actions: [
TextButton(
onPressed: () {},
child: Text(
'Share',
textScaleFactor: 1.4,
style: TextStyle(color: Colors.blue),
),
)
],
),
body: ListView(
children: [
_captionWithImage(),
_divider,
_sectionButton('Tag People'),
_divider,
_sectionButton('Add Location'),
_divider,
],
),
);
}
Divider get _divider => Divider(
color: Colors.grey[300],
height: 1,
thickness: 1,
);
ListTile _sectionButton(String title) {
return ListTile(
title: Text(
title,
style: TextStyle(fontWeight: FontWeight.w400),
),
trailing: Icon(Icons.navigate_next),
dense: true,
/* 작게 만듦. */
contentPadding: EdgeInsets.symmetric(horizontal: common_gap),
);
}
ListTile _captionWithImage() {
return ListTile(
contentPadding: EdgeInsets.symmetric(
vertical: common_gap,
horizontal: common_gap,
),
leading: Image.file(
imageFile,
width: size.width / 6,
height: size.width / 6,
fit: BoxFit.cover,
),
title: TextField(
decoration: InputDecoration(
hintText: 'Wirte a caption...',
border: InputBorder.none,
),
),
);
}
}
'Flutter > Project_InstaClone(완)' 카테고리의 다른 글
[Flutter/Project](Instagram Clone) 포스트 작성 레이아웃3 (0) | 2021.02.23 |
---|---|
[Flutter/Project](Instagram Clone) 포스트 작성 레이아웃2 가로 스크롤 아이콘 (0) | 2021.02.18 |
[Flutter/Project](Instagram Clone) unique post key 생성 (0) | 2021.02.17 |
[Flutter/Project](Instagram Clone) 로그인 시 유저데이터 확인 (0) | 2021.02.17 |
[Flutter/Project](Instagram Clone) Stream 데이터 구독 끊기 (0) | 2021.02.17 |
Comments