|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
|
|
|
@ -16,6 +17,7 @@ import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../config/size_config.dart';
|
|
|
|
|
import '../../locator.dart';
|
|
|
|
|
import 'drawer_item_widget.dart';
|
|
|
|
|
|
|
|
|
|
class AppDrawer extends StatefulWidget {
|
|
|
|
|
@ -34,6 +36,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
var sharedPref = new AppSharedPreferences();
|
|
|
|
|
var familyFileProvider = FamilyFilesProvider();
|
|
|
|
|
AuthenticatedUser user;
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -329,10 +332,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
logout() async {
|
|
|
|
|
// this.sharedPref.remove(USER_PROFILE);
|
|
|
|
|
// this.sharedPref.remove(IMEI_USER_DATA);
|
|
|
|
|
// this.sharedPref.remove(TOKEN);
|
|
|
|
|
// this.sharedPref.remove(LOGIN_TOKEN_ID);
|
|
|
|
|
authenticatedUserObject.logout();
|
|
|
|
|
await sharedPref.clear();
|
|
|
|
|
|
|
|
|
|
this.user = null;
|
|
|
|
|
|