CLTextField.search constructor

CLTextField.search({
  1. Key? key,
  2. required TextEditingController controller,
  3. String labelText = 'Cerca',
  4. FocusNode? focusNode,
  5. Future onChanged(
    1. String value
    )?,
  6. bool isEnabled = true,
  7. bool isCompact = false,
  8. bool isRounded = true,
})

Campo ricerca stile Foundation: recess L2 (fill grigio incassato), icona search, pill arrotondata. Per toolbar di tabelle/liste — NON per i form.

Implementation

factory CLTextField.search({
  Key? key,
  required TextEditingController controller,
  String labelText = 'Cerca',
  FocusNode? focusNode,
  Future Function(String value)? onChanged,
  bool isEnabled = true,
  bool isCompact = false,
  bool isRounded = true,
}) =>
    CLTextField(
      key: key,
      controller: controller,
      labelText: labelText,
      focusNode: focusNode,
      onChanged: onChanged,
      isEnabled: isEnabled,
      isCompact: isCompact,
      isRounded: isRounded,
      recessed: true,
      prefixIcon: const Icon(Icons.search, size: 16, color: Colors.grey),
    );