⌂
›
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_hintalways_call_on_tapanimate_cursor_opacity— Animates cursor opacity changes.autocorrectautofill_hintsautofocus— Requests focus when first shown.bgcolor— Background color.blend_modeborder— Border definition.border_color— Border color.border_radius— Corner radius.border_width— Border thickness.can_request_focuscan_reveal_passwordcapitalizationclear_button_semantics_labelclear_button_visibility_modeclip_behavior— How content overflowing the bounds is clipped.collapsedcolor— Foreground color.content_padding— Content padding.countercounter_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.denseenable_ime_personalized_learningenable_interactive_selectionenable_stylus_handwritingenable_suggestionserrorerror_max_lineserror_style— Error style.fill_color— Fill color.filledfit_parent_sizefocus_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.gradienthelperhelper_max_lineshelper_style— Helper style.hint_fade_durationhint_max_lineshint_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_pointersignore_up_down_keysimageinput_filterkeyboard_brightnesskeyboard_type— On-screen keyboard type (e.g. number, email).label— Text label shown for the control.label_style— Label style.max_lengthmax_linesmin_linesmouse_cursor— Cursor shown when hovering the control.multiline— Allows multiple lines of input when true.obscuring_characterpadding— Inner spacing between the border and the content.password— Obscures the entered text when true.placeholder_style— Placeholder style.placeholder_text— Placeholder text.prefixprefix_icon— Prefix icon.prefix_icon_size_constraintsprefix_style— Prefix style.prefix_visibility_moderead_only— Prevents editing while still allowing selection.scroll_padding— Scroll padding.selectionselection_color— Selection color.shadowsshift_entershow_cursorsize_constraints— Min/max size constraints.smart_dashes_typesmart_quotes_typestrut_style— Strut style.suffixsuffix_icon— Suffix icon.suffix_icon_size_constraintssuffix_style— Suffix style.suffix_visibility_modetext_aligntext_sizetext_style— Text style.text_vertical_alignvalue— 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