Skip to content

Commit

Permalink
Add app database in bootstrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikstonge committed Dec 30, 2024
1 parent 18f1142 commit 2f3ba04
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/bootstrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'cubits/pacings/pacings_cubit.dart';
import 'cubits/settings/settings_cubit.dart';
import 'cubits/teams/teams_cubit.dart';
import 'cubits/timer/timer_cubit.dart';
import 'repositories/database_repository.dart';
import 'repositories/legacy_database_repository.dart';
import 'repositories/matches_repository.dart';
import 'repositories/pacings_repository.dart';
Expand Down Expand Up @@ -69,6 +70,14 @@ class Bootstrapper extends StatelessWidget {
() => LegacyDatabaseRepository(),
),
),
RepositoryProvider(
create: (repositoryContext) => _createOrGetOverride(
() => AppDatabase(
legacyDatabaseRepository: repositoryContext.read<LegacyDatabaseRepository>(),
toasterService: repositoryContext.read<ToasterService>(),
),
),
),
RepositoryProvider(
create: (repositoryContext) => _createOrGetOverride(
() => PacingsRepository(
Expand Down

0 comments on commit 2f3ba04

Please sign in to comment.