component_base
library
Classes
AccessorMeta <T extends _Descriptor >
ConsumedProps
Provides a list of PropDescriptor s and a top-level list of their keys, for easy access.
MapViewMixin <K , V >
Provides dart.collection.MapView
-like behavior by proxying an internal map.
PropDescriptor
Provides a representation of a single prop
declared within a UiProps subclass or props mixin.
PropsMapViewMixin
Works in conjunction with MapViewMixin to provide dart.collection.MapView
-like
functionality to UiProps subclasses.
PropsMeta
Metadata for the prop fields declared in a specific props class--
a class annotated with @Props
, @PropsMixin
, @AbstractProps
, etc.
for which prop accessors are generated.
PropsMetaCollection
A collection of metadata for the prop fields in all prop mixins
used by a given component.
StateDescriptor
Provides a representation of a single state
declared within a UiState subclass or state mixin.
StateMapViewMixin
Works in conjunction with MapViewMixin to provide dart.collection.MapView
-like
functionality to UiState subclasses.
StateMeta
Metadata for the state fields declared in a specific state class--
a class annotated with @State
, @StateMixin
, @AbstractState
, etc.
for which state accessors are generated.
UiComponent <TProps extends UiProps >
The basis for an over_react component.
UiProps
A dart.collection.MapView
-like class with strongly-typed getters/setters for React props that
is also capable of creating React component instances.
UiState
A dart.collection.MapView
-like class with strongly-typed getters/setters for React state.
UiStatefulComponent <TProps extends UiProps , TState extends UiState >
The basis for a stateful over_react component.
Functions
isComponentOfType (ReactElement ? instance , dynamic typeAlias , {bool traverseWrappers = true , bool matchParentTypes = true })
→ bool
Returns whether instance
is of the type associated with typeAlias
, which can be a component's:
isValidElementOfType (dynamic instance , dynamic typeAlias )
→ bool
Returns whether instance
is a valid ReactElement of the type associated with
typeAlias
, which can be a component's:
registerAbstractComponent (Type abstractComponentClass , {ReactDartComponentFactoryProxy<Component > ? parentType })
→ ReactDartComponentFactoryProxy<Component >
Helper function that wraps registerComponent , and allows an easier way to register abstract components with the
main purpose of type-checking against the abstract component.
registerComponent (Component dartComponentFactory (), {bool isWrapper = false , ReactDartComponentFactoryProxy<Component > ? parentType , UiFactory <UiProps > ? builderFactory , Type ? componentClass })
→ ReactDartComponentFactoryProxy<Component >
Helper function that wraps react.registerComponent, and allows attachment of additional
component factory metadata.
Typedefs
BuilderOnlyUiFactory <TProps extends UiProps >
= TProps Function()
A utility variation on UiFactory , without a backingProps
parameter.
PropsModifier
= dynamic Function(Map props )
Enforces that a function take a single parameter of type Map .
UiFactory <TProps extends UiProps >
= TProps Function([Map ? backingProps ])
A function that returns a new TProps
instance, optionally backed by the specified backingProps
.