Action.fromJson constructor

Action.fromJson(
  1. Map json_
)

Implementation

Action.fromJson(core.Map json_)
    : this(
        builtinSimpleAction: json_.containsKey('builtinSimpleAction')
            ? BuiltInSimpleAction.fromJson(json_['builtinSimpleAction']
                as core.Map<core.String, core.dynamic>)
            : null,
        builtinUserInputAction: json_.containsKey('builtinUserInputAction')
            ? BuiltInUserInputAction.fromJson(json_['builtinUserInputAction']
                as core.Map<core.String, core.dynamic>)
            : null,
        buttonLabel: json_.containsKey('buttonLabel')
            ? json_['buttonLabel'] as core.String
            : null,
        externalAction: json_.containsKey('externalAction')
            ? ExternalAction.fromJson(json_['externalAction']
                as core.Map<core.String, core.dynamic>)
            : null,
        isAvailable: json_.containsKey('isAvailable')
            ? json_['isAvailable'] as core.bool
            : null,
        reasons: json_.containsKey('reasons')
            ? (json_['reasons'] as core.List)
                .map((value) => ActionReason.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );