Created
June 22, 2019 06:24
-
-
Save snova301/f5e6c14aed5214f0bf8802ff52d96f84 to your computer and use it in GitHub Desktop.
MemoApp with 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 'dart:io'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Memo with Flutter', | |
theme: ThemeData( | |
primarySwatch: Colors.blueGrey, | |
), | |
home: TextWidget(title: 'Memo with Flutter'), | |
); | |
} | |
} | |
class TextWidget extends StatefulWidget { | |
TextWidget({Key key, this.title}) : super(key: key); | |
final String title; | |
@override | |
_TextWidgetState createState() => _TextWidgetState(); | |
} | |
class _TextWidgetState extends State<TextWidget>{ | |
@override | |
Widget build(BuildContext context){ | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: ListView( | |
children: <Widget>[ | |
TextField( | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
hintText: 'Write something', | |
), | |
maxLines: null, | |
), | |
], | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment