Last updated:
0 purchases
app settings
app_settings #
A Flutter plugin for opening iOS and Android phone settings from an app.
Installation #
First, add app_settings as a dependency in your pubspec.yaml file.
flutter pub add app_settings
copied to clipboard
Next, import 'app_settings.dart' into your dart code.
import 'package:app_settings/app_settings.dart';
copied to clipboard
iOS #
TIP: If using Objective-C for iOS in your project, you will need to add use_frameworks! to your Runner project podfile in order to use this Swift plugin:
target 'Runner' do
use_frameworks!
copied to clipboard
Usage #
Open the settings of the application using AppSettings.openAppSettings().
By default, AppSettingsType.settings is used as the type, which opens the general application settings.
If the given type is not supported on the current platform, the general settings are opened instead.
Android If asAnotherTask is set to true, the settings page is opened in a different Activity.
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => AppSettings.openAppSettings(type: AppSettingsType.location),
child: const Text('Open Location Settings'),
);
}
copied to clipboard
Android Q Settings Panels #
To open a Settings Panel on Android Q and higher,
call AppSettings.openAppSettingsPanel() with a given type.
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => AppSettings.openAppSettingsPanel(AppSettingsPanelType.volume),
child: const Text('Open Volume Settings Panel'),
);
}
copied to clipboard
Settings panels are not supported on other platforms.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.