Sync data message when in Offline Mode
This commit is contained in:
parent
8d78fb6357
commit
d722251d50
3 changed files with 15 additions and 8 deletions
|
|
@ -88,11 +88,17 @@ class _MihHomeState extends State<MihHome> {
|
|||
RefreshIndicator(
|
||||
key: mzansiProfileProvider.refreshIndicatorKey,
|
||||
onRefresh: () async {
|
||||
await mzansiProfileProvider.syncWithMihServerData();
|
||||
bool success =
|
||||
await mzansiProfileProvider.syncWithMihServerData();
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
MihSnackBar(
|
||||
child: Text("Data Synced with MIH Server."),
|
||||
child: Text(
|
||||
success
|
||||
? "Data Synced with MIH Server."
|
||||
: "MIH App operation in Offline Mode",
|
||||
),
|
||||
// backgroundColor: success ? null : MihColors.red(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue