About screen slightly updated, all transaction options can now be implemented (interface with API is now more complete)
This commit is contained in:
parent
1b98ed6ca0
commit
ac4b122d07
6 changed files with 65 additions and 42 deletions
7
lib/common/functions/logout.dart
Normal file
7
lib/common/functions/logout.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
|
||||
|
||||
logout(context) {
|
||||
requestLogoutAPI(context);
|
||||
Navigator.of(context).pushReplacementNamed('/LoginPage');
|
||||
}
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
|
||||
import 'package:local_spend/common/functions/get_token.dart';
|
||||
import 'package:local_spend/common/functions/logout.dart';
|
||||
// debug
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
|
@ -57,8 +58,7 @@ class _BasicDrawerState extends State<BasicDrawer> {
|
|||
style: TextStyle(color: Colors.black, fontSize: 20.0),
|
||||
),
|
||||
onTap: () {
|
||||
requestLogoutAPI(context);
|
||||
Navigator.of(context).pushReplacementNamed('/LoginPage');
|
||||
logout(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
Reference in a new issue