Skip to content

custom checkbox show error #32

@himanshu64

Description

@himanshu64

`The following NoSuchMethodError was thrown while handling a gesture:
The method 'selection' was called on null.
Receiver: null
Tried calling: selection()

When the exception was thrown, this was the stack
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 _FilterModalState.build.
package:frisk/widgets/filterModal.dart:302
#2 _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:993
#3 _InkResponseState.build.
package:flutter/…/material/ink_well.dart:1111
#4 GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:183
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#8e1c9
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(265.5, 654.4)
finalLocalPosition: Offset(245.5, 31.0)
button: 1
sent tap down
═════════════════════════
GlobalKey<CustomGroupedCheckboxState> _customCheckBoxKey =
GlobalKey<CustomGroupedCheckboxState>();
Flexible(
child: Container(
height: MediaQuery.of(context).size.height * 0.50,
child: CustomGroupedCheckbox(
key: _customCheckBoxKey,
itemBuilder: (ctx, index, tag) {
return Card(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Flexible(
child: Align(
alignment: Alignment.centerLeft,
child: Text("${_tags[index].name}"),
),
),
Opacity(
opacity: tag ? 1 : 0,
child: Icon(
Icons.check,
color: Constants.FPrimary,
size: 24,
),
),
],
),
),
);
},
groupTitle: Padding(
padding: const EdgeInsets.only(left: 15),
child: Align(
alignment: Alignment.centerLeft,
child: Text(
"Remove Stuff",
style: Constants.myStyle.copyWith(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Constants.FriskBlack),
),
),
),
values: _tags,
isMultipleSelection: true,
itemCount: _tags.length,
),
),
),

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions