bluetooth connectivity layer added
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:app_settings/app_settings.dart';
|
||||
import 'package:permission_handler/permission_handler.dart' as ph;
|
||||
|
||||
/// Verlinkt zu den System-/App-Einstellungen fuer die drei Bluetooth-
|
||||
/// Hinweisfaelle aus Doku Kommunikationsschicht Abschnitt 3/7 - haelt die
|
||||
/// Wahl des Settings-Pakets aus ui/ heraus (Doku: kein Bluetooth-/
|
||||
/// Settings-Import ausserhalb von transport/).
|
||||
abstract final class BluetoothSystemSettings {
|
||||
/// "Bluetooth an?" negativ (Doku 3.1) bzw. der "Gerät koppeln"-Knopf
|
||||
/// (Doku 7): oeffnet die System-Bluetooth-Einstellungen, in denen der
|
||||
/// Nutzer sowohl den Adapter einschalten als auch ein neues Geraet koppeln
|
||||
/// kann.
|
||||
static Future<void> openBluetoothSettings() =>
|
||||
AppSettings.openAppSettings(type: AppSettingsType.bluetooth);
|
||||
|
||||
/// Berechtigung dauerhaft abgelehnt (Doku 3, Berechtigungen): oeffnet die
|
||||
/// App-Einstellungen, in denen der Nutzer die Berechtigung manuell erteilen
|
||||
/// kann, da Android den Dialog kein zweites Mal zeigt.
|
||||
static Future<void> openAppSettings() => ph.openAppSettings();
|
||||
}
|
||||
Reference in New Issue
Block a user