How to open device setting form flutter app?
2,313
I was using the wrong Setting intent, following is working code:-
AndroidIntent intent = AndroidIntent(
action: 'android.settings.SETTINGS',
);
await intent.launch();
Author by
rahul Kushwaha
Updated on December 18, 2022Comments
-
rahul Kushwaha over 1 year
I want to open the setting when the user taps the button.
I can see the intent
Settings.ACTION_SETTINGS
defined for the setting hereI am using the package
Android_intent
code:
AndroidIntent intent = AndroidIntent( action: 'Settings.ACTION_SETTINGS', ); await intent.launch();
But, I am getting the error:-
E/flutter (14266): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, No Activity found to handle Intent { act=Settings.ACTION_SETTINGS (has extras) }, null)
How to open the setting page form flutter?