DeviceOrientationInfo.fromMap constructor
Creates a DeviceOrientationInfo instance from a platform channel map.
Implementation
factory DeviceOrientationInfo.fromMap(Map<Object?, Object?> map) {
return DeviceOrientationInfo(
orientationName: map['orientationName'] as String? ?? 'unknown',
rotationDegrees: map['rotationDegrees'] as int? ?? -1,
isPortrait: map['isPortrait'] as bool? ?? false,
isLandscape: map['isLandscape'] as bool? ?? false,
source: map['source'] as String? ?? 'unknown',
timestampMillis: map['timestampMillis'] as int? ?? 0,
);
}