GenericClass.fromJson constructor

GenericClass.fromJson(
  1. Map json_
)

Implementation

GenericClass.fromJson(core.Map json_)
    : this(
        callbackOptions: json_.containsKey('callbackOptions')
            ? CallbackOptions.fromJson(json_['callbackOptions']
                as core.Map<core.String, core.dynamic>)
            : null,
        classTemplateInfo: json_.containsKey('classTemplateInfo')
            ? ClassTemplateInfo.fromJson(json_['classTemplateInfo']
                as core.Map<core.String, core.dynamic>)
            : null,
        enableSmartTap: json_.containsKey('enableSmartTap')
            ? json_['enableSmartTap'] as core.bool
            : 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,
        messages: json_.containsKey('messages')
            ? (json_['messages'] as core.List)
                .map((value) => Message.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        multipleDevicesAndHoldersAllowedStatus: json_
                .containsKey('multipleDevicesAndHoldersAllowedStatus')
            ? json_['multipleDevicesAndHoldersAllowedStatus'] as core.String
            : null,
        redemptionIssuers: json_.containsKey('redemptionIssuers')
            ? (json_['redemptionIssuers'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        securityAnimation: json_.containsKey('securityAnimation')
            ? SecurityAnimation.fromJson(json_['securityAnimation']
                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,
        viewUnlockRequirement: json_.containsKey('viewUnlockRequirement')
            ? json_['viewUnlockRequirement'] as core.String
            : null,
      );