fix(03-03): resolve dart analyze warnings in test files
- Remove unused drift import in daily_plan_dao_test - Fix unused local variable in tasks_dao_test - Switch ProviderScope to UncontrolledProviderScope in home_screen_test and app_shell_test to resolve riverpod_lint scoped_providers warning Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,16 +52,21 @@ TaskWithRoom _makeTaskWithRoom({
|
||||
}
|
||||
|
||||
/// Build the app with dailyPlanProvider overridden to the given state.
|
||||
///
|
||||
/// Uses [UncontrolledProviderScope] with a [ProviderContainer] to avoid
|
||||
/// the riverpod_lint scoped_providers_should_specify_dependencies warning.
|
||||
Widget _buildApp(DailyPlanState planState) {
|
||||
return ProviderScope(
|
||||
overrides: [
|
||||
dailyPlanProvider.overrideWith(
|
||||
(ref) => Stream.value(planState),
|
||||
),
|
||||
roomWithStatsListProvider.overrideWith(
|
||||
(ref) => Stream.value([]),
|
||||
),
|
||||
],
|
||||
final container = ProviderContainer(overrides: [
|
||||
dailyPlanProvider.overrideWith(
|
||||
(ref) => Stream.value(planState),
|
||||
),
|
||||
roomWithStatsListProvider.overrideWith(
|
||||
(ref) => Stream.value([]),
|
||||
),
|
||||
]);
|
||||
|
||||
return UncontrolledProviderScope(
|
||||
container: container,
|
||||
child: MaterialApp.router(
|
||||
routerConfig: router,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
|
||||
Reference in New Issue
Block a user