Skip to content

Commit

Permalink
Avoid Range error when no BT adapter is available, e.g. when running …
Browse files Browse the repository at this point in the history
…on emulator (pauldemarco#431)

Signed-off-by: Bernhard Bender <ber.droid@googlemail.com>
  • Loading branch information
berdroid authored Apr 2, 2020
1 parent cc65e15 commit 64893c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BluetoothOffScreen extends StatelessWidget {
color: Colors.white54,
),
Text(
'Bluetooth Adapter is ${state.toString().substring(15)}.',
'Bluetooth Adapter is ${state != null ? state.toString().substring(15): 'not available'}.',
style: Theme.of(context)
.primaryTextTheme
.subhead
Expand Down

0 comments on commit 64893c4

Please sign in to comment.