caztial / system_setting

Flutter plugin for jumping to system settings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

system_setting

pub package

A Flutter plugin for jumping to system settings.

For Android, this plugin currently support jumping to WiFi, Bluetooth and App Notification setting. Other setting path will be added soon.

For iOS, this plugin only opens the app setting screen Settings application, as using url schemes to open inner setting path is a violation of Apple's regulations. Using url scheme to open settings can also leads to possible App Store rejection.

If you can find any workaround or enhancement, pull requests are always welcome.

Usage

To use this plugin, add system_setting as a dependency in your pubspec.yaml file.

For iOS, SettingTarget will not have any effect. It will always go to app setting.

Example

import 'package:flutter/material.dart';
import 'packages:system_setting/system_setting.dart';

void main() => runApp(MaterialApp(
      home: Scaffold(
        body: Center(
          child: RaisedButton(
            onPressed: _jumpToSetting,
            child: Text('Goto setting'),
          ),
        ),
      ),
    ));

_jumpToSetting() {
  SystemSetting.goto(SettingTarget.WIFI);
}

About

Flutter plugin for jumping to system settings

License:MIT License


Languages

Language:Ruby 28.4%Language:Dart 28.3%Language:Kotlin 25.4%Language:Swift 14.0%Language:Objective-C 3.9%