AdeptTextAutoComplete<T> constructor

AdeptTextAutoComplete<T>({
  1. Key? key,
  2. AdeptTextAutoCompleteTheme? theme,
  3. required String label,
  4. String hintText = "",
  5. required TextEditingController txtCon,
  6. required List getList(
    1. String
    ),
  7. required String getText(
    1. T
    ),
  8. required dynamic onChanged(
    1. T?
    ),
  9. bool isRequired = false,
  10. EdgeInsets? padding,
  11. bool filterCondition(
    1. T,
    2. String
    )?,
})

Constructor allows you to define styling and value properties.

Implementation

AdeptTextAutoComplete(
    {super.key,
    AdeptTextAutoCompleteTheme? theme,
    required this.label,
    this.hintText = "",
    required this.txtCon,
    required this.getList,
    required this.getText,
    required this.onChanged,
    this.isRequired = false,
    EdgeInsets? padding,
    bool Function(T, String)? filterCondition})
    : theme = theme ?? AdeptTextAutoCompleteTheme(),
      filterCondition = filterCondition ??
          ((t, txt) => getText(t).toLowerCase().contains(txt.toLowerCase()));