Skip to content

Instantly share code, notes, and snippets.

@manofi21
Last active August 31, 2019 01:52
Show Gist options
  • Save manofi21/e1eef8f0cb79cdd3066b82ebe5dde4d9 to your computer and use it in GitHub Desktop.
Save manofi21/e1eef8f0cb79cdd3066b82ebe5dde4d9 to your computer and use it in GitHub Desktop.
how to show textformfield in flutter
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