AdeptDropDownButton<T> constructor

AdeptDropDownButton<T>({
  1. AdeptValueController<T>? controller,
  2. String? label,
  3. bool useTextUnspecified = true,
  4. String? textUnspecified,
  5. List<String?>? entries,
  6. List<T?>? entryValues,
  7. Key? key,
  8. T? value,
  9. Widget? hint,
  10. Widget? disabledHint,
  11. ValueChanged<T>? onChanged,
  12. int elevation = 8,
  13. TextStyle? style,
  14. Widget? underline,
  15. Widget? icon,
  16. Color? iconDisabledColor,
  17. Color? iconEnabledColor,
  18. double iconSize = 24.0,
  19. bool isDense = false,
  20. 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]);
}