Reference

CupertinoTextField

CupertinoTextField

CupertinoTextField control. Build it with the cupertino_text_field helper.

Example

cupertino_text_field(
  value: "Sample",
  label: "Label",
  icon: "add",
  password: true,
  on_click: ->(event) {}
)

Properties

  • adaptive — Adapts to the platform (Material/Cupertino) when true.
  • align_label_with_hint
  • always_call_on_tap
  • animate_cursor_opacity — Animates cursor opacity changes.
  • autocorrect
  • autofill_hints
  • autofocus — Requests focus when first shown.
  • bgcolor — Background color.
  • blend_mode
  • border — Border definition.
  • border_color — Border color.
  • border_radius — Corner radius.
  • border_width — Border thickness.
  • can_request_focus
  • can_reveal_password
  • capitalization
  • clear_button_semantics_label
  • clear_button_visibility_mode
  • clip_behavior — How content overflowing the bounds is clipped.
  • collapsed
  • color — Foreground color.
  • content_padding — Content padding.
  • counter
  • counter_style — Counter style.
  • cursor_color — Cursor color.
  • cursor_error_color — Cursor error color.
  • cursor_height — Cursor height.
  • cursor_radius — Cursor radius.
  • cursor_width — Cursor width.
  • dense
  • enable_ime_personalized_learning
  • enable_interactive_selection
  • enable_stylus_handwriting
  • enable_suggestions
  • error
  • error_max_lines
  • error_style — Error style.
  • fill_color — Fill color.
  • filled
  • fit_parent_size
  • focus_color — Color shown while focused.
  • focused_bgcolor — Focused background color.
  • focused_border_color — Focused border color.
  • focused_border_width — Focused border width.
  • focused_color — Focused color.
  • gradient
  • helper
  • helper_max_lines
  • helper_style — Helper style.
  • hint_fade_duration
  • hint_max_lines
  • hint_style — Hint style.
  • hint_text — Placeholder shown when the field is empty.
  • hover_color — Color shown while hovered.
  • icon — Icon name shown by the control.
  • ignore_pointers
  • ignore_up_down_keys
  • image
  • input_filter
  • keyboard_brightness
  • keyboard_type — On-screen keyboard type (e.g. number, email).
  • label — Text label shown for the control.
  • label_style — Label style.
  • max_length
  • max_lines
  • min_lines
  • mouse_cursor — Cursor shown when hovering the control.
  • multiline — Allows multiple lines of input when true.
  • obscuring_character
  • padding — Inner spacing between the border and the content.
  • password — Obscures the entered text when true.
  • placeholder_style — Placeholder style.
  • placeholder_text — Placeholder text.
  • prefix
  • prefix_icon — Prefix icon.
  • prefix_icon_size_constraints
  • prefix_style — Prefix style.
  • prefix_visibility_mode
  • read_only — Prevents editing while still allowing selection.
  • scroll_padding — Scroll padding.
  • selection
  • selection_color — Selection color.
  • shadows
  • shift_enter
  • show_cursor
  • size_constraints — Min/max size constraints.
  • smart_dashes_type
  • smart_quotes_type
  • strut_style — Strut style.
  • suffix
  • suffix_icon — Suffix icon.
  • suffix_icon_size_constraints
  • suffix_style — Suffix style.
  • suffix_visibility_mode
  • text_align
  • text_size
  • text_style — Text style.
  • text_vertical_align
  • value — The control's current value.

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_animation_end — Fired when an animation completes.
  • on_blur — Fired when the control loses focus.
  • on_change — Fired when the value changes.
  • on_click — Fired when the control is clicked/tapped.
  • on_focus — Fired when the control gains focus.
  • on_selection_change — Fired when the selection range changes.
  • on_size_change — Fired when the control's size changes.
  • on_submit — Fired when the input is submitted.
  • on_tap_outside — Fired when a tap occurs outside the control.

Reference

  • Family: cupertinos
  • Widget type: cupertinotextfield
  • Helper: cupertino_text_field