onInit method Null safety

  1. @override
Future<void> onInit()
override

Retrieves the information of the device

Implementation

@override
Future<void> onInit() async {
  final deviceInfo = await DeviceInfo.getInstance();

  model(DeviceInformationModel(
    model: deviceInfo.model,
    manufacturer: deviceInfo.manufacturer,
    framework: deviceInfo.framework,
    version: deviceInfo.version,
    platform: deviceInfo.platform,
  ));

  super.onInit();
}