File tree Expand file tree Collapse file tree
lib/pages/settings/entries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:open_authenticator/model/app_unlock/methods/method.dart';
66import 'package:open_authenticator/model/settings/app_unlock_method.dart' ;
77import 'package:open_authenticator/pages/settings/entries/widgets.dart' ;
88import 'package:open_authenticator/utils/local_authentication/local_authentication.dart' ;
9+ import 'package:open_authenticator/utils/result.dart' ;
910
1011/// Allows to configure [enableLocalAuthSettingsEntryProvider] .
1112class EnableLocalAuthSettingsEntryWidget extends CheckboxSettingsEntryWidget <AppUnlockMethodSettingsEntry , String > {
@@ -33,7 +34,10 @@ class EnableLocalAuthSettingsEntryWidget extends CheckboxSettingsEntryWidget<App
3334 @override
3435 Future <void > changeValue (BuildContext context, WidgetRef ref, bool newValue) async {
3536 String newMethod = newValue ? LocalAuthenticationAppUnlockMethod .kMethodId : NoneAppUnlockMethod .kMethodId;
36- ref.read (appUnlockMethodSettingsEntryProvider.notifier).changeValueIfUnlockSucceed (newMethod, context);
37+ Result result = await ref.read (appUnlockMethodSettingsEntryProvider.notifier).changeValueIfUnlockSucceed (newMethod, context);
38+ if (context.mounted && result is ! ResultSuccess ) {
39+ context.handleResult (result);
40+ }
3741 }
3842
3943 @override
You can’t perform that action at this time.
0 commit comments