mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-29 14:58:44 +10:00
Gate the turn on BLE button to android
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io' show Platform;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
@@ -263,10 +264,11 @@ class _ScannerScreenState extends State<ScannerScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
if (Platform.isAndroid)
|
||||||
onPressed: () => FlutterBluePlus.turnOn(),
|
TextButton(
|
||||||
child: Text(context.l10n.scanner_enableBluetooth),
|
onPressed: () => FlutterBluePlus.turnOn(),
|
||||||
),
|
child: Text(context.l10n.scanner_enableBluetooth),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user