|
1 | 1 | import 'package:flutter/material.dart'; |
2 | 2 | import 'package:school_data_hub_flutter/common/theme/app_colors.dart'; |
| 3 | +import 'package:school_data_hub_flutter/core/session/hub_session_manager.dart'; |
3 | 4 | import 'package:school_data_hub_flutter/features/learning/presentation/pupil_competence_list_page/widgets/pupil_learning_content/pupil_learning_content_books.dart'; |
4 | 5 | import 'package:school_data_hub_flutter/features/learning/presentation/pupil_competence_list_page/widgets/pupil_learning_content/pupil_learning_content_competence_goals.dart'; |
5 | 6 | import 'package:school_data_hub_flutter/features/learning/presentation/pupil_competence_list_page/widgets/pupil_learning_content/pupil_learning_content_competence_statuses.dart'; |
@@ -86,79 +87,146 @@ class PupilLearningContentNavBar extends WatchingWidget { |
86 | 87 | Row( |
87 | 88 | mainAxisAlignment: MainAxisAlignment.spaceAround, |
88 | 89 | children: [ |
89 | | - IconButton( |
90 | | - isSelected: selectedContent == SelectedContent.competenceStatuses, |
91 | | - icon: const Icon( |
92 | | - Icons.lightbulb, |
93 | | - color: AppColors.interactiveColor, |
| 90 | + if (di<HubSessionManager>().isTester) |
| 91 | + Column( |
| 92 | + mainAxisSize: MainAxisSize.min, |
| 93 | + children: [ |
| 94 | + IconButton( |
| 95 | + isSelected: |
| 96 | + selectedContent == SelectedContent.competenceStatuses, |
| 97 | + icon: const Icon( |
| 98 | + Icons.lightbulb, |
| 99 | + color: AppColors.interactiveColor, |
| 100 | + ), |
| 101 | + selectedIcon: const Icon( |
| 102 | + Icons.lightbulb, |
| 103 | + color: AppColors.accentColor, |
| 104 | + ), |
| 105 | + onPressed: () { |
| 106 | + if (selectedContent != |
| 107 | + SelectedContent.competenceStatuses) { |
| 108 | + selectedContentNotifier.select( |
| 109 | + SelectedContent.competenceStatuses, |
| 110 | + ); |
| 111 | + |
| 112 | + return; |
| 113 | + } |
| 114 | + }, |
| 115 | + ), |
| 116 | + Text( |
| 117 | + 'Lernspuren', |
| 118 | + style: TextStyle( |
| 119 | + color: |
| 120 | + selectedContent == SelectedContent.competenceStatuses |
| 121 | + ? AppColors.accentColor |
| 122 | + : AppColors.interactiveColor, |
| 123 | + fontSize: 12, |
| 124 | + ), |
| 125 | + ), |
| 126 | + ], |
94 | 127 | ), |
95 | | - selectedIcon: const Icon( |
96 | | - Icons.lightbulb, |
97 | | - color: AppColors.accentColor, |
| 128 | + if (di<HubSessionManager>().isTester) |
| 129 | + Column( |
| 130 | + mainAxisSize: MainAxisSize.min, |
| 131 | + children: [ |
| 132 | + IconButton( |
| 133 | + isSelected: |
| 134 | + selectedContent == SelectedContent.competenceGoals, |
| 135 | + icon: const Icon( |
| 136 | + Icons.emoji_nature_rounded, |
| 137 | + color: AppColors.interactiveColor, |
| 138 | + ), |
| 139 | + selectedIcon: const Icon( |
| 140 | + Icons.emoji_nature_rounded, |
| 141 | + color: AppColors.accentColor, |
| 142 | + ), |
| 143 | + onPressed: () { |
| 144 | + if (selectedContent != SelectedContent.competenceGoals) { |
| 145 | + selectedContentNotifier.select( |
| 146 | + SelectedContent.competenceGoals, |
| 147 | + ); |
| 148 | + |
| 149 | + return; |
| 150 | + } |
| 151 | + }, |
| 152 | + ), |
| 153 | + Text( |
| 154 | + 'Ziele', |
| 155 | + style: TextStyle( |
| 156 | + color: selectedContent == SelectedContent.competenceGoals |
| 157 | + ? AppColors.accentColor |
| 158 | + : AppColors.interactiveColor, |
| 159 | + fontSize: 12, |
| 160 | + ), |
| 161 | + ), |
| 162 | + ], |
98 | 163 | ), |
99 | | - onPressed: () { |
100 | | - if (selectedContent != SelectedContent.competenceStatuses) { |
101 | | - selectedContentNotifier.select( |
102 | | - SelectedContent.competenceStatuses, |
103 | | - ); |
104 | | - |
105 | | - return; |
106 | | - } |
107 | | - }, |
108 | | - ), |
109 | | - // if (di<HubSessionManager>().isTester) |
110 | | - // IconButton( |
111 | | - // isSelected: selectedContent == SelectedContent.competenceGoals, |
112 | | - // icon: const Icon( |
113 | | - // Icons.emoji_nature_rounded, |
114 | | - // color: AppColors.interactiveColor, |
115 | | - // ), |
116 | | - // selectedIcon: const Icon( |
117 | | - // Icons.emoji_nature_rounded, |
118 | | - // color: AppColors.accentColor, |
119 | | - // ), |
120 | | - // onPressed: () { |
121 | | - // if (selectedContent != SelectedContent.competenceGoals) { |
122 | | - // selectedContentNotifier.select( |
123 | | - // SelectedContent.competenceGoals, |
124 | | - // ); |
125 | | - |
126 | | - // return; |
127 | | - // } |
128 | | - // }, |
129 | | - // ), |
130 | | - IconButton( |
131 | | - isSelected: selectedContent == SelectedContent.workbooks, |
132 | | - icon: const Icon( |
133 | | - Icons.note_alt, |
134 | | - color: AppColors.interactiveColor, |
135 | | - ), |
136 | | - selectedIcon: const Icon( |
137 | | - Icons.note_alt, |
138 | | - color: AppColors.accentColor, |
139 | | - ), |
140 | | - onPressed: () { |
141 | | - if (selectedContent != SelectedContent.workbooks) { |
142 | | - selectedContentNotifier.select(SelectedContent.workbooks); |
143 | | - |
144 | | - return; |
145 | | - } |
146 | | - }, |
147 | | - ), |
148 | | - IconButton( |
149 | | - isSelected: selectedContent == SelectedContent.books, |
150 | | - icon: const Icon(Icons.book, color: AppColors.interactiveColor), |
151 | | - selectedIcon: const Icon( |
152 | | - Icons.book, |
153 | | - color: AppColors.accentColor, |
| 164 | + if (di<HubSessionManager>().isTester) |
| 165 | + Column( |
| 166 | + mainAxisSize: MainAxisSize.min, |
| 167 | + children: [ |
| 168 | + IconButton( |
| 169 | + isSelected: selectedContent == SelectedContent.workbooks, |
| 170 | + icon: const Icon( |
| 171 | + Icons.note_alt, |
| 172 | + color: AppColors.interactiveColor, |
| 173 | + ), |
| 174 | + selectedIcon: const Icon( |
| 175 | + Icons.note_alt, |
| 176 | + color: AppColors.accentColor, |
| 177 | + ), |
| 178 | + onPressed: () { |
| 179 | + if (selectedContent != SelectedContent.workbooks) { |
| 180 | + selectedContentNotifier.select( |
| 181 | + SelectedContent.workbooks, |
| 182 | + ); |
| 183 | + |
| 184 | + return; |
| 185 | + } |
| 186 | + }, |
| 187 | + ), |
| 188 | + Text( |
| 189 | + 'Arbeitshefte', |
| 190 | + style: TextStyle( |
| 191 | + color: selectedContent == SelectedContent.workbooks |
| 192 | + ? AppColors.accentColor |
| 193 | + : AppColors.interactiveColor, |
| 194 | + fontSize: 12, |
| 195 | + ), |
| 196 | + ), |
| 197 | + ], |
154 | 198 | ), |
155 | | - onPressed: () { |
156 | | - if (selectedContent != SelectedContent.books) { |
157 | | - selectedContentNotifier.select(SelectedContent.books); |
158 | | - |
159 | | - return; |
160 | | - } |
161 | | - }, |
| 199 | + Column( |
| 200 | + mainAxisSize: MainAxisSize.min, |
| 201 | + children: [ |
| 202 | + IconButton( |
| 203 | + isSelected: selectedContent == SelectedContent.books, |
| 204 | + icon: const Icon( |
| 205 | + Icons.book, |
| 206 | + color: AppColors.interactiveColor, |
| 207 | + ), |
| 208 | + selectedIcon: const Icon( |
| 209 | + Icons.book, |
| 210 | + color: AppColors.accentColor, |
| 211 | + ), |
| 212 | + onPressed: () { |
| 213 | + if (selectedContent != SelectedContent.books) { |
| 214 | + selectedContentNotifier.select(SelectedContent.books); |
| 215 | + |
| 216 | + return; |
| 217 | + } |
| 218 | + }, |
| 219 | + ), |
| 220 | + Text( |
| 221 | + 'Bücher', |
| 222 | + style: TextStyle( |
| 223 | + color: selectedContent == SelectedContent.books |
| 224 | + ? AppColors.accentColor |
| 225 | + : AppColors.interactiveColor, |
| 226 | + fontSize: 12, |
| 227 | + ), |
| 228 | + ), |
| 229 | + ], |
162 | 230 | ), |
163 | 231 | ], |
164 | 232 | ), |
|
0 commit comments