mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-06 18:25:11 +08:00

Deleted files: * `bulk_deletable.dart` * `bulk_insertable.dart` * `bulk_manager.dart` * `dao_product_extra.dart` * `label_sneek_peak_view.dart` * `list_page.dart` * `multi_product_select_page.dart` * `product_copy_helper.dart` * `product_copy_view.dart` * `product_extra.dart` * `product_list_add_button.dart` * `product_list_button.dart` * `product_list_item.dart` * `product_list_item_pantry.dart` * `product_list_item_shopping.dart` * `product_list_preview.dart` * `product_list_preview_helper.dart` Impacted files: * `abstract_dao.dart`: added hive related init methods * `barcode_product_query.dart`: minor refactoring * `category_product_query.dart`: minor refactoring * `continuous_scan_model.dart`: minor refactoring * `dao_product.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand! * `dao_product_list.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand! * `dao_string_list.dart` (renamed from `search_history.dart`): rewritten from scratch with hive instead of sqflite * `database_product_list_supplier.dart`: minor refactoring * `group_product_query.dart`: minor refactoring * `history_page.dart`: minor refactoring * `keywords_product_query.dart`: minor refactoring * `local_database.dart`: rewritten from scratch with hive instead of sqflite; simplified * `main.dart`: minor refactoring * `new_product_page.dart`: minor refactoring * `personalized_ranking_page.dart`: removed old feature * `product_list.dart`: preferred `enum` to `String` for types; removed tons of old features * `product_list_dialog_helper.dart`: removed old feature * `product_list_item_simple.dart`: removed old features * `product_list_page.dart`: removed old features * `product_page.dart`: removed old feature * `product_query_page_helper.dart`: cleaner code with `enum`s * `pubspec.yaml`: added hive, removed sqflite * `query_product_list_supplier.dart`: minor refactoring * `search_history_view.dart`: minor refactoring * `search_page.dart`: minor refactoring
18 lines
475 B
Dart
18 lines
475 B
Dart
import 'package:smooth_app/database/local_database.dart';
|
|
|
|
/// DAO abstraction
|
|
abstract class AbstractDao {
|
|
AbstractDao(this.localDatabase);
|
|
|
|
final LocalDatabase localDatabase;
|
|
|
|
/// Where the specific `registerAdapter` hive related method is called.
|
|
///
|
|
/// Must be called before all hive box openings.
|
|
/// May be empty for types already taken into account, e.g. StringList
|
|
void registerAdapter();
|
|
|
|
/// Best place to open a hive box.
|
|
Future<void> init();
|
|
}
|