|
@@ -146,7 +146,7 @@ class _ConnectionPage extends State<ConnectionPage> {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- child: const Text('載入藍牙裝置列表'),
|
|
|
+ child: const Text('重新載入列表'),
|
|
|
)),
|
|
|
Container(
|
|
|
padding: EdgeInsets.symmetric(horizontal: 2),
|
|
@@ -161,6 +161,9 @@ class _ConnectionPage extends State<ConnectionPage> {
|
|
|
onPressed: () async {
|
|
|
if (operatingDevice.deviceSelected &&
|
|
|
!operatingDevice.deviceConnected) {
|
|
|
+ setState(() {
|
|
|
+ _statusText = "正在建立連接…";
|
|
|
+ });
|
|
|
//Not connected yet. Establish connection
|
|
|
try {
|
|
|
operatingDevice.connection =
|
|
@@ -181,6 +184,9 @@ class _ConnectionPage extends State<ConnectionPage> {
|
|
|
});
|
|
|
} catch (ex) {
|
|
|
print(ex);
|
|
|
+ setState(() {
|
|
|
+ _statusText = "無法連接到選定的裝置 (查看偵錯主控台以了解更多)";
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
if (!operatingDevice.deviceSelected) {
|