[X] I've looked at the README 'Common Problems' section
Have you checked this problem on the example app?
Yes
FlutterBluePlus Version
flutter_blue_plus: ^1.34.4
Flutter Version
Flutter 3.24.3 • channel stable
What OS?
Android
OS Version
Android 14
Bluetooth Module
Bluetooth 4.0 version
What is your problem?
How to continuously monitor the status of Bluetooth at the global level using the Flutter framework? No matter which page you are on, when you hear that Bluetooth is turned off, you will directly jump to the page where Bluetooth is turned off. Can this be achieved?
If the current BuildContext instance is not obtained, there is no way to navigate. The navigatorKey property of MaterialApp cannot be used because the onGeneratedRoute property is not used. Is there any other way to achieve this requirement?
The example program only monitors the Bluetooth status on a single page, listening on the Bluetooth Adapter State Observer, which does not meet my requirements.
Requirements
Have you checked this problem on the example app?
Yes
FlutterBluePlus Version
flutter_blue_plus: ^1.34.4
Flutter Version
Flutter 3.24.3 • channel stable
What OS?
Android
OS Version
Android 14
Bluetooth Module
Bluetooth 4.0 version
What is your problem?
How to continuously monitor the status of Bluetooth at the global level using the Flutter framework? No matter which page you are on, when you hear that Bluetooth is turned off, you will directly jump to the page where Bluetooth is turned off. Can this be achieved? If the current BuildContext instance is not obtained, there is no way to navigate. The navigatorKey property of MaterialApp cannot be used because the onGeneratedRoute property is not used. Is there any other way to achieve this requirement?
The example program only monitors the Bluetooth status on a single page, listening on the Bluetooth Adapter State Observer, which does not meet my requirements.
Logs