CapturedData.fromMap constructor

CapturedData.fromMap(
  1. Map<Object?, Object?> map
)

Create CapturedData from method channel response map.

Implementation

factory CapturedData.fromMap(Map<Object?, Object?> map) {
  final int width = map['width'] as int;
  final int height = map['height'] as int;
  final Uint8List bytes = map['bytes'] as Uint8List;

  return CapturedData(width: width, height: height, bytes: bytes);
}