MDropDown<T> constructor
MDropDown<T> ({
- Key? key,
- required ValueChanged<
T?> onChanged, - required RetreiveTitle<
T> itemTitle, - bool inFill = true,
- Widget prefix(
- T? itemImage
- TextStyle? titleStyle,
- TextStyle? hintStyle,
- TextStyle? optionStyle,
- TextStyle? selectedStyle,
- AlignmentGeometry alignment = AlignmentDirectional.centerStart,
- Widget selectedItem(
- T? itemImage
- Widget optionItem(
- T? itemImage
- EdgeInsetsGeometry? dropdownPadding = const MPadding.set(horizontal: 21.0, vertical: 6.0),
- EdgeInsetsGeometry? titlePadding = const MPadding.set(vertical: 12.0),
- String? title,
- Color? titleColor,
- double? height,
- List<
T> options = const [], - bool removeBorder = true,
- bool isDense = false,
- String? hint = "",
- bool isCenter = false,
- T? setInitial,
- bool check = false,
- bool isExpanded = true,
- Color? iconColor,
- double? itemHeight,
- Color? textColor,
- double textSize = 20,
- double titleSize = 20,
- int elevation = 2,
- Color? dropdownColor,
- Color? borderColor,
- Color? hintColor,
- FontWeight? titleWeight,
- FontWeight? textWeight,
- Color? backgroundColor,
- Color? selectedItemColor,
- double iconSize = 12.0,
- double borderRadius = 5.0,
- bool hideDropdown = false,
Implementation
MDropDown({
Key? key,
required this.onChanged,
required this.itemTitle,
this.inFill = true,
this.prefix,
this.titleStyle,
this.hintStyle,
this.optionStyle,
this.selectedStyle,
this.menuMaxHeight,
this.alignment = AlignmentDirectional.centerStart,
this.selectedItem,
this.optionItem,
this.dropdownPadding = const MPadding.set(horizontal: 21.0, vertical: 6.0),
this.titlePadding = const MPadding.set(vertical: 12.0),
this.title,
this.titleColor,
this.height,
this.options = const [],
this.removeBorder = true,
this.isDense = false,
this.hint = "",
this.isCenter = false,
this.setInitial,
this.check = false,
this.isExpanded = true,
this.iconColor,
this.itemHeight,
this.textColor,
this.textSize = 20,
this.titleSize = 20,
this.elevation = 2,
this.dropdownColor,
this.borderColor,
this.hintColor,
this.titleWeight,
this.textWeight,
this.backgroundColor,
this.selectedItemColor,
this.iconSize = 12.0,
this.borderRadius = 5.0,
this.hideDropdown = false,
}) : super(key: key);