device_info_android 0.0.3 device_info_android: ^0.0.3 copied to clipboard
A new Flutter plugin.
device_info_android #
Get current device information from within the Flutter application.
This Plugin is used to get android Device information which is based on telephone service.
Usage #
Example:
import 'package:device_info_android/device_info_android.dart';
Future<void> initPlatformState() async {
String platformVersion;
AndroidDeviceInfo deviceInfo;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
deviceInfo = await DeviceInfoAndroid.androidSimDetails;
print(deviceInfo.simCardDetails);
} on PlatformException {
platformVersion = 'Failed to get platform version.';
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) return;
setState(() {
_platformVersion = platformVersion;
});
}
You will find links to the API docs on the pub page.
Getting Started #
For help getting started with Flutter, view our online documentation.
For help on editing plugin code, view the documentation.