fix enable/disable not working with custom widget

This commit is contained in:
Chhaileng Peng
2023-07-06 14:42:52 +07:00
parent 6ee7de3511
commit 4b86567052

View File

@@ -161,7 +161,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
Widget internalWidget; Widget internalWidget;
if (widget.builder != null) { if (widget.builder != null) {
internalWidget = InkWell( internalWidget = InkWell(
onTap: showCountryCodePickerDialog, onTap: widget.enabled ? showCountryCodePickerDialog : null,
child: widget.builder!(selectedItem), child: widget.builder!(selectedItem),
); );
} else { } else {