AdeptDropDownButton<T> constructor
AdeptDropDownButton<T> ({
- AdeptValueController<
T> ? controller, - String? label,
- bool useTextUnspecified = true,
- String? textUnspecified,
- List<
String?> ? entries, - List<
T?> ? entryValues, - Key? key,
- T? value,
- Widget? hint,
- Widget? disabledHint,
- ValueChanged<
T> ? onChanged, - int elevation = 8,
- TextStyle? style,
- Widget? underline,
- Widget? icon,
- Color? iconDisabledColor,
- Color? iconEnabledColor,
- double iconSize = 24.0,
- bool isDense = false,
- bool isExpanded = false,
Implementation
AdeptDropDownButton({
this.controller,
this.label,
this.useTextUnspecified = true,
this.textUnspecified,
this.entries,
this.entryValues,
this.key,
this.value,
this.hint,
this.disabledHint,
this.onChanged,
this.elevation = 8,
this.style,
this.underline,
this.icon,
this.iconDisabledColor,
this.iconEnabledColor,
this.iconSize = 24.0,
this.isDense = false,
this.isExpanded = false,
}) : super() {
assert(entries != null);
assert(entryValues != null);
assert(entries!.length == entryValues!.length);
textUnspecified ??= "Unspecified";
label ??= "";
if (useTextUnspecified) {
entries!.insert(0, textUnspecified);
entryValues!.insert(0, null);
}
controller ??= AdeptValueController(value: entryValues![0]);
}