Git Product home page Git Product logo

flutter_open_app_settings's Introduction

flutter_open_app_settings

A Flutter Plugin for opening phone settings from Android and iOS apps. It is a fully customizable plugin that allows you to execute functions when returning from the app settings pages.

Installation

Add following dependency in pubspec.yaml file:

flutter_open_app_settings:^0.1.0

Install by running:

flutter pub get

Usage

Usage implementation using a ElevatedButton 'onPressed' event.

import 'package:flutter_open_app_settings/flutter_open_app_settings.dart';

  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        ElevatedButton(onPressed: () {
          FlutterOpenAppSettings.openAppsSettings(settingsCode: SettingsCode.APP_SETTINGS,
            onCompletion: _function);},
            child: Text("OPEN APP SETTINGS")),
      ],
    );
  }

openAppsSettings function takes 2 arguments. The first one is required and accepts the Setting code. The second is optional and accepts a function. The function will be executed after returning from the settings page.

 Function _function = (){
      print("do stuff here After returning back to setting page!");
    };

iOS only supports single settings pages instead of custom setting pages.

SettingsCode

 enum SettingsCode{
    APP_SETTINGS,
    BLUETOOTH,
    WIFI,
    ACCESSIBILITY,
    ADD_ACCOUNT,
    AIRPLANE_MODE,
    APN,
    ALL_APPS_SETTINGS,
    BATTERY_SAVER,
    KEYBOARD,
    DATA_USAGE,
    DATE,
    DEVICE_INFO,
    DISPLAY,
    HOME,
    INTERNAL_STORAGE,
    FINGERPRINT_ENROLL,
    LOCALE,
    LOCATION,
    PRIVACY,
    BATTERY_OPTIMIZATION,
    NFC,
    SOUND,
    NOTIFICATION,
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Follow me

https://github.com/josephcrowell

flutter_open_app_settings's People

Contributors

josephcrowell avatar hina-hussain avatar

Forkers

onewilk

flutter_open_app_settings's Issues

No podspec found for `flutter_open_app_settings` in `.symlinks/plugins/flutter_open_app_settings/ios`

What version of this package are you using?
flutter_open_app_settings: ^0.1.3

What operating system, Node.js, and npm version?
MacOS

What happened?
Can't run pod install

What did you expect to happen?

Generating Pods project
Integrating client project
Pod installation complete! There are 12 dependencies from the Podfile and 12 total pods installed.

Are you willing to submit a pull request to fix this bug?
FIX: Just rename flutter_open_app_settings/ios/open_apps_settings.podspec to flutter_open_app_settings/ios/flutter_open_app_settings.podspec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.