fromDynamic static method

JsonOffstageBuilder? 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:

{
  "offstage": <bool>
}

Implementation

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

  if (map != null) {
    result = JsonOffstageBuilder(
      offstage: map['offstage'] == null
          ? true
          : JsonClass.parseBool(
              map['offstage'],
            ),
    );
  }

  return result;
}