19 lines
587 B
Dart
Executable File
19 lines
587 B
Dart
Executable File
// lib/config/theme/theme_provider.dart
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:uae_stat/config/theme/app_theme.dart';
|
|
|
|
final themeProvider = StateNotifierProvider<ThemeNotifier, ThemeMode>((ref) {
|
|
return ThemeNotifier();
|
|
});
|
|
|
|
class ThemeNotifier extends StateNotifier<ThemeMode> {
|
|
ThemeNotifier() : super(ThemeMode.light);
|
|
|
|
/// Theme switching is disabled. Keep legacy callers working by forcing light.
|
|
void updateTheme(AppTheme theme, Brightness platformBrightness) {
|
|
state = ThemeMode.light;
|
|
}
|
|
}
|