Map<String, dynamic> toJson() { final initialStateName = this.initialStateName; final states = this.states; return { 'initialStateName': initialStateName, 'states': states, }; }