fix error screen

feature/passo/PASSO-#1-Sync-data-from-device-to-postgre-and-vice-versa
unknown 2023-10-08 20:12:49 +08:00
parent 8dc0529646
commit b1ea70b9ab
2 changed files with 23 additions and 17 deletions

View File

@ -5,8 +5,8 @@ import 'package:unit2/utils/global_context.dart';
import '../../../../theme-data.dart/colors.dart';
import '../../../../utils/global.dart';
Widget getTile(
IconData icondata, String title, String route, BuildContext context,UserData userData) {
Widget getTile(IconData icondata, String title, String route,
BuildContext context, UserData userData) {
return ListTile(
dense: true,
leading: Icon(
@ -21,18 +21,24 @@ Widget getTile(
if (title.toLowerCase() == "logout") {
confirmAlert(context, () async {
await CREDENTIALS!.clear();
await OFFLINE!.clear();
await CREDENTIALS!.deleteAll(['username', 'password', 'saved']);
Navigator.pushReplacementNamed (NavigationService.navigatorKey.currentContext!,"/");
Navigator.pushReplacementNamed(
NavigationService.navigatorKey.currentContext!, "/");
}, "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);
}if(title.toLowerCase() == 'basic info'){
}
if (title.toLowerCase() == 'basic info') {
Navigator.pushNamed(context, '/basic-info');
}if(title.toLowerCase() == 'request sos'){
}
if (title.toLowerCase() == 'request sos') {
Navigator.pushNamed(context, '/sos');
}
},
);
}

View File

@ -5,8 +5,8 @@ class Url {
String host() {
// return '192.168.10.183:3000';
// return 'agusandelnorte.gov.ph';
return "192.168.10.219:3000";
return 'agusandelnorte.gov.ph';
// return "192.168.10.219:3000";
// return "192.168.10.241";
// return "192.168.10.221:3004";
// return "playweb.agusandelnorte.gov.ph";