toJson abstract method

Map<String, dynamic>? toJson(
  1. State state
)

Responsible for converting a concrete instance of the bloc state into the the Map<String, dynamic> representation.

If toJson returns null, then no state changes will be persisted.

Implementation

Map<String, dynamic>? toJson(State state);