model method
Implementation
@override
Future<DeviceModel> model() async {
String? model = await _channel.invokeMethod('model');
if (model == null) {
throw Exception('Failed to get device model');
}
if (int.tryParse(model) != null) {
return DeviceModel.unknown.fromId(int.parse(model));
}
return DeviceModel.unknown.fromString(model);
}