Commit fd09a8a9 authored by ouxiang's avatar ouxiang

optimize channel test

parent a664f8e1
...@@ -52,6 +52,11 @@ class _PlatformChannelState extends State<PlatformChannel> { ...@@ -52,6 +52,11 @@ class _PlatformChannelState extends State<PlatformChannel> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Material( return Material(
child: Scaffold(
appBar: AppBar(
title: Text('Channel test'),
),
body: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
...@@ -71,6 +76,8 @@ class _PlatformChannelState extends State<PlatformChannel> { ...@@ -71,6 +76,8 @@ class _PlatformChannelState extends State<PlatformChannel> {
Text(_chargingStatus), Text(_chargingStatus),
], ],
), ),
),
),
); );
} }
} }
...@@ -107,6 +107,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -107,6 +107,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
FlatButton( FlatButton(
child: Text('channel test'), child: Text('channel test'),
color: Colors.green,
onPressed: (){Navigator.pushNamed(context, "/channeltest");}, onPressed: (){Navigator.pushNamed(context, "/channeltest");},
) )
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment