BaseFieldSelect constructor
const
BaseFieldSelect({
- Key? key,
- String? label,
- Option? selected,
- double fontSize = 18,
- TextAlign textAlign = TextAlign.start,
- FontWeight fontWeight = FontWeight.bold,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12),
- List<
Option> options = const [], - String placeholder = 'Select an item',
- double? placeholderFontSize = 18,
- MainAxisAlignment placeholderTextAlign = MainAxisAlignment.start,
- FontWeight placeholderFontWeight = FontWeight.bold,
- EdgeInsets placeholderPadding = EdgeInsets.zero,
- double? width,
- double height = 40,
- Border? border,
- BorderRadiusGeometry? borderRadius,
- Color? background,
- Widget renderOption(
- Option option,
- dynamic onPressed()
- bool? isError,
- void onChanged()?,
Implementation
const BaseFieldSelect({
super.key,
// label
this.label,
// value
this.selected,
this.fontSize = 18,
this.textAlign = TextAlign.start,
this.fontWeight = FontWeight.bold,
this.padding = const EdgeInsets.symmetric(
horizontal: 12,
),
this.options = const [],
// placeholder
this.placeholder = 'Select an item',
this.placeholderFontSize = 18,
this.placeholderTextAlign = MainAxisAlignment.start,
this.placeholderFontWeight = FontWeight.bold,
this.placeholderPadding = EdgeInsets.zero,
// appearance
this.width,
this.height = 40,
this.border,
this.borderRadius,
this.background,
this.renderOption,
this.isError,
// behaviour
this.onChanged,
});