Inventory.fromJson constructor

Inventory.fromJson(
  1. Map json_
)

Implementation

Inventory.fromJson(core.Map json_)
    : this(
        items: json_.containsKey('items')
            ? (json_['items'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  Item.fromJson(value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        osInfo: json_.containsKey('osInfo')
            ? OsInfo.fromJson(
                json_['osInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
      );