lecle_system_shortcuts

Last updated:

0 purchases

lecle_system_shortcuts Image
lecle_system_shortcuts Images
Add to Cart

Description:

lecle system shortcuts

lecle_system_shortcuts #
A flutter plugin to use the Android and iOS system shortcuts. Migrate from system_shortcuts package
For using funtions and getters related to WIFI settings you need to add these two permissions in your AndroidManifext.xml file #
<uses-feature android:name="android.hardware.wifi" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
copied to clipboard
For using funtions and getters related to BLUETOOTH settings you need to add these two permissions in your AndroidManifext.xml file #
<uses-feature android:name="android.hardware.bluetooth" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET" />
copied to clipboard
Make this import #

import 'package:lecle_system_shortcuts/lecle_system_shortcuts.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;
},
),
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.