Skip to content

Commit 4046259

Browse files
committed
Feat: 修改切换颜色无效
1 parent 6aade7d commit 4046259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/style/context_style.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:provider/provider.dart';
33
import 'package:web_demo/style/theme_provider.dart';
44

55
extension ContextStyle on BuildContext {
6-
bool get isDarkTheme => this.read<ThemeProvider>().isDark;
6+
bool get isDarkTheme => this.watch<ThemeProvider>().isDark;
77

88
Color get primaryColor => const Color(0xffEF5138);
99

0 commit comments

Comments
 (0)