TransitionEvent.fromJson constructor

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

Implementation

factory TransitionEvent.fromJson(Map<String, dynamic> json) {
  return TransitionEvent(
    condition: json['condition'] as String,
    eventName: json['eventName'] as String,
    nextState: json['nextState'] as String,
    actions: (json['actions'] as List?)
        ?.whereNotNull()
        .map((e) => Action.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}