BloomNativeInputHost class
Persistent native input controller host that manages software keyboard focus and cursor stability.
Wraps a Flutter TextField configured with the computed styles (BloomComputedStyle)
derived from Tailwind-like CSS classes and inline styles on <input> and <textarea> elements.
Example:
BloomNativeInputHost(
initialValue: 'user@example.com',
placeholder: 'Enter email...',
style: BloomStyleResolver.resolve('p-2 bg-zinc-800 text-white rounded-md'),
onInput: (event) => print('Typing: ${event.value}'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BloomNativeInputHost
Constructors
- BloomNativeInputHost({Key? key, String? initialValue, String? placeholder, bool isPassword = false, int maxLines = 1, required BloomComputedStyle style, void onInput(BloomEvent)?, void onChange(BloomEvent)?})
-
Creates a BloomNativeInputHost widget.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → String?
-
Initial text value populated in the text editing controller.
final
- isPassword → bool
-
Whether characters should be masked for password input (defaults to false).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxLines → int
-
Maximum number of lines for multi-line inputs (e.g. 3 for textarea, 1 for input).
final
- onChange → void Function(BloomEvent)?
-
Event callback invoked when editing completes or value changes.
final
- onInput → void Function(BloomEvent)?
-
Event callback invoked on every input keystroke.
final
- placeholder → String?
-
Placeholder hint text rendered when the field is empty.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → BloomComputedStyle
-
Computed style containing fonts, colors, padding, and border radius.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BloomNativeInputHost> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited