toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final state = this.state;
  return {
    if (state != null) 'State': state.toValue(),
  };
}