Last active
August 23, 2019 04:42
-
-
Save junsuk5/670569aab772b3024137653c79e8ed80 to your computer and use it in GitHub Desktop.
사진공유 앱 - 업로드 화면
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class UploadPage extends StatefulWidget { | |
@override | |
_UploadPageState createState() => _UploadPageState(); | |
} | |
class _UploadPageState extends State<UploadPage> { | |
final nameController = TextEditingController(); | |
final descController = TextEditingController(); | |
@override | |
void dispose() { | |
nameController.dispose(); | |
descController.dispose(); | |
super.dispose(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('사진 업로드'), | |
), | |
body: Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Center( | |
child: Stack( | |
children: <Widget>[ | |
ListView( | |
children: <Widget>[ | |
Image.network( | |
'https://miro.medium.com/max/3200/1*73IgUxPfyXUKZAaIXgutrw.png', | |
height: 300, | |
), | |
Text( | |
'업로드할 사진', | |
textAlign: TextAlign.center, | |
), | |
SizedBox( | |
height: 20, | |
), | |
TextField( | |
controller: nameController, | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
labelText: '공유자 이름', | |
), | |
), | |
SizedBox( | |
height: 10, | |
), | |
TextField( | |
maxLines: 3, | |
controller: descController, | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
labelText: '사진 설명', | |
), | |
), | |
RaisedButton( | |
child: Text("업로드"), | |
color: Colors.white, | |
shape: OutlineInputBorder( | |
borderRadius: BorderRadius.all(Radius.circular(10.0)), | |
), | |
onPressed: () {}, | |
), | |
], | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment