create method

  1. @override
Future<Model> create({
  1. String? wantedId,
})
override

Creates a new entry in the repository.

Implementation

@override
Future<Model> create({String? wantedId}) async {
  _checkInitializationStatus();

  final String uniqueId = wantedId ?? _models.hashCode.toString();

  final Model newModel = Model(id: uniqueId);
  _models.add(newModel);
  _writeRaw();

  return newModel;
}