OnInputLifecycle.fromJson constructor

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

Implementation

factory OnInputLifecycle.fromJson(Map<String, dynamic> json) {
  return OnInputLifecycle(
    events: (json['events'] as List?)
        ?.whereNotNull()
        .map((e) => Event.fromJson(e as Map<String, dynamic>))
        .toList(),
    transitionEvents: (json['transitionEvents'] as List?)
        ?.whereNotNull()
        .map((e) => TransitionEvent.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}