TF-2084 Add select action hint

(cherry picked from commit 0917989494ba6bba0ce574b7a4498fb69ad791e4)
This commit is contained in:
hieubt
2023-09-24 23:43:26 +07:00
committed by Dat Vu
parent 34c85d183a
commit 9816742b2c
4 changed files with 24 additions and 6 deletions
@@ -32,6 +32,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
final String tooltip;
final double? dropdownWidth;
final double? dropdownMaxHeight;
final String? hintText;
const DropDownButtonWidget({
Key? key,
@@ -50,6 +51,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
this.dropdownMaxHeight,
this.colorButton = Colors.white,
this.tooltip = '',
this.hintText,
}) : super(key: key);
@override
@@ -120,7 +122,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
_getTextItemDropdown(context, item: itemSelected),
style: TextStyle(fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black.withOpacity(opacity)),
color: itemSelected != null ? Colors.black.withOpacity(opacity) : AppColor.textFieldHintColor),
maxLines: 1,
softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow,
@@ -192,6 +194,6 @@ class DropDownButtonWidget<T> extends StatelessWidget {
if (item is ConditionCombiner) {
return item.getTitle(context);
}
return '';
return hintText ?? '';
}
}