mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
chore: Linter fixes for USB serial transport
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:usb_serial/usb_serial.dart';
|
||||
import 'package:meshcore_client/meshcore_client.dart';
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:meshcore_client/meshcore_client.dart';
|
||||
|
||||
// Web Serial API is only available on web platform.
|
||||
|
||||
@@ -758,6 +758,7 @@ class _UsbDeviceListState extends State<_UsbDeviceList> {
|
||||
widget.onConnected();
|
||||
} else {
|
||||
await port.close();
|
||||
if (!mounted) return;
|
||||
setState(() => _isConnecting = false);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Failed to connect via USB')),
|
||||
|
||||
Reference in New Issue
Block a user