Install app_settings via pub
masterAdd app_settings to your Flutter project by running the following command in your terminal. This will add the package as a dependency in your pubspec.yaml file.
flutter pub add app_settingsrepository·master·Indexed 19 days ago
https://github.com/spencerccf/app_settingsA Flutter plugin that allows developers to programmatically open system settings pages, such as Wi-Fi, Location, or Volume, on iOS and Android. It provides the openAppSettings() method for general settings and openAppSettingsPanel() for Android Q (API 29) and higher settings panels.
Add app_settings to your Flutter project by running the following command in your terminal. This will add the package as a dependency in your pubspec.yaml file.
flutter pub add app_settingsDepending on your iOS integration method, you may need to perform additional configuration:
If your iOS project uses Objective-C, you must add use_frameworks! to your Runner project podfile to support this Swift-based plugin:
target 'Runner' do
use_frameworks!
endIf you prefer using Swift Package Manager, ensure Swift support is enabled in your Flutter configuration:
flutter config --enable-swift-package-managerTo change the images used for the iOS launch screen, you can either replace the image files directly in the example/ios/Runner/Assets.xcassets/LaunchImage.imageset/ directory or use Xcode for a more visual approach.
Using Xcode:
open ios/Runner.xcworkspace.Runner/Assets.xcassets.open ios/Runner.xcworkspaceUse AppSettings.openAppSettings() to navigate the user to specific system settings pages.
AppSettingsType.settings, which opens the general application settings.AppSettingsType is not supported on the current platform, the plugin will open the general settings instead.asAnotherTask: true to open the settings page in a different Activity.Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => AppSettings.openAppSettings(type: AppSettingsType.location),
child: const Text('Open Location Settings'),
);
}On Android Q (API level 29) and higher, you can open specific Settings Panels using AppSettings.openAppSettingsPanel().
Note: Settings panels are only supported on Android; calling this on other platforms will not function as intended for panels.
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => AppSettings.openAppSettingsPanel(AppSettingsPanelType.volume),
child: const Text('Open Volume Settings Panel'),
);
}Use AppSettings.openAppSettingsPanel(type) to open a specific application settings panel.
Platform Support:
import 'package:app_settings/app_settings.dart;
// Open a specific settings panel (e.g., Notifications)
await AppSettings.openAppSettingsPanel(AppSettingsPanelType.notifications);Use AppSettings.openAppSettings() to navigate the user to the application's settings screen.
type: Specifies a particular settings panel if supported by the platform. Defaults to AppSettingsType.settings.asAnotherTask: A boolean available on Android. If set to true, the settings screen opens as a separate task in the recent apps list.import 'package:app_settings/app_settings.dart';
// Open general app settings
await AppSettings.openAppSettings();
// Open specific settings as a separate task on Android
await AppSettings.openAppSettings({
'type': AppSettingsType.settings,
'asAnotherTask': true,
});