Skip to content

Instantly share code, notes, and snippets.

@snova301
Created June 22, 2019 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snova301/f5e6c14aed5214f0bf8802ff52d96f84 to your computer and use it in GitHub Desktop.
Save snova301/f5e6c14aed5214f0bf8802ff52d96f84 to your computer and use it in GitHub Desktop.
MemoApp with Flutter
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