diff --git a/.github/workflows/flutter_format.yml b/.github/workflows/flutter_format.yml index 6954c75..22624f6 100644 --- a/.github/workflows/flutter_format.yml +++ b/.github/workflows/flutter_format.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3.13.0 with: distribution: 'temurin' # See 'Supported distributions' for available options diff --git a/example/lib/main.dart b/example/lib/main.dart index 426b41a..f0a2b85 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -71,6 +71,7 @@ class _MyAppState extends State { scanSubscription?.cancel(); setState(() { scanResults.clear(); + // ignore: deprecated_member_use scanSubscription = FlutterBluePlus.scan(allowDuplicates: true).listen( (scanResult) { if (scanResults.firstWhereOrNull( @@ -195,8 +196,8 @@ class DeviceItem extends StatelessWidget { @override Widget build(BuildContext context) { var name = 'Unknown'; - if (scanResult.device.localName.isNotEmpty) { - name = scanResult.device.localName; + if (scanResult.device.platformName.isNotEmpty) { + name = scanResult.device.platformName; } return Card( child: Padding(