feat: scan book to add to sell
This commit is contained in:
parent
3a013c829f
commit
07c7c98edb
11 changed files with 238 additions and 31 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Reference in a new issue