searchField method

Widget searchField(
  1. String? label,
  2. TextEditingController? controller,
  3. FocusNode focusNode,
  4. BuildContext context, {
  5. TextInputType? keyboardType,
  6. TextCapitalization? textCapitalization,
  7. TextInputAction? textInputAction,
  8. FocusNode? nextFocusNode,
  9. Color? colorText,
  10. Color? bgColor,
  11. bool? expands,
  12. String? hint,
  13. dynamic onChange(
    1. String
    )?,
  14. dynamic onSubmit(
    1. String
    )?,
  15. int? maxLines,
  16. Widget? suffixIcon,
  17. int? minLines,
  18. List<TextInputFormatter>? inputFormatters,
  19. bool loading = false,
  20. bool enabled = true,
  21. bool? ignorePointer = false,
  22. bool? showPrefixSeparator = false,
  23. bool? showSuffixSeparator = false,
})

Implementation

Widget searchField(
    String? label,
    TextEditingController? controller,
    FocusNode focusNode,
    BuildContext context, {
      TextInputType? keyboardType,
      TextCapitalization? textCapitalization,
      TextInputAction? textInputAction,
      FocusNode? nextFocusNode,
      Color? colorText,
      Color? bgColor,
      bool? expands,
      String? hint,
      Function(String)? onChange,
      Function(String)? onSubmit,
      int? maxLines,
      Widget? suffixIcon,
      int? minLines,
      List<TextInputFormatter>? inputFormatters,
      bool loading = false,
      bool enabled = true,
      bool? ignorePointer = false,
      bool? showPrefixSeparator = false,
      bool? showSuffixSeparator = false,
    }) {
  return CustomTextField(label, controller, focusNode,
    enabled: enabled,
    keyboardType: keyboardType,
    textCapitalization: textCapitalization,
    textInputAction: textInputAction,
    nextFocusNode: nextFocusNode,
    suffixIcon: suffixIcon,
    prefixIcon: Icon(Icons.search, color: colorText,),
    colorText: colorText,
    expands: expands,
    hint: hint,
    onChange: onChange,
    onSubmit: onSubmit,
    maxLines: maxLines,
    minLines: minLines,
    inputFormatters: inputFormatters,
    borderColor: Colors.transparent,
    bgColor: bgColor ?? Theme.of(context).inputDecorationTheme.fillColor,
    loading: loading,
    ignorePointer: ignorePointer,
    showPrefixSeparator: showPrefixSeparator,
    showSuffixSeparator: showSuffixSeparator,
  );
}