fix error screen
parent
8dc0529646
commit
b1ea70b9ab
|
@ -5,8 +5,8 @@ import 'package:unit2/utils/global_context.dart';
|
||||||
import '../../../../theme-data.dart/colors.dart';
|
import '../../../../theme-data.dart/colors.dart';
|
||||||
import '../../../../utils/global.dart';
|
import '../../../../utils/global.dart';
|
||||||
|
|
||||||
Widget getTile(
|
Widget getTile(IconData icondata, String title, String route,
|
||||||
IconData icondata, String title, String route, BuildContext context,UserData userData) {
|
BuildContext context, UserData userData) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
dense: true,
|
dense: true,
|
||||||
leading: Icon(
|
leading: Icon(
|
||||||
|
@ -21,18 +21,24 @@ Widget getTile(
|
||||||
if (title.toLowerCase() == "logout") {
|
if (title.toLowerCase() == "logout") {
|
||||||
confirmAlert(context, () async {
|
confirmAlert(context, () async {
|
||||||
await CREDENTIALS!.clear();
|
await CREDENTIALS!.clear();
|
||||||
|
await OFFLINE!.clear();
|
||||||
await CREDENTIALS!.deleteAll(['username', 'password', 'saved']);
|
await CREDENTIALS!.deleteAll(['username', 'password', 'saved']);
|
||||||
Navigator.pushReplacementNamed (NavigationService.navigatorKey.currentContext!,"/");
|
Navigator.pushReplacementNamed(
|
||||||
|
NavigationService.navigatorKey.currentContext!, "/");
|
||||||
}, "Logout", "Are You sure you want to logout?");
|
}, "Logout", "Are You sure you want to logout?");
|
||||||
}if(title.toLowerCase() == 'profile'){
|
}
|
||||||
ProfileArguments profileArguments = ProfileArguments(token: userData.user!.login!.token!, userID:userData.user!.login!.user!.profileId!);
|
if (title.toLowerCase() == 'profile') {
|
||||||
|
ProfileArguments profileArguments = ProfileArguments(
|
||||||
|
token: userData.user!.login!.token!,
|
||||||
|
userID: userData.user!.login!.user!.profileId!);
|
||||||
Navigator.pushNamed(context, route, arguments: profileArguments);
|
Navigator.pushNamed(context, route, arguments: profileArguments);
|
||||||
}if(title.toLowerCase() == 'basic info'){
|
}
|
||||||
|
if (title.toLowerCase() == 'basic info') {
|
||||||
Navigator.pushNamed(context, '/basic-info');
|
Navigator.pushNamed(context, '/basic-info');
|
||||||
}if(title.toLowerCase() == 'request sos'){
|
}
|
||||||
|
if (title.toLowerCase() == 'request sos') {
|
||||||
Navigator.pushNamed(context, '/sos');
|
Navigator.pushNamed(context, '/sos');
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ class Url {
|
||||||
|
|
||||||
String host() {
|
String host() {
|
||||||
// return '192.168.10.183:3000';
|
// return '192.168.10.183:3000';
|
||||||
// return 'agusandelnorte.gov.ph';
|
return 'agusandelnorte.gov.ph';
|
||||||
return "192.168.10.219:3000";
|
// return "192.168.10.219:3000";
|
||||||
// return "192.168.10.241";
|
// return "192.168.10.241";
|
||||||
// return "192.168.10.221:3004";
|
// return "192.168.10.221:3004";
|
||||||
// return "playweb.agusandelnorte.gov.ph";
|
// return "playweb.agusandelnorte.gov.ph";
|
||||||
|
|
Loading…
Reference in New Issue