|
|
|
@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
import 'package:test_sa/extensions/enum_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/enum_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
|
|
|
import 'package:test_sa/extensions/text_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
import 'package:test_sa/new_views/app_style/app_text_style.dart';
|
|
|
|
import 'package:test_sa/new_views/app_style/app_text_style.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_loading_manager.dart';
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_loading_manager.dart';
|
|
|
|
@ -262,7 +263,7 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
|
|
|
|
isExpanded: true,
|
|
|
|
isExpanded: true,
|
|
|
|
hint: Text(
|
|
|
|
hint: Text(
|
|
|
|
isEmpty || widget.enabled == false ? context.translation.noDataFound : context.translation.select,
|
|
|
|
isEmpty || widget.enabled == false ? context.translation.noDataFound : context.translation.select,
|
|
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
|
|
style: AppTextStyles.heading5.copyWith(color: AppColor.textStyleColor(context)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 12),
|
|
|
|
style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 12),
|
|
|
|
underline: const SizedBox.shrink(),
|
|
|
|
underline: const SizedBox.shrink(),
|
|
|
|
@ -280,11 +281,11 @@ class _SingleItemDropDownMenuState<T extends Base, X extends LoadingListNotifier
|
|
|
|
items: ((X == NullableLoadingProvider) ? widget.staticData : provider?.items as List<T>)?.map<DropdownMenuItem<T>>((value) {
|
|
|
|
items: ((X == NullableLoadingProvider) ? widget.staticData : provider?.items as List<T>)?.map<DropdownMenuItem<T>>((value) {
|
|
|
|
return DropdownMenuItem<T>(
|
|
|
|
return DropdownMenuItem<T>(
|
|
|
|
value: value,
|
|
|
|
value: value,
|
|
|
|
child: Text(
|
|
|
|
child: Text(value.name ?? "", // Null-aware operator for value.name
|
|
|
|
value.name ?? "", // Null-aware operator for value.name
|
|
|
|
|
|
|
|
maxLines: 1,
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10),
|
|
|
|
style: AppTextStyles.heading5.copyWith(color: AppColor.textStyleColor(context))
|
|
|
|
|
|
|
|
// Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}).toList(),
|
|
|
|
}).toList(),
|
|
|
|
|