Last active
August 31, 2019 01:52
-
-
Save manofi21/e1eef8f0cb79cdd3066b82ebe5dde4d9 to your computer and use it in GitHub Desktop.
how to show textformfield in flutter
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'; | |
void main() => runApp(MyApp()); | |
//textfield sebuah widget yang digunakan user untuk memasukkan kalimat | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { | |
TextEditingController controller = TextEditingController(); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("text field"), | |
), | |
body: Column( | |
children: <Widget>[ | |
TextFormField( | |
decoration: InputDecoration( | |
labelText: 'Name *', | |
)) | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment