scaleFromJSON function

ScaleDetails? scaleFromJSON(
  1. dynamic json, [
  2. ScaleDetails? defaultValue
])

Implementation

ScaleDetails? scaleFromJSON(dynamic json, [ScaleDetails? defaultValue]) {
  if (json == null) {
    return defaultValue;
  }
  if (json is int || json is double) {
    return ScaleDetails(
        scale: parseDouble(json),
        scaleX: null,
        scaleY: null,
        alignment: Alignment.center);
  }

  return ScaleDetails.fromJson(json);
}