add method
Adds data
to the sink.
Must not be called after a call to close.
Implementation
@override
Future<void> add(T data) async {
controller.add(data);
final map = toMap(data);
//ignore:invalid_use_of_protected_member
await persistence.setMap(key, map);
}