Initial framework in place, non-functional POST & env vars atm
This commit is contained in:
parent
3bc940063a
commit
5c718fc14b
29 changed files with 1263 additions and 170 deletions
54
lib/common/widgets/basic_drawer.dart
Normal file
54
lib/common/widgets/basic_drawer.dart
Normal file
|
@ -0,0 +1,54 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
|
||||
|
||||
class BasicDrawer extends StatefulWidget {
|
||||
@override
|
||||
_BasicDrawerState createState() => _BasicDrawerState();
|
||||
}
|
||||
|
||||
class _BasicDrawerState extends State<BasicDrawer> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Drawer(
|
||||
child: Container(
|
||||
padding: new EdgeInsets.all(32.0),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text(
|
||||
"Submit Receipt",
|
||||
style: TextStyle(color: Colors.black, fontSize: 20.0),
|
||||
),
|
||||
onTap: () {
|
||||
requestLogoutAPI(context);
|
||||
Navigator.of(context).pushNamed('/ReceiptPage');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
"About",
|
||||
style: TextStyle(color: Colors.black, fontSize: 20.0),
|
||||
),
|
||||
onTap: () {
|
||||
SystemChannels.textInput.invokeMethod('TextInput.hide');
|
||||
// Here I have not implemented an actual about screen, but if you did you would navigate to it's route
|
||||
// Navigator.of(context).pushReplacementNamed('/AboutScreen');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
"Logout",
|
||||
style: TextStyle(color: Colors.black, fontSize: 20.0),
|
||||
),
|
||||
onTap: () {
|
||||
requestLogoutAPI(context);
|
||||
Navigator.of(context).pushReplacementNamed('/LoginPage');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in a new issue