app_settings

v9.0.1

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

Package archive: https://pubdev.letsnova.ru/api/archives/app_settings/9.0.1.tar.gz

Installdart pub add app_settings

Readme

app_settings

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.
  • Optional on-device AI settings proposals via app_settings_ai.

Installation

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

flutter pub add app_settings
                

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

import 'package:app_settings/app_settings.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 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'),
                  );
                }
                

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'),
                  );
                }
                

Settings panels are not supported on other platforms.

On-device AI settings proposals

app_settings_ai is a companion package that turns a natural-language complaint — "I'm not getting message alerts" — into a ranked list of settings screens to open, then opens them through this plugin. Inference runs entirely on the device: Apple Foundation Models on iOS 26+ and the ML Kit GenAI Prompt API (Gemini Nano) on supported Android devices.

It is a separate package so that app_settings stays dependency-free — apps that only need to open a settings screen don't pay for an on-device model runtime or a raised SDK floor.

Changelog

9.0.1

  • Documentation only. Link the new app_settings_ai companion package, which adds optional on-device AI settings proposals (Apple Foundation Models on iOS 26+, ML Kit GenAI / Gemini Nano on Android) and opens the proposed screens through this plugin. It is a separate package so app_settings stays dependency-free - #292, #293
  • No code, API or dependency changes.

9.0.0

  • BREAKING: raise SwiftPM iOS platform minimum to 13.0- #284

8.0.3

  • android/build.gradle now reads the actual android.builtInKotlin Gradle property (inherited from the consuming app's root project) instead of guessing from the AGP major version alone. kotlin-android is only skipped for consumers who have genuinely opted into AGP's built-in Kotlin support; it's still applied (avoiding the 8.0.1 bug) for the default android.builtInKotlin=false. Verified both branches against a real AGP 9.0.1 project: with the default false, the plugin builds correctly; with true, skipping kotlin-android avoids the 'org.jetbrains.kotlin.android' plugin is no longer required for Kotlin support since AGP 9.0 failure that other still-unmigrated plugins in the same build hit.

8.0.2

  • fix: android/build.gradle now sets compileSdk = 36 / minSdk = 16 (property-assignment syntax) instead of the deprecated compileSdkVersion 36 / minSdkVersion 16 method-call syntax, since the latter is unavailable under AGP 9's "new DSL" mode. Property assignment has worked since AGP 7.0, so this is backward-compatible with AGP 7.x/8.x too. Adapted from a suggestion at qeepcologne/app_settings@agp9-new-dsl.

8.0.1

  • fix: android/build.gradle no longer conditionally skips applying the kotlin-android plugin on AGP 9+. That guard broke every consuming app on AGP 9 with the (default) android.builtInKotlin=false, producing error: cannot find symbol / class AppSettingsPlugin in the generated plugin registrant at build time. Root cause: Flutter's own Gradle tooling (FlutterPluginUtils.detectApplyingKotlinGradlePlugin) decides whether to auto-apply kotlin-android for a plugin subproject by regex-matching the literal apply plugin: 'kotlin-android' text in that subproject's build.gradle — it does not evaluate Groovy conditionals. So even though our runtime guard (if (!isAgp9OrAbove) { ... }) skipped applying the plugin on AGP 9, Flutter's static text-based detection still saw the line and assumed KGP was already handled, so it didn't apply it either. Net effect: nothing ever compiled this module's Kotlin source on AGP 9. Verified against a real AGP 9.0.1 / Gradle 9.1.0 project. See #270 for the original guard.

8.0.0

  • BREAKING: Drop CocoaPods support for iOS and macOS. Consuming apps must build with Swift Package Manager (supported by Flutter 3.24+); remove ios/app_settings.podspec and macos/app_settings.podspec.
  • fix: macOS plugin now ships its real implementation (AppSettingsPlugin.swift, AppSettingsEnums.swift) through the Swift Package Manager Sources layout instead of the old Classes/ CocoaPods-only source set.
  • fix: bundle PrivacyInfo.xcprivacy correctly for both iOS and macOS SPM targets (the iOS Package.swift previously pointed at a resource path Xcode rejected as "unhandled").
  • Add an explicit FlutterFramework package dependency to both Package.swift files, per Flutter's current Swift Package Manager plugin-authoring guidance.
  • Example app: remove Podfile/Podfile.lock/Pods/ for iOS and macOS; Xcode projects now resolve plugins via Swift Package Manager only.
  • Remove dead, non-functional getPlatformVersion() leftover from the original plugin template (lib/app_settings_method_channel.dart, lib/src/app_settings.dart) — it was never implemented on any platform and always threw MissingPluginException.
  • Rewrite unit tests (test/app_settings_test.dart, test/app_settings_method_channel_test.dart) to exercise real openAppSettings/openAppSettingsPanel behavior instead of stale, throwing mocks.
  • Example app: only show the "openAppSettingsPanel() options" section on Android, since settings panels are an Android Q+ feature.
  • Update Android Gradle Plugin (8.7.3 -> 8.11.1), Kotlin (2.1.0 -> 2.2.20), and the Gradle wrapper (8.12 -> 8.14) in the example app to clear Flutter's outdated-toolchain warnings; align the plugin's own android/build.gradle kotlin_version/gradle_version to match.

7.0.0

  • fix: add preconcurrency annotation in swift api
  • fix: no rule to process file (xcprivacy) #240
  • fix: Upgrade Gradle and Kotlin versions #231
  • Feature/upgrade android compile version to 35
  • open notification screen on iOS 15.4-16.0
  • fix: privacyInfo for SPM
  • Update build.gradle

6.1.1

  • Users can request permission to install apps

6.1.0

  • Added openAppSettings() to access platform specific 'camera' settings (Only MacOS) .

6.0.0

  • Fİx for AppSettingsPlugin.swift:5:43, Attribute can only be applied to declarations, not types issue #232
  • Upgraded gradle from 7.5 to 8.2

5.2.0

  • Add Swift Package Manager support.

5.1.1

  • Fixed a build issue on iOS for the example app.

5.1.0

Add AppSettingsType.appLocale to open the app language settings (only available on Android 13 and higher).

5.0.0

  • BREAKING CHANGES

    • The openAppSettings() method now accepts a single settings type. This replaces the various individual methods.
    • The callback argument has been removed. Instead, await openAppSettings().
    • Flutter 3.7 is now required.
  • Updated the plugin to the new plugin template, using the platform interface.

  • Fixed a typo in the application identifier.

  • Bumped the Android SDK version to 33

  • Added the namespace property to the build.gradle for compatibility with Gradle 8

  • Added support for notification settings on iOS 16

  • Added support for Android Q Settings Panels

  • Relaxes the Android Bluetooth settings (Settings.ACTION_BLUETOOTH_SETTINGS) requirement. The Bluetooth permission is no longer required.

4.2.1

  • Fixed the async result from openAppSettings() returning after the app settings have been processed on the native side.

4.2.0

  • Added the ability to provide an optional custom callback function to openAppSettings().

4.1.9

  • Added the ability to open APN settings.

4.1.8

  • Increase the Dart SDK upper bound to <3.0.0

4.1.7

  • Added support for Flutter <=3.0.1.

4.1.6

  • Added the ability to open personal hotspot settings.
  • Added the ability to open custom intents.

4.1.5

  • Added the ability to open the developer settings. This requires enabling the developer settings to work correctly

4.1.4

  • Migrate from jcenter() to mavenCentral()

4.1.3

  • Added Android Open Lock & Password settings.

4.1.2

  • Updated Android compileSdkVersion to 31.

4.1.1

  • Added the ability to open VPN settings.
  • Added the ability to open the device settings.

4.1.0

  • Added null-safety support.
  • Added the ability to open settings as a new task on Android.

4.0.4

  • Updated the plugin to support Android embedding v2 in Flutter 1.12.

4.0.3

  • Fixed a bug in openNotificationSettings for Android.

4.0.2

  • Added in NFC settings access for Android. iOS will still rely on App Settings.

4.0.1+1

  • Updated Android compileSdkVersion to 30.

4.0.1

  • Added Battery Optimization settings access for Android. iOS will still rely on App Settings.

4.0.0

  • Updated Gradle wrapper distribution from 4.6 -> 6.2.2
  • Updated Kotlin plugin version from 1.3.50 -> 1.3.70
  • Updated Android Gradle plugin from 3.5.1 -> 3.6.1
  • Updated compileSdkVersion from 28 -> 'android-R'
  • Removed generated and non-essential files
  • Updated .gitignore
  • Fixed the example app, which was not working correctly.

3.0.1

  • Added Internal Storage settings access for Android. iOS will still rely on App Settings.

3.0.0+1

  • Updated plugin version in .podspec.

3.0.0

  • Upgraded to Swift version: 5.0.1 - This version will only work on projects running Swift 5.0.1

2.0.2

  • Legacy Swift 4 support.

2.0.2

  • Added Date, Display, Notification, and Sound settings access for Android. iOS will still rely on App Settings.

2.0.1+1

  • Added Bluetooth & Data Roaming settings access for Android (more to come). iOS will still rely on App Settings.

2.0.0

  • Updated AGP and migrate to AndroidX.

1.0.6+2

  • Added missing podspec description.

1.0.6+1

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!
                

1.0.6

  • Added openAppSettings() to access platform specific 'app' settings menu.

1.0.5

  • Ensure the plugin stays compatible with iOS8+.
  • Declare Swift compatibility version 4.2.

1.0.4

  • Upgraded Kotlin version from: ext.kotlin_version = '1.2.71' to ext.kotlin_version = '1.3.20'

1.0.3

  • Added additional documentation.