toJson abstract method

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

convert one instance of State to a JSON to be saved into the storage

IMPORTANT if this method returns null the current state saved won't be modified

Implementation

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