Ajoute l'espace parent : PIN, grille de règles, historique et annulation.
Phase 2 du MVP Flutter : vérification PIN locale, application des règles par famille, suivi des mouvements et correction avec plancher à 0. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../data/database/app_database.dart';
|
||||
import '../data/models/movement_detail.dart';
|
||||
import '../data/repositories/parent_repository.dart';
|
||||
import 'database_provider.dart';
|
||||
|
||||
final parentRepositoryProvider = Provider<ParentRepository>((ref) {
|
||||
return ParentRepository(ref.watch(databaseProvider));
|
||||
});
|
||||
|
||||
final rulesProvider = FutureProvider<List<Regle>>((ref) async {
|
||||
final repo = ref.watch(parentRepositoryProvider);
|
||||
return repo.listRules();
|
||||
});
|
||||
|
||||
final movementsProvider = FutureProvider<List<MovementDetail>>((ref) async {
|
||||
final repo = ref.watch(parentRepositoryProvider);
|
||||
return repo.listMovements();
|
||||
});
|
||||
Reference in New Issue
Block a user