Giter Club home page Giter Club logo

systemshortcutsflutter's Introduction

system_shortcuts

A flutter plugin to use system shortcuts.

Thanks to Rody Davis for IOS implementation.

For using funtions and getters related to WIFI settings you need to add these two permissions in your AndroidManifext.xml file

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>

For using funtions and getters related to BLUETOOTH settings you need to add these two permissions in your AndroidManifext.xml file

<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

Make this import

import 'package:system_shortcuts/SystemShortcutsFlutter.dart';

Functions

Press home button using this function.

await SystemShortcuts.home();// perform a home button tap in android

Press back button using this function

await SystemShortcuts.back();// perform a back button tap in android

Press volume Down in using this function

await SystemShortcuts.volDown();// perform a volume down button click

Press volume Down in using this function

await SystemShortcuts.volUp();// perform a volume up button click

Toggle WIFI using this function

await SystemShortcuts.wifi();// toggle wifi in android

Toggle BLUETOOTH using this function

await SystemShortcuts.bluetooth();// toggle bluetooth in android

Getters

Get current WIFI state

await SystemShortcuts.checkWifi;// return true/false

Get current BLUETOOTH state

await SystemShortcuts.checkBluetooth;// return true/false

Usage

FlatButton(
  child: Text("Home"),
  onPressed: () async {
    await SystemShortcuts.home();
  },
),
FlatButton(
  child: Text("Check Wifi"),
  onPressed: () async {
    bool wifi = await SystemShortcuts.checkWifi;
  },
),

All Contibutors :

Rody Davis - IOS Implementation

Thorben Markmann - Plugin V2 embedding, Updation lib dependencies.

systemshortcutsflutter's People

Contributors

aman-malhotra avatar rodydavis avatar thanhle1547 avatar khalil-t4ulabs 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.