fromDynamic static method

SetWindowSizeStep fromDynamic(
  1. dynamic map
)

Creates an instance from a JSON-like map structure. This expects the following format:

{
  "height": <double>,
  "width": <double>
}

Implementation

static SetWindowSizeStep fromDynamic(dynamic map) {
  SetWindowSizeStep result;

  if (map == null) {
    throw Exception('[SetWindowSizeStep.fromDynamic]: map is null');
  } else {
    result = SetWindowSizeStep(
      height: (map['height'] ?? kDefaultHeight).toString(),
      width: (map['width'] ?? kDefaultWidth).toString(),
    );
  }

  return result;
}