app_settings 2.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 98

app_settings #

pub package

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

Getting Started #

Include 'app_settings' from Dart Pub.

dependencies:
  flutter:
    sdk: flutter
  app_settings: 2.0.2

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

import 'package:app_settings/app_settings.dart';

Platform Specifics #

The following setting options available on both iOS and Android: openAppSettings, openWIFISettings, openLocationSettings, openSecuritySettings, openBluetoothSettings, openDataRoamingSettings, openDateSettings, openDisplaySettings, openNotificationSettings, openSoundSettings

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!

All options open the current 'app' settings section if there are settings defined. If no current settings are defined for the app the iPhone Settings Screen will be displayed.

Android #

Each option will open and display the exact corresponding system settings screen: WIFI, Location, or Security, etc.

Using the openAppSettings option will open the current 'app' settings for the running app.

Example #

Example implementation using a raised button 'onPressed' event.

Widget build(BuildContext context) {
    return Row(
        children: <Widget>[
            RaisedButton(
                onPressed: AppSettings.openLocationSettings(),
                child: Text('Open Location Settings'),
            ),
        ],
    );
}

Platform Specifics #

The following setting options available on both iOS and Android: openAppSettings, openWIFISettings, openLocationSettings, openSecuritySettings, openBluetoothSettings, openDataRoamingSettings, openDateSettings, openDisplaySettings, openNotificationSettings, openSoundSettings

iOS #

All three options open the current 'app' settings section if there are settings defined. If no current settings are defined for the app the iPhone Settings Screen will be displayed.

Android #

Each option will open and display the corresponding screen: WIFI, Location, or Security, etc.

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 #

Update AGP, 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 #

Add 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 #

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

1.0.3 #

Adding additional documentation.

example/README.md

app_settings #

pub package

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

Getting Started #

Include 'app_settings' from Dart Pub.

dependencies:
  flutter:
    sdk: flutter
  app_settings: 1.0.6+1

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

import 'package:app_settings/app_settings.dart';

Platform Specifics #

The following setting options available on both iOS and Android: openAppSettings, openWIFISettings, openLocationSettings, openSecuritySettings

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!

All four options open the current 'app' settings section if there are settings defined. If no current settings are defined for the app the iPhone Settings Screen will be displayed.

Android #

Each option will open and display the exact corresponding system settings screen: WIFI, Location, or Security.

Using the openAppSettings option will open the current 'app' settings for the running app.

Example #

Example implementation using a raised button 'onPressed' event.

Widget build(BuildContext context) {
    return Row(
        children: <Widget>[
            RaisedButton(
                onPressed: AppSettings.openLocationSettings(),
                child: Text('Open Location Settings'),
            ),
        ],
    );
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  app_settings: ^2.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:app_settings/app_settings.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
98
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8