global_settings_list 0.0.2+1

global_settings_list #

Flutter Plugin for getting List of Settings.Global on Android

How to install the plugin #

edit pubspec.yaml

dependencies:
  flutter:
    sdk: flutter

  *global_settings_list: ^0.0.2*

run on terminal

> flutter pub get

and read the Example Links

0.0.1 #

  • Just A Wrapper to Get Settings.Global from Android
  • Not Support for iOS

0.0.2 #

  • Build get List of Setting Global every execute MethodChannel

0.0.2+1 #

  • Add Documentation of list settings

example/README.md

global_settings_list_example #

Demonstrates how to use the global_settings_list plugin.

Getting Started #

import the plugin

    import 'package:global_settings_list/global_settings_list.dart';

full example

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

    import 'package:flutter/services.dart';
    import 'package:global_settings_list/global_settings_list.dart';

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

    class MyApp extends StatefulWidget {
      @override
      _MyAppState createState() => _MyAppState();
    }

    class _MyAppState extends State<MyApp> {
      String _platformVersion = 'Unknown', _autoTimezone, _autoTime, _daftar = "";
      Map<String, dynamic> _list;

      @override
      void initState() {
        super.initState();
        initPlatformState();
      }

      // Platform messages are asynchronous, so we initialize in an async method.
      Future<void> initPlatformState() async {
        String platformVersion, autoTimezone, autoTime;
        Map<String, dynamic> list;

        try {
          autoTimezone = await GlobalSettingsList.autoTimeZone;
          list = await GlobalSettingsList.list;
          autoTime = await GlobalSettingsList.autoTime;
        } on PlatformException {
          autoTimezone = 'Failed to Get';
          autoTime = 'Failed to Get';
        }

        // If the widget was removed from the tree while the asynchronous platform
        // message was in flight, we want to discard the reply rather than calling
        // setState to update our non-existent appearance.
        if (!mounted) return;

        setState(() {
          _platformVersion = platformVersion;
          _autoTimezone = autoTimezone;
          _autoTime = autoTime;
          _list = list;
          _daftar = "";

          list.forEach((k, v) {
            _daftar += "$k : $v \n";
          });
        });
      }

      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            appBar: AppBar(
              title: const Text('Plugin example app'),
            ),
            body: Center(
              child: Column(
                children: <Widget>[
                  Text('Running on: $_platformVersion\n'),
                  Text('Auto Timezone : $_autoTimezone'),
                  Text('Auto Time : $_autoTime'),
                  RaisedButton(
                    child: Text("Load"),
                    onPressed: initPlatformState,
                  ),
                  Expanded(
                      flex: 1,
                      child: SingleChildScrollView(child: Text(_daftar ?? "tes")))
                ],
              ),
            ),
          ),
        );
      }
    }

list of global settings #

  • GlobalSettingsList.adbEnabled
  • GlobalSettingsList.airplaneModeOn
  • GlobalSettingsList.airplaneModeRadios
  • GlobalSettingsList.alwaysFinishActivities
  • GlobalSettingsList.animatorDurationScale
  • GlobalSettingsList.autoTime
  • GlobalSettingsList.autoTimeZone
  • GlobalSettingsList.bluetoothOn
  • GlobalSettingsList.bootCount
  • GlobalSettingsList.contactMetadataSyncEnabled
  • GlobalSettingsList.dataRoaming
  • GlobalSettingsList.debugApp
  • GlobalSettingsList.developmentSettingsEnabled
  • GlobalSettingsList.deviceName
  • GlobalSettingsList.deviceProvisioned
  • GlobalSettingsList.httpProxy
  • GlobalSettingsList.installNonMarketApps
  • GlobalSettingsList.modeRinger
  • GlobalSettingsList.networkPreference
  • GlobalSettingsList.radioBluetooth
  • GlobalSettingsList.radioCell
  • GlobalSettingsList.radioNfc
  • GlobalSettingsList.radioWifi
  • GlobalSettingsList.showProcesses
  • GlobalSettingsList.stayOnWhilePluggedIn
  • GlobalSettingsList.transitionAnimationScale
  • GlobalSettingsList.usbMassStorageEnabled
  • GlobalSettingsList.useGoogleMail
  • GlobalSettingsList.waitForDebugger
  • GlobalSettingsList.wifiDeviceOwnerConfigsLockdown
  • GlobalSettingsList.wifiMaxDhcpRetryCount
  • GlobalSettingsList.wifiMobileDataTransitionWakelockTimeoutMs
  • GlobalSettingsList.wifiNetworksAvailableNotificationOn
  • GlobalSettingsList.wifiNetworksAvailableRepeatDelay
  • GlobalSettingsList.wifiNumOpenNetworksKept
  • GlobalSettingsList.wifiOn
  • GlobalSettingsList.wifiSleepPolicy
  • GlobalSettingsList.wifiWatchdogOn
  • GlobalSettingsList.windowAnimationScale
  • GlobalSettingsList.list

Use this package as a library

1. Depend on it

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


dependencies:
  global_settings_list: ^0.0.2+1

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

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the 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
Dev dependencies
flutter_test