|
@@ -167,29 +167,30 @@ class BluetoothOffScreen extends StatelessWidget {
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
children: <Widget>[
|
|
|
SizedBox(
|
|
|
- height: 20,
|
|
|
+ height: 30,
|
|
|
),
|
|
|
Image.asset("lib/assets/img/pop_icon_bluetooth.png"),
|
|
|
SizedBox(
|
|
|
height: 20,
|
|
|
),
|
|
|
Text(
|
|
|
- '蓝牙未开启',
|
|
|
+ '手机蓝牙未开启,请打开手机蓝牙',
|
|
|
style: Theme.of(context).textTheme.bodyText2!,
|
|
|
),
|
|
|
SizedBox(
|
|
|
height: 10,
|
|
|
),
|
|
|
- GestureDetector(
|
|
|
- behavior: HitTestBehavior.opaque,
|
|
|
- onTap: () async {
|
|
|
- if (Platform.isAndroid) {
|
|
|
- AndroidIntent intent = AndroidIntent(action: "android.bluetooth.adapter.action.REQUEST_ENABLE");
|
|
|
- await intent.launch();
|
|
|
- } else if (Platform.isIOS) {
|
|
|
- launch("App-Prefs:root=Bluetooth");
|
|
|
- }
|
|
|
- },
|
|
|
+ if (Platform.isAndroid)
|
|
|
+ GestureDetector(
|
|
|
+ behavior: HitTestBehavior.opaque,
|
|
|
+ onTap: () async {
|
|
|
+ if (Platform.isAndroid) {
|
|
|
+ AndroidIntent intent = AndroidIntent(action: "android.bluetooth.adapter.action.REQUEST_ENABLE");
|
|
|
+ await intent.launch();
|
|
|
+ } else if (Platform.isIOS) {
|
|
|
+ launch("App-Prefs:root=Bluetooth");
|
|
|
+ }
|
|
|
+ },
|
|
|
child: Center(
|
|
|
child: Row(
|
|
|
mainAxisSize: MainAxisSize.min,
|