|
|
|
@ -80,6 +80,7 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
bool isEmpty = ((X == NullableLoadingProvider ? widget.staticData : provider.items)?.isEmpty ?? true);
|
|
|
|
return AppLoadingManager(
|
|
|
|
return AppLoadingManager(
|
|
|
|
isLoading: (X == NullableLoadingProvider) ? false : provider.loading,
|
|
|
|
isLoading: (X == NullableLoadingProvider) ? false : provider.loading,
|
|
|
|
isFailedLoading: (X == NullableLoadingProvider) ? false : provider.items == null,
|
|
|
|
isFailedLoading: (X == NullableLoadingProvider) ? false : provider.items == null,
|
|
|
|
@ -94,7 +95,11 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
|
|
|
|
height: 60.toScreenHeight,
|
|
|
|
height: 60.toScreenHeight,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: context.isDark ? AppColor.neutral50 : Colors.white,
|
|
|
|
color: context.isDark && (widget.enabled == false || isEmpty)
|
|
|
|
|
|
|
|
? AppColor.neutral60
|
|
|
|
|
|
|
|
: (widget.enabled == false || isEmpty)
|
|
|
|
|
|
|
|
? AppColor.neutral40
|
|
|
|
|
|
|
|
: Theme.of(context).cardColor,
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)],
|
|
|
|
boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -118,7 +123,7 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
|
|
|
|
elevation: 0,
|
|
|
|
elevation: 0,
|
|
|
|
isExpanded: true,
|
|
|
|
isExpanded: true,
|
|
|
|
hint: Text(
|
|
|
|
hint: Text(
|
|
|
|
context.translation.select,
|
|
|
|
isEmpty || widget.enabled == false ? context.translation.noDataFound : context.translation.select,
|
|
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
style: TextStyle(color: Theme.of(context).primaryColor),
|
|
|
|
style: TextStyle(color: Theme.of(context).primaryColor),
|
|
|
|
|