Created
February 3, 2016 23:51
-
-
Save collinjackson/3495326873871035d3e4 to your computer and use it in GitHub Desktop.
Reduced test case of input being covered by keyboard
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( | |
new MaterialApp( | |
title: "Input Demo", | |
routes: <String, RouteBuilder>{ | |
'/': (RouteArguments args) => new FlutterDemo() | |
} | |
) | |
); | |
} | |
class FlutterDemo extends StatefulComponent { | |
@override | |
State createState() => new FlutterDemoState(); | |
} | |
class FlutterDemoState extends State { | |
GlobalKey _inputKey = new GlobalKey(); | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
toolBar: new ToolBar( | |
center: new Text("Input Demo") | |
), | |
body: new Material( | |
child: new Center( | |
child: new Column( | |
children: <Widget>[ | |
new Flexible( | |
child: new Container( | |
decoration: const BoxDecoration( | |
backgroundColor: const Color(0xFF00FF00) | |
) | |
) | |
), | |
new Input( | |
key: _inputKey | |
) | |
] | |
) | |
) | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment