system_settings 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new73

system_settings #

Flutter plugin to open system and app settings from an iOS and Android app.

On Android, this plugin supports various system setting pages as well as the app info and app notification settings page.

On iOS, this plugin will always open the app settings page, if any settings have been defined via a SettingsBundle. If not, the settings app will open with the home page. Unfortunately, this is the only way that complies with Apple's guidelines for the App Store.

Getting Started #

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

dependencies:
  system_settings: 1.0.0

Next, import the package into your dart code:

import 'package:system_settings/system_settings.dart';

Example #

Example which opens the app settings:

Widget build(BuildContext context) {
    return RaisedButton(
        onPressed: SystemSettings.app,
        child: Text('Open app settings'),
    );
}

1.0.0 #

Initial release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:system_settings/system_settings.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ListView(
            padding: EdgeInsets.all(20.0),
            children: <Widget>[
              RaisedButton(
                child: Text('App info'),
                onPressed: () => SystemSettings.app(),
              ),
              RaisedButton(
                child: Text('App notifications'),
                onPressed: () => SystemSettings.appNotifications(),
              ),
              RaisedButton(
                child: Text('Settings'),
                onPressed: () => SystemSettings.system(),
              ),
              RaisedButton(
                child: Text('Location'),
                onPressed: () => SystemSettings.location(),
              ),
              RaisedButton(
                child: Text('Wi-Fi'),
                onPressed: () => SystemSettings.wifi(),
              ),
              RaisedButton(
                child: Text('Bluetooth'),
                onPressed: () => SystemSettings.bluetooth(),
              ),
              RaisedButton(
                child: Text('Security'),
                onPressed: () => SystemSettings.security(),
              ),
              RaisedButton(
                child: Text('Display'),
                onPressed: () => SystemSettings.display(),
              ),
              RaisedButton(
                child: Text('Date & time'),
                onPressed: () => SystemSettings.date(),
              ),
              RaisedButton(
                child: Text('Sound'),
                onPressed: () => SystemSettings.sound(),
              ),
              RaisedButton(
                child: Text('Apps'),
                onPressed: () => SystemSettings.apps(),
              ),
              RaisedButton(
                child: Text('Network & internet'),
                onPressed: () => SystemSettings.wireless(),
              ),
              RaisedButton(
                child: Text('Device info'),
                onPressed: () => SystemSettings.deviceInfo(),
              ),
              RaisedButton(
                child: Text('Data usage'),
                onPressed: () => SystemSettings.dataUsage(),
              ),
              RaisedButton(
                child: Text('Data roaming'),
                onPressed: () => SystemSettings.dataRoaming(),
              ),
              RaisedButton(
                child: Text('Locale'),
                onPressed: () => SystemSettings.locale(),
              ),
              RaisedButton(
                child: Text('Default apps'),
                onPressed: () => SystemSettings.defaultApps(),
              ),
              RaisedButton(
                child: Text('Airplane/offline mode'),
                onPressed: () => SystemSettings.airplaneMode(),
              ),
              RaisedButton(
                child: Text('Privacy'),
                onPressed: () => SystemSettings.privacy(),
              ),
              RaisedButton(
                child: Text('Accessibility'),
                onPressed: () => SystemSettings.accessibility(),
              ),
              RaisedButton(
                child: Text('Internal storage'),
                onPressed: () => SystemSettings.internalStorage(),
              ),
              RaisedButton(
                child: Text('Notification policy / DND'),
                onPressed: () => SystemSettings.notificationPolicy(),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  system_settings: ^1.0.0

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:system_settings/system_settings.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health issues and suggestions

Document public APIs. (-1 points)

25 out of 25 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8