toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final stateName = this.stateName;
  final onEnter = this.onEnter;
  final onExit = this.onExit;
  final onInput = this.onInput;
  return {
    'stateName': stateName,
    if (onEnter != null) 'onEnter': onEnter,
    if (onExit != null) 'onExit': onExit,
    if (onInput != null) 'onInput': onInput,
  };
}