make checkboxes checkable when editing

This commit is contained in:
sneurlax 2023-01-06 14:41:51 -06:00
parent 5e15e3e4b0
commit 1e4a39a92c

View file

@ -1120,7 +1120,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
Row(
children: [
GestureDetector(
onTap: !widget.readOnly && trustedCheckbox
onTap: !widget.readOnly /*&& trustedCheckbox*/
? () {
setState(() {
_trusted = !_trusted;
@ -1136,7 +1136,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
width: 20,
height: 20,
child: Checkbox(
fillColor: !widget.readOnly && trustedCheckbox
fillColor: !widget.readOnly /*&& trustedCheckbox*/
? null
: MaterialStateProperty.all(Theme.of(context)
.extension<StackColors>()!
@ -1144,7 +1144,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
value: _trusted,
onChanged: !widget.readOnly && trustedCheckbox
onChanged: !widget.readOnly /*&& trustedCheckbox*/
? (newValue) {
setState(() {
_trusted = newValue!;