getScreenSizeInInches method
Fetches the screen size in inches (width and height).
Implementation
@override
Future<Map<String, double>?> getScreenSizeInInches() async {
final Map<dynamic, dynamic>? result = await methodChannel
.invokeMethod<Map<dynamic, dynamic>>('getScreenSizeInInches');
if (result != null) {
return {
'width': result['width'] as double,
'height': result['height'] as double,
};
}
return null;
}