Skip to content

Instantly share code, notes, and snippets.

@collinjackson
Created February 3, 2016 23:51
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 collinjackson/3495326873871035d3e4 to your computer and use it in GitHub Desktop.
Save collinjackson/3495326873871035d3e4 to your computer and use it in GitHub Desktop.
Reduced test case of input being covered by keyboard
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