system_shortcuts 1.0.0 copy "system_shortcuts: ^1.0.0" to clipboard
system_shortcuts: ^1.0.0 copied to clipboard

ANDROID & IOS flutter plugin to use system shortcuts like pressing home, back, volume Up, volume Down keys and toggle wifi, and bluetooth as well.

system_shortcuts #

A flutter plugin to use system shortcuts.

Thanks to Rody Davis for IOS implementation.

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<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.

35
likes
40
pub points
72%
popularity

Publisher

unverified uploader

ANDROID & IOS flutter plugin to use system shortcuts like pressing home, back, volume Up, volume Down keys and toggle wifi, and bluetooth as well.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on system_shortcuts