File tree Expand file tree Collapse file tree
lib/project_view/configs/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ class _Option extends StatefulWidget {
182182 final Widget ? button;
183183 final bool shouldPadBottom;
184184 final bool enabled;
185+ final GestureTapCallback ? onTap;
185186
186187 const _Option ({
187188 required this .title,
@@ -191,6 +192,7 @@ class _Option extends StatefulWidget {
191192 this .button,
192193 this .shouldPadBottom = false ,
193194 this .enabled = true ,
195+ this .onTap,
194196 });
195197
196198 @override
@@ -224,6 +226,7 @@ class _OptionState extends State<_Option> {
224226 : widget.subtitle,
225227 trailing: widget.button,
226228 tileColor: hovered ? hoverColour : null ,
229+ onTap: widget.onTap,
227230 ),
228231 );
229232
@@ -592,6 +595,11 @@ class ToggleOption extends StatelessWidget {
592595 tristate: ! enabled,
593596 fillColor: ! enabled ? .all (Colors .grey) : null ,
594597 ),
598+ onTap: () {
599+ final bool ? newValue = value;
600+ if (newValue == null ) return ;
601+ onChanged (! newValue);
602+ },
595603 );
596604 }
597605}
You can’t perform that action at this time.
0 commit comments