Files
customer-im-client-dev/apps/im_app/lib/features/settings/di/settings_providers.dart
2026-03-06 15:05:53 +08:00

22 lines
794 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../usecases/set_theme_usecase.dart';
/// Settings feature DI 装配
///
/// 手动装配 UseCase ProviderViewModel 通过此处获取依赖。
///
/// ```
/// ThemeViewModel
/// → ref.read(setThemeUseCaseProvider) ← 此处装配
/// → SetThemeUseCase幂等校验
/// → onApply → ThemeModeNotifier.setMode()(内存 + 持久化 TODO
/// ```
// ── UseCase ───────────────────────────────────────────────────────────────────
/// 设置主题用例 Provider
final setThemeUseCaseProvider = Provider<SetThemeUseCase>(
(_) => const SetThemeUseCase(),
);