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"/>
import 'package:system_shortcuts/SystemShortcutsFlutter.dart';
await SystemShortcuts.home();// perform a home button tap in android
await SystemShortcuts.back();// perform a back button tap in android
await SystemShortcuts.volDown();// perform a volume down button click
await SystemShortcuts.volUp();// perform a volume up button click
await SystemShortcuts.wifi();// toggle wifi in android
await SystemShortcuts.bluetooth();// toggle bluetooth in android
await SystemShortcuts.checkWifi;// return true/false
await SystemShortcuts.checkBluetooth;// return true/false
FlatButton(
child: Text("Home"),
onPressed: () async {
await SystemShortcuts.home();
},
),
FlatButton(
child: Text("Check Wifi"),
onPressed: () async {
bool wifi = await SystemShortcuts.checkWifi;
},
),
Rody Davis - IOS Implementation
Thorben Markmann - Plugin V2 embedding, Updation lib dependencies.