EventGadget.fromJson constructor

EventGadget.fromJson(
  1. Map json_
)

Implementation

EventGadget.fromJson(core.Map json_)
    : this(
        display: json_.containsKey('display')
            ? json_['display'] as core.String
            : null,
        height:
            json_.containsKey('height') ? json_['height'] as core.int : null,
        iconLink: json_.containsKey('iconLink')
            ? json_['iconLink'] as core.String
            : null,
        link: json_.containsKey('link') ? json_['link'] as core.String : null,
        preferences: json_.containsKey('preferences')
            ? (json_['preferences'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        width: json_.containsKey('width') ? json_['width'] as core.int : null,
      );