class MyGSt extends StatelessWidget
{
@override
Widget build(BuildContext context)
{
// void _gstnHistoryData()
//{
// Navigator.popAndPushNamed(context, "/GstnHistoryData");
// }
try
{
final appTitle = 'My GST Data';
return MaterialApp
(
title: appTitle,
home: Scaffold
(
appBar: AppBar
(
leading: new Image.asset('img/logo.png', fit: BoxFit.cover),
title: Text(appTitle),
actions: <Widget>
[
new IconButton
(
icon: new Icon(Icons.history),
onPressed: ()
{
Navigator.push(context,
new MaterialPageRoute(builder: (context) => new GstnHistoryData()));
},
),
],
),
body: MyData(),
),
routes: <String, WidgetBuilder>
{
"/GstnHistoryData": (BuildContext context) => new GstnHistoryData(),
}
);
}
catch(e)
{
print(e.toString());
}
return null;
}