fromMap static method

MaskPosition? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static MaskPosition? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var point = MaskPoint.fromMap(_map['point'])!;
  var x_shift = _map['x_shift']! as double;
  var y_shift = _map['y_shift']! as double;
  var scale = _map['scale']! as double;
  return MaskPosition(
    extra: extra,
    clientId: clientId,
    point: point,
    x_shift: x_shift,
    y_shift: y_shift,
    scale: scale,
  );
}