GenericObject.fromJson constructor

GenericObject.fromJson(
  1. Map json_
)

Implementation

GenericObject.fromJson(core.Map json_)
    : this(
        appLinkData: json_.containsKey('appLinkData')
            ? AppLinkData.fromJson(
                json_['appLinkData'] as core.Map<core.String, core.dynamic>)
            : null,
        barcode: json_.containsKey('barcode')
            ? Barcode.fromJson(
                json_['barcode'] as core.Map<core.String, core.dynamic>)
            : null,
        cardTitle: json_.containsKey('cardTitle')
            ? LocalizedString.fromJson(
                json_['cardTitle'] as core.Map<core.String, core.dynamic>)
            : null,
        classId: json_.containsKey('classId')
            ? json_['classId'] as core.String
            : null,
        genericType: json_.containsKey('genericType')
            ? json_['genericType'] as core.String
            : null,
        groupingInfo: json_.containsKey('groupingInfo')
            ? GroupingInfo.fromJson(
                json_['groupingInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        hasUsers: json_.containsKey('hasUsers')
            ? json_['hasUsers'] as core.bool
            : null,
        header: json_.containsKey('header')
            ? LocalizedString.fromJson(
                json_['header'] as core.Map<core.String, core.dynamic>)
            : null,
        heroImage: json_.containsKey('heroImage')
            ? Image.fromJson(
                json_['heroImage'] as core.Map<core.String, core.dynamic>)
            : null,
        hexBackgroundColor: json_.containsKey('hexBackgroundColor')
            ? json_['hexBackgroundColor'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        imageModulesData: json_.containsKey('imageModulesData')
            ? (json_['imageModulesData'] as core.List)
                .map((value) => ImageModuleData.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        linksModuleData: json_.containsKey('linksModuleData')
            ? LinksModuleData.fromJson(json_['linksModuleData']
                as core.Map<core.String, core.dynamic>)
            : null,
        logo: json_.containsKey('logo')
            ? Image.fromJson(
                json_['logo'] as core.Map<core.String, core.dynamic>)
            : null,
        notifications: json_.containsKey('notifications')
            ? Notifications.fromJson(
                json_['notifications'] as core.Map<core.String, core.dynamic>)
            : null,
        passConstraints: json_.containsKey('passConstraints')
            ? PassConstraints.fromJson(json_['passConstraints']
                as core.Map<core.String, core.dynamic>)
            : null,
        rotatingBarcode: json_.containsKey('rotatingBarcode')
            ? RotatingBarcode.fromJson(json_['rotatingBarcode']
                as core.Map<core.String, core.dynamic>)
            : null,
        smartTapRedemptionValue: json_.containsKey('smartTapRedemptionValue')
            ? json_['smartTapRedemptionValue'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        subheader: json_.containsKey('subheader')
            ? LocalizedString.fromJson(
                json_['subheader'] as core.Map<core.String, core.dynamic>)
            : null,
        textModulesData: json_.containsKey('textModulesData')
            ? (json_['textModulesData'] as core.List)
                .map((value) => TextModuleData.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        validTimeInterval: json_.containsKey('validTimeInterval')
            ? TimeInterval.fromJson(json_['validTimeInterval']
                as core.Map<core.String, core.dynamic>)
            : null,
        wideLogo: json_.containsKey('wideLogo')
            ? Image.fromJson(
                json_['wideLogo'] as core.Map<core.String, core.dynamic>)
            : null,
      );