is_airplane_mode 0.0.1
is_airplane_mode: ^0.0.1 copied to clipboard
Checks if the device is in airplane mode on Android and iOS
is_airplane_mode #
A Flutter plugin that allows you to check if the device is in airplane mode.
Usage #
To use this plugin, add is_airplane_mode as a dependency in your pubspec.yaml file.
Then, import the package and call IsAirplaneMode.isAirplaneMode to check if the device is in airplane mode:
import 'package:is_airplane_mode/is_airplane_mode.dart';
Future<void> _checkAirplaneMode() async {
final isOn = await IsAirplaneMode.isAirplaneMode;
if (kDebugMode) {
print("Airplane Mode is ${isOn ? "ON" : "OFF"}");
}
}