SystemShortcutsFlutter
システムショートカットを使用するためのFlutterプラグイン。
- スター
- 19
- フォーク
- 21
- 最終プッシュ(UTC)
- 2024/03/05
- プロジェクト状態
- 公開中
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
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.
使用している依存関係
依存関係一覧 1 件
- flutter
{"sdk":"flutter"}
プロジェクトに合うリポジトリを選ぶには?
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
- 名前・作者・説明で検索し、技術トピックで絞り込みます。
- スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
- 利用前に GitHub で README、ライセンス、Issues を確認します。
情報源と管理
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗