File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 2
2
import 'package:flutter/material.dart' ;
3
3
import 'package:scouting_platform/components/navigation/NavigationSidebar.dart' ;
4
4
import 'package:scouting_platform/styles/AppStyle.dart' ;
5
+ import 'package:scouting_platform/utils/data/values/SettingValues.dart' ;
5
6
import 'package:scouting_platform/utils/helpers/UIHelper.dart' ;
6
7
import 'package:scouting_platform/utils/data/constants/AppConstants.dart' ;
7
8
@@ -26,6 +27,12 @@ class _PlatformRouteState extends State<PlatformRoute> {
26
27
void initState () {
27
28
super .initState ();
28
29
_loadColor ();
30
+ if (! SettingValues .isTeamListenerRegistered) {
31
+ SettingValues .isTeamListenerRegistered = true ;
32
+ Stream .periodic (Duration (seconds: 1 )).listen ((_) {
33
+ _loadColor ();
34
+ });
35
+ }
29
36
}
30
37
31
38
void _loadColor () async {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class SettingValues {
10
10
TextEditingController (text: AppConstants .defaultEventID);
11
11
static TextEditingController fileName =
12
12
TextEditingController (text: AppConstants .defaultFileName);
13
+ static bool isTeamListenerRegistered = false ;
13
14
14
15
static String isTeamNumberEditable = "No" ;
15
16
static bool isTeamNumberReadOnly = true ;
You can’t perform that action at this time.
0 commit comments