BundleRunResponse.fromJson constructor

BundleRunResponse.fromJson(
  1. Map<String, dynamic> json
)

Creates a BundleRunResponse instance from a JSON map.

Performs safe type checking on the response field and handles the transformation of the meta_data key.

Implementation

factory BundleRunResponse.fromJson(Map<String, dynamic> json) =>
    BundleRunResponse(
      response:
          json['response'] != null && json['response'] is Map<String, dynamic>
          ? RichMessage.fromJson(json['response'] as Map<String, dynamic>)
          : null,
      metaData: json['meta_data'] != null
          ? Map<String, dynamic>.from(json['meta_data'])
          : null,
    );