From 4b86567052593e127b0df28787042423693bd786 Mon Sep 17 00:00:00 2001 From: Chhaileng Peng Date: Thu, 6 Jul 2023 14:42:52 +0700 Subject: [PATCH] fix enable/disable not working with custom widget --- lib/country_code_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index a2d82a7..7492968 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -161,7 +161,7 @@ class CountryCodePickerState extends State { Widget internalWidget; if (widget.builder != null) { internalWidget = InkWell( - onTap: showCountryCodePickerDialog, + onTap: widget.enabled ? showCountryCodePickerDialog : null, child: widget.builder!(selectedItem), ); } else {