FlintComponent class abstract

Base class for reusable Flint UI components.

Prefer extending StatelessComponent for presentation widgets, or StatefulComponent for components that manage local state or lifecycle. Extending StatelessComponent or StatefulComponent directly makes state preservation explicit and helps developer tools (and AI assistants) reason about the component structure.

Inheritance
Implementers

Constructors

FlintComponent()
Creates a reusable Flint UI component.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isBrowser → bool
Whether this component is currently running in a browser JS runtime.
no setter
isInitialized → bool
Whether ensureInitialized (initProps and initState) has run on this component instance.
no setter
isServer → bool
Whether this component is currently running on the server (SSR / VM).
no setter
preserveState → bool
Whether Flint should preserve this component instance across parent rerenders when the runtime type and tree position match.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach(void scheduleRender()) → void
Attaches the render scheduler used by setState.
build() → View?
Builds this component's renderable output.
didMount() → void
Called after the component is first mounted in the browser DOM.
didUpdate() → void
Called after the component updates following a rerender.
ensureInitialized() → void
Ensures initProps and initState have executed once before build.
initProps() → void
Universal synchronous hook called before initState and build on BOTH the server (SSR) and the browser client.
initState() → void
Universal synchronous lifecycle hook called once before the first build on BOTH the server (SSR) and the browser client.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(FlintStateUpdater update, {bool render = true}) → void
Applies update and schedules this component to render again.
shouldUpdate(covariant FlintComponent next) → bool
Whether this component should rerender when it is updated from a new instance in the parent tree.
toString() → String
A string representation of this object.
inherited
updateFrom(covariant FlintComponent next) → void
Receives the next component instance when Flint preserves this instance.
willUnmount() → void
Called before the component is removed from the tree.

Operators

operator ==(Object other) → bool
The equality operator.
inherited