DialogShownEvent.fromJson constructor

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

Implementation

factory DialogShownEvent.fromJson(Map<String, dynamic> json) {
  return DialogShownEvent(
    dialogId: json['dialogId'] as String,
    dialogType: DialogType.fromJson(json['dialogType'] as String),
    accounts: (json['accounts'] as List)
        .map((e) => Account.fromJson(e as Map<String, dynamic>))
        .toList(),
    title: json['title'] as String,
    subtitle:
        json.containsKey('subtitle') ? json['subtitle'] as String : null,
  );
}