fromDynamic static method

JsonIntrinsicWidthBuilder? fromDynamic(
  1. dynamic map, {
  2. JsonWidgetRegistry? registry,
})

Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:

{
  "stepHeight": <double>,
  "stepWidth": <double>
}

Implementation

static JsonIntrinsicWidthBuilder? fromDynamic(
  dynamic map, {
  JsonWidgetRegistry? registry,
}) {
  JsonIntrinsicWidthBuilder? result;

  if (map != null) {
    result = JsonIntrinsicWidthBuilder(
      stepHeight: JsonClass.parseDouble(
        map['stepHeight'],
      ),
      stepWidth: JsonClass.parseDouble(
        map['stepWidth'],
      ),
    );
  }

  return result;
}