Display message on language not supported (online)
This commit is contained in:
parent
f3ea3fbcf2
commit
d2e76a37fd
@ -78,13 +78,7 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
|||||||
builder: (context) =>
|
builder: (context) =>
|
||||||
VisitPage(configurationId: configurations[index].id!, isAlreadyAllowed: visitAppContext.isScanBeaconAlreadyAllowed),
|
VisitPage(configurationId: configurations[index].id!, isAlreadyAllowed: visitAppContext.isScanBeaconAlreadyAllowed),
|
||||||
));
|
));
|
||||||
/*Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => VisitPage(configurationId: configurations[index].id!)
|
|
||||||
),
|
|
||||||
);*/
|
|
||||||
/**/
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (configurations[index].isOffline!) {
|
if (configurations[index].isOffline!) {
|
||||||
@ -97,21 +91,25 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Online mode
|
// Online mode
|
||||||
// Update context
|
if(!configurations[index].languages!.contains(visitAppContext.language))
|
||||||
visitAppContext.configuration = configurations[index];
|
{
|
||||||
visitAppContext.sectionIds = configurations[index].sectionIds;
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(TranslationHelper.getFromLocale(
|
||||||
|
"languageNotSupported", appContext.getContext())),
|
||||||
|
backgroundColor: kBlue2),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
visitAppContext.configuration = configurations[index];
|
||||||
|
visitAppContext.sectionIds = configurations[index].sectionIds;
|
||||||
|
|
||||||
/*Navigator.push(
|
appContext.setContext(visitAppContext);
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => VisitPage(configurationId: configurations[index].id!)
|
|
||||||
),
|
|
||||||
);*/
|
|
||||||
|
|
||||||
Navigator.of(context).pushReplacement(MaterialPageRoute(
|
Navigator.of(context).pushReplacement(MaterialPageRoute(
|
||||||
builder: (context) =>
|
builder: (context) =>
|
||||||
VisitPage(configurationId: configurations[index].id!, isAlreadyAllowed: visitAppContext.isScanBeaconAlreadyAllowed),
|
VisitPage(configurationId: configurations[index].id!, isAlreadyAllowed: visitAppContext.isScanBeaconAlreadyAllowed),
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user