app_settings_plus 5.2.0+2 copy "app_settings_plus: ^5.2.0+2" to clipboard
app_settings_plus: ^5.2.0+2 copied to clipboard

A Flutter plugin for opening iOS and Android phone settings from an app.

app_settings_plus #

pub package

A Flutter plugin for opening iOS and Android phone settings from an app.

Features #

  • Supports Swift Package Manager (SPM) for iOS integration.
  • Opens various settings pages (e.g., location, Wi-Fi, etc.) for both Android and iOS.

Installation #

First, add app_settings_plus as a dependency in your pubspec.yaml file.

flutter pub add app_settings_plus

Next, import 'app_settings_plus.dart' into your Dart code.

import 'package:app_settings_plus/app_settings_plus.dart';

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!

If you prefer using Swift Package Manager (SPM), make sure to enable swift support in your project. See also Flutter SPM integration.

  flutter config --enable-swift-package-manager 

Usage #

Open the settings of the application using AppSettingsPlus.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: () => AppSettingsPlus.openAppSettings(type: AppSettingsType.location),
    child: const Text('Open Location Settings'),
  );
}

Android Q Settings Panels #

To open a Settings Panel on Android Q and higher, call AppSettingsPlus.openAppSettingsPanel() with a given type.

Widget build(BuildContext context) {
  return ElevatedButton(
    onPressed: () => AppSettingsPlus.openAppSettingsPanel(AppSettingsPanelType.volume),
    child: const Text('Open Volume Settings Panel'),
  );
}

Settings panels are not supported on other platforms.

2
likes
160
points
6
downloads

Publisher

verified publisherkjxbyz.com

Weekly Downloads

A Flutter plugin for opening iOS and Android phone settings from an app.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_settings_plus