@@ -49,14 +49,14 @@ class _OcdTrackerScreenState extends ConsumerState<OcdTrackerScreen> {
4949 Padding (
5050 padding: const EdgeInsets .only (right: 12.0 ),
5151 child: Container (
52- width: 260 ,
53- margin: const EdgeInsets .symmetric (vertical: 6 ),
5452 decoration: BoxDecoration (
5553 color: theme.colorScheme.onSurface.withOpacity (0.05 ),
56- borderRadius: BorderRadius .circular (10 ),
54+ borderRadius: BorderRadius .circular (8 ),
55+ border: Border .all (color: theme.dividerColor),
5756 ),
5857 padding: const EdgeInsets .all (3 ),
5958 child: Row (
59+ mainAxisSize: MainAxisSize .min,
6060 children: [
6161 _TypeOption (
6262 label: 'Obsessions' ,
@@ -115,28 +115,28 @@ class _HighDistressToggle extends StatelessWidget {
115115 child: Container (
116116 decoration: BoxDecoration (
117117 borderRadius: BorderRadius .circular (8 ),
118- border: Border .all (color: isSelected ? Colors .redAccent .withOpacity (0.5 ) : theme.dividerColor),
118+ border: Border .all (color: isSelected ? theme.colorScheme.primary .withOpacity (0.5 ) : theme.dividerColor),
119119 ),
120120 child: AnimatedContainer (
121121 duration: const Duration (milliseconds: 200 ),
122122 padding: const EdgeInsets .symmetric (horizontal: 12 , vertical: 8 ),
123123 decoration: BoxDecoration (
124- color: isSelected ? Colors .redAccent .withOpacity (0.1 ) : Colors .transparent,
124+ color: isSelected ? theme.colorScheme.primary .withOpacity (0.1 ) : Colors .transparent,
125125 borderRadius: BorderRadius .circular (8 ),
126126 ),
127127 child: Row (
128128 mainAxisSize: MainAxisSize .min,
129129 children: [
130130 Icon (
131- LineIcons .exclamationTriangle,
132- size: 18 ,
133- color: isSelected ? Colors .redAccent : theme.colorScheme.onSurface.withOpacity (0.4 )
131+ isSelected ? LineIcons .filter : LineIcons .filter,
132+ size: 16 ,
133+ color: isSelected ? theme.colorScheme.primary : theme.colorScheme.onSurface.withOpacity (0.4 )
134134 ),
135135 if (isSelected) ...[
136- const SizedBox (width: 8 ),
137- const Text (
138- 'HIGH DISTRESS' ,
139- style: TextStyle (color: Colors .redAccent , fontSize: 10 , fontWeight: FontWeight .w800, letterSpacing : 0.5 )
136+ const SizedBox (width: 6 ),
137+ Text (
138+ '7+' ,
139+ style: TextStyle (color: theme.colorScheme.primary , fontSize: 11 , fontWeight: FontWeight .w800)
140140 ),
141141 ]
142142 ],
@@ -170,37 +170,29 @@ class _TypeOptionState extends State<_TypeOption> {
170170
171171 @override
172172 Widget build (BuildContext context) {
173- return Expanded (
174- child: MouseRegion (
175- cursor: SystemMouseCursors .click,
176- onEnter: (_) => setState (() => _isHovered = true ),
177- onExit: (_) => setState (() => _isHovered = false ),
178- child: GestureDetector (
179- onTap: widget.onTap,
180- child: Container (
181- decoration: BoxDecoration (
182- color: widget.isSelected ? widget.theme.colorScheme.primary : Colors .transparent,
183- borderRadius: BorderRadius .circular (8 ),
184- ),
185- child: AnimatedContainer (
186- duration: const Duration (milliseconds: 200 ),
187- padding: const EdgeInsets .symmetric (vertical: 8 ),
188- decoration: BoxDecoration (
189- color: ! widget.isSelected && _isHovered
190- ? widget.theme.colorScheme.onSurface.withOpacity (0.05 )
173+ return MouseRegion (
174+ cursor: SystemMouseCursors .click,
175+ onEnter: (_) => setState (() => _isHovered = true ),
176+ onExit: (_) => setState (() => _isHovered = false ),
177+ child: GestureDetector (
178+ onTap: widget.onTap,
179+ child: AnimatedContainer (
180+ duration: const Duration (milliseconds: 200 ),
181+ padding: const EdgeInsets .symmetric (horizontal: 14 , vertical: 6 ),
182+ decoration: BoxDecoration (
183+ color: widget.isSelected
184+ ? widget.theme.colorScheme.primary
185+ : _isHovered
186+ ? widget.theme.colorScheme.onSurface.withOpacity (0.05 )
191187 : Colors .transparent,
192- borderRadius: BorderRadius .circular (8 ),
193- ),
194- child: Center (
195- child: Text (
196- widget.label,
197- style: TextStyle (
198- fontSize: 13 ,
199- fontWeight: FontWeight .w700,
200- color: widget.isSelected ? widget.theme.colorScheme.onPrimary : widget.theme.colorScheme.onSurface.withOpacity (_isHovered ? 0.7 : 0.4 ),
201- ),
202- ),
203- ),
188+ borderRadius: BorderRadius .circular (6 ),
189+ ),
190+ child: Text (
191+ widget.label,
192+ style: TextStyle (
193+ fontSize: 12 ,
194+ fontWeight: FontWeight .w600,
195+ color: widget.isSelected ? widget.theme.colorScheme.onPrimary : widget.theme.colorScheme.onSurface.withOpacity (_isHovered ? 0.7 : 0.4 ),
204196 ),
205197 ),
206198 ),
0 commit comments