Add confirmation when switching to the React app
This commit is contained in:
parent
1e685cb5c4
commit
7252bf81b5
|
|
@ -267,6 +267,10 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: localization!.enableReactApp,
|
tooltip: localization!.enableReactApp,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
confirmCallback(
|
||||||
|
context: context,
|
||||||
|
message: localization.enableReactApp,
|
||||||
|
callback: (_) {
|
||||||
final credentials = state.credentials;
|
final credentials = state.credentials;
|
||||||
final account = state.account
|
final account = state.account
|
||||||
.rebuild((b) => b..setReactAsDefaultAP = true);
|
.rebuild((b) => b..setReactAsDefaultAP = true);
|
||||||
|
|
@ -288,6 +292,7 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||||
store.dispatch(StopSaving());
|
store.dispatch(StopSaving());
|
||||||
showErrorDialog(message: error as String?);
|
showErrorDialog(message: error as String?);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(MdiIcons.react),
|
icon: Icon(MdiIcons.react),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue