Library for manage general repositories.

Using

For use repositories with api implementations


import 'package:base_data/base_data.dart';

mixin UsersApiSource on GetAllApiSource<User> {}

class UsersRepositoryAdapter with GetAllRepositoryAdapter<User> {
  final UsersApiSource apiSource;

  UsersRepositoryAdapter(this.apiSource);
}

For use repositories with api and db implementations


import 'package:base_data/base_data.dart';

mixin UsersApiSource on GetAllApiSource<User> {}

mixin UsersDbSource on PutAllDbSource<User> {}

class UsersRepositoryAdapter with StorageGetAllRepositoryAdapter<User> {
  final UsersApiSource apiSource;
  final UsersDbSource dbSource;

  UsersRepositoryAdapter(
    this.apiSource,
    this.dbSource,
  );
}


Libraries

api_source
base_data
db_source
delete_by_id_repository
get_all_repository
get_by_id_repository
save_in_storage_repository
save_repository
simple_get_repository
simple_stream_repository
stream_all_repository
stream_by_id_repository
update_repository