Primary.fromJson constructor

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

Implementation

Primary.fromJson(Map<String, dynamic> json) {
  text = json['text'];
  if (json['components'] != null) {
    components = <Components>[];
    json['components'].forEach((v) {
      components!.add(Components.fromJson(v));
    });
  }
  type = json['type'];
  modifier = json['modifier'];
}