feat: scan book to add to sell

This commit is contained in:
alzalia1 2025-08-15 12:51:36 +02:00
parent 3a013c829f
commit 07c7c98edb
11 changed files with 238 additions and 31 deletions

View file

@ -33,6 +33,18 @@ class OwnerRepository {
return result;
}
Future<Result<Owner>> getOwnerById(int id) async {
if (_cachedOwners != null) {
final result1 = _cachedOwners!
.where((owner) => owner.id == id)
.firstOrNull;
if (result1 != null) {
return Result.ok(result1);
}
}
return await _apiClient.getOwnerById(id);
}
/// Adds an [Owner] to the database, and gets the resulting [Owner].
Future<Result<Owner>> addOwner(
String firstName,