buildLocalSingleWithDependences<T> function

LocalSingleton<T> buildLocalSingleWithDependences<T>({
  1. required Future<LocalDataContainer> localDataContainerCreator(
    1. DocumentType,
    2. String
    ),
  2. required String fileName,
  3. DocumentType? documentType,
  4. T fromJson(
    1. Map<String, dynamic>
    )?,
  5. Map<String, dynamic> toJson(
    1. T
    )?,
})

Implementation

LocalSingleton<T> buildLocalSingleWithDependences<T>({
  required Future<LocalDataContainer> Function(DocumentType, String)
      localDataContainerCreator,
  required String fileName,
  DocumentType? documentType,
  T Function(Map<String, dynamic>)? fromJson,
  Map<String, dynamic> Function(T)? toJson,
}) {
  return LocalSingleton<T>._di(
      localDataContainerCreator: localDataContainerCreator,
      id: fileName,
      documentType: documentType,
      fromJson: fromJson,
      toJson: toJson);
}