presentation-displays
presentation-displays copied to clipboard
Error when getDisplays
When getDisplays is called a error is throwed: type 'Null' is not a subtype of type 'int'
- Device: Android Tablet
- Version 7.1.2
try { final values = await displayManager.getDisplays(); print(values); } catch (error) { print(error); }
The _displayMethodChannel?.invokeMethod returns: [{a: 0, b: 3, c: 0, d: Built-in Screen}, {a: 1, b: 11, c: 0, d: HDMI Screen}]
But the displayFromJson expects a json with "displayId", "flags", "name", "rotation", instead receives "a", "b", "c", "d" fields.
hi, I fixed this issue by using klutzy way haha, try this https://github.com/arbyazra123/presentation-displays, I changed the parameter in native android to a = displayId, b = flags, c = rotation, d = displayName
I have solved & Added Custom Methods Go & check https://github.com/MUSA-19542/FlutterCustom/tree/main