GithubHelp home page GithubHelp logo

famasf1 / app_settings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spencerccf/app_settings

0.0 0.0 0.0 351 KB

Flutter plugin for accessing app phone settings for iOS and Android

License: MIT License

Ruby 8.33% Objective-C 0.13% Kotlin 35.90% Dart 43.72% Swift 11.92%

app_settings's Introduction

app_settings

pub package

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

Installation

First, add app_settings as a dependency in your pubspec.yaml file.

flutter pub add app_settings

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

import 'package:app_settings/app_settings.dart';

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!

Usage

Open the settings of the application using AppSettings.openAppSettings(). By default, AppSettingsType.settings is used as the type, which opens the general application settings. If the given type is not supported on the current platform, the general settings are opened instead.

Android If asAnotherTask is set to true, the settings page is opened in a different Activity.

Widget build(BuildContext context) {
  return ElevatedButton(
    onPressed: () => AppSettings.openAppSettings(type: AppSettingsType.location),
    child: const Text('Open Location Settings'),
  );
}

Android Q Settings Panels

To open a Settings Panel on Android Q and higher, call AppSettings.openAppSettingsPanel() with a given type.

Widget build(BuildContext context) {
  return ElevatedButton(
    onPressed: () => AppSettings.openAppSettingsPanel(AppSettingsPanelType.volume),
    child: const Text('Open Volume Settings Panel'),
  );
}

Settings panels are not supported on other platforms.

app_settings's People

Contributors

plinkos avatar navaronbracke avatar spencerccf avatar nohli avatar ened avatar jamespfinn avatar matalmeida avatar tairoroberto avatar kerimamansaryyev avatar jjagg avatar chloe722 avatar bro-jo avatar iqfareez avatar savar avatar robertmagnussonbmw avatar rahul0101 avatar nicolasdupere avatar lohanbodevan avatar large avatar knottx avatar josephchenghmlet avatar misterjimson avatar ivanpinezhaninov avatar hudovisk avatar daadu avatar aleksandarsavic95 avatar akouyate avatar

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.