feat : new segment logic
This commit is contained in:
@@ -14,7 +14,7 @@ class OverlayDropdownWidget<T> extends StatefulWidget {
|
||||
final Widget Function(T? selected) labelBuilder;
|
||||
final void Function(T selected)? onChanged;
|
||||
final EdgeInsets? contentPadding;
|
||||
|
||||
final bool isDisabled;
|
||||
const OverlayDropdownWidget({
|
||||
super.key,
|
||||
required this.items,
|
||||
@@ -27,6 +27,7 @@ class OverlayDropdownWidget<T> extends StatefulWidget {
|
||||
this.height,
|
||||
this.background,
|
||||
this.hasDropIcon = true,
|
||||
this.isDisabled = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -123,9 +124,11 @@ class _OverlayDropdownState<T> extends State<OverlayDropdownWidget<T>> {
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
key: _key,
|
||||
onTap: () {
|
||||
_isOpen.value ? _removeOverlay() : _showOverlay();
|
||||
},
|
||||
onTap: widget.isDisabled
|
||||
? null
|
||||
: () {
|
||||
_isOpen.value ? _removeOverlay() : _showOverlay();
|
||||
},
|
||||
child: Container(
|
||||
height: widget.height?.toDouble() ?? 40,
|
||||
width: Get.width,
|
||||
|
||||
Reference in New Issue
Block a user