over_react library
Base classes for UI components and related utilities.
Classes
- $AriaPropsMixin
- This class is present:
- $CssClassPropsMixin
- This class is present:
- $DomPropsMixin
- This class is present:
- $ErrorBoundaryPropsMixin
- This class is present:
- $ErrorBoundaryStateMixin
- This class is present:
- $ReactPropsMixin
- This class is present:
- $ResizeSensorPropsMixin
- This class is present:
- $SvgPropsMixin
- This class is present:
- $TransitionPropsMixin
- This class is present:
- $UbiquitousDomPropsMixin
- This class is present:
- AbstractComponent
-
Annotation used with the
over_react
builder to declare an abstractUiComponent
class for an abstract component. - AbstractComponent2
-
Annotation used with the
over_react
builder to declare an abstractUiComponent2
class for an abstract component. - AbstractProps
-
Annotation used with the
over_react
builder to declare an abstractUiProps
mixin for an abstract component. - AbstractState
-
Annotation used with the
over_react
builder to declare an abstractUiProps
class for an abstract component. -
AbstractTransitionComponent<
T extends AbstractTransitionProps, S extends AbstractTransitionState> - How to use AbstractTransitionComponent:
- AbstractTransitionProps
- AbstractTransitionState
- Accessor
-
Annotation used with the
over_react
builder to customize individual accessors (props/state fields). -
AccessorMeta<
T extends _Descriptor> - AriaPropsMapView
- A MapView with the typed getters/setters for all aria props.
- AriaPropsMixin
-
CallbackUtil<
_> - Base class for generic strongly-typed callback chaining utilities.
- CallbackUtil0Arg
- Generic callback chaining utilities for callbacks with no arguments.
-
CallbackUtil1Arg<
T> - Generic strongly-typed callback chaining utilities for callbacks with one argument.
-
CallbackUtil2Arg<
T1, T2> - Generic strongly-typed callback chaining utilities for callbacks with two arguments.
-
CallbackUtil3Arg<
T1, T2, T3> - Generic strongly-typed callback chaining utilities for callbacks with three arguments.
-
CallbackUtil4Arg<
T1, T2, T3, T4> - Generic strongly-typed callback chaining utilities for callbacks with four arguments.
- ClassNameBuilder
- A StringBuffer-backed CSS class builder optimized for adding classNames, with support for blacklisting CSS classes.
- ClassNameConstant
- A named constant with a helpful string representation that contains a CSS class name value.
- Component
-
Annotation used with the
over_react
builder to declare aUiComponent
class for a component. - Component2
-
Annotation used with the
over_react
builder to declare aUiComponent2
class for a component. - ConsumedProps
- Provides a list of PropDescriptors and a top-level list of their keys, for easy access.
-
ConsumerProps<
TValue> - A typed props class for the Context.Consumer from a Context object created with createContext.
-
Context<
TValue> - The return type of createContext, Wraps ReactContext for use in Dart. Allows access to Provider and Consumer Components.
-
ConvertProp<
Raw, Converted> - Annotation that simplifies prop type conversion by generating getter and setter in the respective getters and setters for the prop in the .over_react.g.dart part file.
- CssClassPropsMapView
-
A
MapView
with typed getters/setters for all CSS-class-related props. - CssClassPropsMixin
- CssValue
-
A CSS length value, with a number and unit component,
for use in CSS properties such as
width
,top
,padding
, etc. - DebugFriendlyConstant
- A named constant with a helpful string representation.
- Dom
-
A class that provides namespacing for static DOM component factory methods, much like
React.DOM
in React JS. - DomProps
- DomPropsMixin
- DummyComponent
- Dummy component useful for:
- DummyComponent2
-
ErrorBoundaryComponent<
T extends ErrorBoundaryProps, S extends ErrorBoundaryState> - ErrorBoundaryProps
- ErrorBoundaryPropsMapView
- A MapView with the typed getters/setters for ErrorBoundaryPropsMixin.
- ErrorBoundaryPropsMixin
- ErrorBoundaryState
- ErrorBoundaryStateMixin
- Factory
-
Annotation used with the
over_react
builder to declare aUiFactory
for a component. -
FluxUiComponent<
TProps extends FluxUiProps> -
Builds on top of UiComponent, adding w_flux integration, much like the
FluxComponent
in w_flux. -
FluxUiComponent2<
TProps extends FluxUiProps> -
Builds on top of UiComponent2, adding w_flux integration, much like the
FluxComponent
in w_flux. -
FluxUiProps<
ActionsT, StoresT> - Deprecated. Use FluxUiPropsMixin instead.
-
FluxUiStatefulComponent<
TProps extends FluxUiProps, TState extends UiState> -
Builds on top of UiStatefulComponent, adding
w_flux
integration, much like theFluxComponent
in w_flux. -
FluxUiStatefulComponent2<
TProps extends FluxUiProps, TState extends UiState> -
Builds on top of UiStatefulComponent2, adding
w_flux
integration, much like theFluxComponent
in w_flux. - FragmentProps
- GeneratedClass
- JsBackedMap
- A view into a JavaScript object (jsObject) that conforms to the Dart Map interface.
- KeyValue
- Key values that are returned from SyntheticKeyboardEvent.key.
-
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. - Props
-
Annotation used with the
over_react
builder to declare aUiProps
mixin for a component. -
PropsFactory<
TProps extends UiProps> - Helper class to keep track of props factories used by uiFunction,
- 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.
- PropsMixin
-
Annotation used with the
over_react
builder to declare a mixin for use in aUiProps
class. -
ProviderProps<
TValue> - A typed props class for the Context.Provider from a Context object created with createContext.
- ReactComponentFactoryProxy
- Creates a ReactJS virtual DOM instance (ReactElement on the client).
- ReactElement
- A virtual DOM element representing an instance of a DOM element, React component, or fragment.
- ReactErrorInfo
-
Information on an error caught by
componentDidCatch
. - ReactPropsMixin
-
ReducerHook<
TState, TAction, TInit> -
The return value of
useReducer
. -
Ref<
T> - When this is provided as the ref prop, a reference to the rendered component will be available via current.
- ResizeSensorComponent
- ResizeSensorEvent
- Used with ResizeSensorHandler to provide information about a resize.
- ResizeSensorProps
- ResizeSensorPropsMixin
- ResizeSensorPropsMixinMapView
- A MapView with the typed getters/setters for all HitArea display variation props.
- Role
- Options for WAI-ARIA role values.
- SafeRenderManager
- A class that manages the top-level rendering of a ReactElement into a given node, with support for safely rendering/updating via render and safely unmounting via tryUnmount.
- State
-
Annotation used with the
over_react
builder to declare aUiState
mixin for a component. - StateDescriptor
-
Provides a representation of a single
state
declared within a UiState subclass or state mixin. -
StateHook<
T> -
The return value of
useState
. - 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. - StateMixin
-
Annotation used with the
over_react
builder to declare a mixin for use in aUiState
class. - StrictModeProps
- SuspenseProps
- The concrete props class for the Suspense component.
- SvgProps
- SvgPropsMixin
- SyntheticAnimationEvent
- A SyntheticEvent wrapper that is specifically backed by a AnimationEvent.
- SyntheticClipboardEvent
- A SyntheticEvent wrapper that is specifically backed by a ClipboardEvent.
- SyntheticEvent
- A cross-browser wrapper around the browser's nativeEvent.
- SyntheticFocusEvent
- A SyntheticEvent wrapper that is specifically backed by a FocusEvent.
- SyntheticFormEvent
- A SyntheticEvent wrapper that represents a form event.
- SyntheticKeyboardEvent
- A SyntheticEvent wrapper that is specifically backed by a KeyboardEvent.
- SyntheticMouseEvent
- A SyntheticEvent wrapper that is specifically backed by a MouseEvent.
- SyntheticTouchEvent
- A SyntheticEvent wrapper that is specifically backed by a TouchEvent.
- SyntheticTransitionEvent
- A SyntheticEvent wrapper that is specifically backed by a TransitionEvent.
- SyntheticUIEvent
- A SyntheticEvent wrapper that is specifically backed by a UIEvent.
- SyntheticWheelEvent
- A SyntheticEvent wrapper that is specifically backed by a SyntheticWheelEvent.
- TransitionPropsMapView
- TransitionPropsMixin
- TypedMap
- UbiquitousDomPropsMixin
-
UiComponent<
TProps extends UiProps> - See: component_base.UiComponent
-
UiComponent2<
TProps extends UiProps> -
The basis for an over_react component that is compatible with ReactJS 16 (
react.Component2
). -
UiFactoryConfig<
TProps extends UiProps> - Helper class used to keep track of generated information for uiFunction.
- UiProps
-
A
dart.collection.MapView
-like class with strongly-typed getters/setters for React props that is also capable of creating React component instances. - UiPropsMapView
-
A
MapView
helper that stubs in unimplemented pieces of UiProps. - UiState
-
A
dart.collection.MapView
-like class with strongly-typed getters/setters for React state. -
UiStatefulComponent<
TProps extends UiProps, TState extends UiState> - See: component_base.UiStatefulComponent
-
UiStatefulComponent2<
TProps extends UiProps, TState extends UiState> -
The basis for a stateful over_react component that is compatible with ReactJS 16 (
react.Component2
). - ValidationUtil
- Utility for logging validation errors or warnings.
Enums
- TransitionPhase
- The transition phase of the AbstractTransitionComponent.
Mixins
-
$_ConsumerPropsMixin<
TValue> -
$_ProviderPropsMixin<
TValue> -
$FluxUiPropsMixin<
ActionsT, StoresT> - $SuspensePropsMixin
-
ErrorBoundaryMixin<
T extends ErrorBoundaryPropsMixin, S extends ErrorBoundaryStateMixin> - A component mixin you can use to implement / extend from the behaviors of an ErrorBoundary within a custom component:
-
FluxUiPropsMixin<
ActionsT, StoresT> -
Builds on top of UiProps, adding typed
Action
andStore
props for use with FluxUiComponent2. -
PureComponentMixin<
T extends UiProps> -
A mixin to make a
Component2
instance behave like a ReactJSPureComponent
. - SuspensePropsMixin
-
TypedSnapshot<
TSnapshot> -
Mixin that enforces consistent typing of the
snapshot
parameter returned byComponent2.getSnapshotBeforeUpdate
and passed intoComponent2.componentDidUpdate
. -
UiStatefulMixin2<
TProps extends UiProps, TState extends UiState> - A mixin that allows you to add typed state to a UiComponent2.
Extensions
- DataTransferHelper on SyntheticMouseEvent
- PropsToForward on T
- Helper static extension methods to make forwarding props easier.
- SyntheticEventTypeHelpers on SyntheticEvent
-
UiFactoryHelpers
on UiFactory<
TProps> -
UiFactoryTypeMeta
on UiFactory<
UiProps> - Extensions to allow setting type-checking-related metadata on components.
- UiPropsSelfTypedExtension on T
-
Extension with methods whose typings rely on the current type
T
.
Constants
-
animationEventCallbacks
→ const CallbackUtil1Arg<
SyntheticAnimationEvent> - Provides chaining utilities for AnimationEventCallback.
- callbacks → const CallbackUtil0Arg
- Provides chaining utilities for Callback.
-
clipboardEventCallbacks
→ const CallbackUtil1Arg<
SyntheticClipboardEvent> - Provides chaining utilities for ClipboardEventCallback.
- convertJsMapProp → const _CommonConversionCases
-
Utility version of ConvertProp for map props to generate getters and setters
to convert from
JsMap
toMap
and back. - convertJsRefProp → const _CommonConversionCases
-
Utility version of ConvertProp for ref props to generate getters and setters
to convert from
JsRef
toRef
and back. - defaultErrorBoundaryLoggerName → const String
- defaultTestIdKey → const String
- The string used by default for the key of the attribute added by UiProps.addTestId.
- disableRequiredPropValidation → const _DisableRequiredPropValidation
- Prevents required prop validation from being performed on a prop.
-
domEventCallbacks
→ const CallbackUtil1Arg<
SyntheticEvent> - Provides chaining utilities for DomEventCallback.
-
focusEventCallbacks
→ const CallbackUtil1Arg<
SyntheticFocusEvent> - Provides chaining utilities for FocusEventCallback.
-
formEventCallbacks
→ const CallbackUtil1Arg<
SyntheticFormEvent> - Provides chaining utilities for FormEventCallback.
- horizontalEllipsis → const String
- '…' - The horizontal ellipsis character.
-
inputTypesWithSelectionRangeSupport
→ const List<
String> -
A list of the
type
attribute values for an HTML<input>
element that implement TextInputElementBase. -
keyboardEventCallbacks
→ const CallbackUtil1Arg<
SyntheticKeyboardEvent> - Provides chaining utilities for KeyboardEventCallback.
- middleDot → const String
- '·' - The middle dot character.
-
mouseEventCallbacks
→ const CallbackUtil1Arg<
SyntheticMouseEvent> - Provides chaining utilities for MouseEventCallback.
- multiplicationSign → const String
- '×' - The multiplication sign character.
- nonBreakingSpace → const String
- ' ' - The non-breaking space character.
- nullableRequiredProp → const Accessor
-
Marks a
prop
as required to be set, but allowed to be set explicitly tonull
. - requiredProp → const Accessor
-
Marks a
prop
as required to be set. -
resizeEventCallbacks
→ const CallbackUtil1Arg<
ResizeSensorEvent> - Provides chaining utilities for ResizeSensorHandler.
- toBeGenerated → const _ToBeGenerated
- Annotation that denotes that a given member will be implemented via code generation.
-
touchEventCallbacks
→ const CallbackUtil1Arg<
SyntheticTouchEvent> - Provides chaining utilities for TouchEventCallback.
-
transitionEventCallbacks
→ const CallbackUtil1Arg<
SyntheticTransitionEvent> - Provides chaining utilities for TransitionEventCallback.
-
uiEventCallbacks
→ const CallbackUtil1Arg<
SyntheticUIEvent> - Provides chaining utilities for UIEventCallback.
-
wheelEventCallbacks
→ const CallbackUtil1Arg<
SyntheticWheelEvent> - Provides chaining utilities for WheelEventCallback.
Properties
-
$_Dummy2ComponentFactory
→ ReactDartComponentFactoryProxy2<
Component2> -
final
-
$ErrorBoundaryComponentFactory
→ ReactDartComponentFactoryProxy2<
Component2> -
final
-
$FragmentConfig
→ UiFactoryConfig<
_$$FragmentProps> -
final
- $r → dynamic
-
Returns a reference to the currently selected component in the
React Dev Tools.
no setter
-
$ResizeSensorComponentFactory
→ ReactDartComponentFactoryProxy2<
Component2> -
final
-
$StrictModeConfig
→ UiFactoryConfig<
_$$StrictModeProps> -
final
-
$SuspenseConfig
→ UiFactoryConfig<
_$$SuspenseProps> -
final
- changeSensor → dynamic
-
no setter
- changeSensorMountNode → Element?
-
no setter
-
ErrorBoundary
↔ UiFactory<
ErrorBoundaryProps> -
A higher-order component that will catch ReactJS errors anywhere within the child component tree and
display a fallback UI instead of the component tree that crashed.
getter/setter pair
-
Fragment
→ UiFactory<
FragmentProps> -
Fragment component that allows the wrapping of children without the necessity of using
an element that adds an additional layer to the DOM (div, span, etc).
final
-
onRemChange
→ Stream<
double> -
A Stream of changes to the root font size (rem) value.
final
-
ResizeSensor
↔ UiFactory<
ResizeSensorProps> -
A wrapper component that detects when its parent is resized, providing a ResizeSensorEvent
as a callback argument to ResizeSensorPropsMixin.onResize.
getter/setter pair
- rootFontSize → double
-
The latest component root font size (rem) value, in pixels.
no setter
-
StrictMode
↔ UiFactory<
StrictModeProps> -
A tool for highlighting potential problems in an application.
getter/setter pair
-
Suspense
↔ UiFactory<
SuspenseProps> -
Suspense lets you display a fallback UI until its children have finished loading.
getter/setter pair
Functions
-
ariaProps(
[Map? backingMap]) → AriaPropsMapView - Returns a new AriaPropsMapView, optionally backed by a specified Map.
-
castUiFactory<
T extends UiProps> (dynamic value) → UiFactory< T> -
Casts
value
toUiFactory<T>
, which can be inferred from the surrounding context, allowing you to perform casts of dynamic values without having to repeat the type or worry about how formatting affects ignore comment placement. -
chainRef(
ReactElement element, CallbackRef? newCallbackRef) → CallbackRef? -
Returns a function that chains the callback or createRef-based ref of the provided
element
withnewCallbackRef
. -
chainRefs(
dynamic ref1, dynamic ref2) → dynamic -
Returns a ref that updates both
ref1
andref2
, effectively allowing you to set multiple refs. -
cloneElement(
ReactElement element, [Map? props, Iterable< ReactNode?> ? children]) → ReactElement - Dart wrapper for React.cloneElement.
-
closest(
Element lowerBound, String selector, {Element? upperBound}) → Element? -
Returns the closest element in the hierarchy of
lowerBound
up to an optionalupperBound
(both inclusive) that matchesselector
, ornull
if no matches are found. -
composeHocs<
R> (Iterable< R Function(R)> functions) → R Function(R) - Returns a single HOC instance from multiple of the same instance.
-
createContext<
TValue> ([TValue? defaultValue, int calculateChangedBits(TValue?, TValue?)?]) → Context< TValue?> - Creates a Context object.
-
createContextInit<
TValue> (TValue defaultValue, [int calculateChangedBits(TValue, TValue)?]) → Context< TValue> - Creates a Context object.
-
createPortal(
ReactNode? children, Element container) → ReactPortal -
Returns a portal that renders
children
into acontainer
. -
createRef<
T> () → Ref< T?> - Creates a Ref object that can be attached to a ReactElement via the ref prop.
-
createSyntheticAnimationEvent(
{SyntheticAnimationEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, String? animationName, num? elapsedTime, String? pseudoElement}) → SyntheticAnimationEvent - Returns a newly constructed SyntheticAnimationEvent instance.
-
createSyntheticClipboardEvent(
{SyntheticClipboardEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, Object? clipboardData}) → SyntheticClipboardEvent - Returns a newly constructed SyntheticClipboardEvent instance.
-
createSyntheticCompositionEvent(
{SyntheticCompositionEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, String? data}) → SyntheticCompositionEvent -
Returns a newly constructed
SyntheticCompositionEvent
instance. -
createSyntheticEvent(
{SyntheticEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type}) → SyntheticEvent - Returns a newly constructed SyntheticEvent instance.
-
createSyntheticFocusEvent(
{SyntheticFocusEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, }) → SyntheticFocusEvent - Returns a newly constructed SyntheticFocusEvent instance.
-
createSyntheticFormEvent(
{SyntheticFormEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type}) → SyntheticFormEvent - Returns a newly constructed SyntheticFormEvent instance.
-
createSyntheticKeyboardEvent(
{SyntheticKeyboardEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, bool? altKey, String? char, bool? ctrlKey, String? locale, num? location, String? key, bool? metaKey, bool? repeat, bool? shiftKey, num? keyCode, num? charCode}) → SyntheticKeyboardEvent - Returns a newly constructed SyntheticKeyboardEvent instance.
-
createSyntheticMouseEvent(
{SyntheticMouseEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, bool? altKey, num? button, num? buttons, num? clientX, num? clientY, bool? ctrlKey, Object? dataTransfer, bool? metaKey, num? pageX, num? pageY, num? screenX, num? screenY, bool? shiftKey}) → SyntheticMouseEvent - Returns a newly constructed SyntheticMouseEvent instance.
-
createSyntheticPointerEvent(
{SyntheticPointerEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, num? pointerId, num? width, num? height, num? pressure, num? tangentialPressure, num? tiltX, num? tiltY, num? twist, String? pointerType, bool? isPrimary}) → SyntheticPointerEvent -
Returns a newly constructed
SyntheticPointerEvent
instance. -
createSyntheticTouchEvent(
{SyntheticTouchEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, bool? altKey, Object? changedTouches, bool? ctrlKey, bool? metaKey, bool? shiftKey, Object? targetTouches, Object? touches}) → SyntheticTouchEvent - Returns a newly constructed SyntheticTouchEvent instance.
-
createSyntheticTransitionEvent(
{SyntheticTransitionEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, String? propertyName, num? elapsedTime, String? pseudoElement}) → SyntheticTransitionEvent - Returns a newly constructed SyntheticTransitionEvent instance.
-
createSyntheticUIEvent(
{SyntheticUIEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, num? detail, Object? view}) → SyntheticUIEvent - Returns a newly constructed SyntheticUIEvent instance.
-
createSyntheticWheelEvent(
{SyntheticWheelEvent? baseEvent, bool? bubbles, bool? cancelable, Object? currentTarget, bool? defaultPrevented, void preventDefault()?, void stopPropagation()?, num? eventPhase, bool? isTrusted, Object? nativeEvent, Object? target, num? timeStamp, String? type, num? deltaX, num? deltaMode, num? deltaY, num? deltaZ}) → SyntheticWheelEvent - Returns a newly constructed SyntheticWheelEvent instance.
-
destroyRemChangeSensor(
) → Future< Null> -
A utility that destroys the
_changeSensor
added to the DOM by initRemChangeSensor. -
disableTestMode(
) → void - Disables test mode.
-
domProps(
[Map? backingMap]) → DomProps - Returns a new DomProps, optionally backed by a specified Map.
-
enableTestMode(
) → void - Enables test mode.
-
fakeSyntheticFormEvent(
Element element, String type) → SyntheticFormEvent -
If the consumer specifies a callback like
onChange
on one of our custom form components that are not actually form elements - we still need a valid SyntheticFormEvent to pass as the expected parameter to that callback. -
findDomNode(
dynamic instance) → Element? -
Returns the DOM node associated with a mounted React component
instance
, which can be aReactComponent
/Element orreact.Component2
. -
forwardUnconsumedProps(
Map props, {bool omitReactProps = true, bool onlyCopyDomProps = false, Iterable? keysToOmit, Iterable< Iterable> ? keySetsToOmit, required Map propsToUpdate}) → void -
Adds unconsumed props to a passed in Map reference (
propsToUpdate
). -
forwardUnconsumedPropsV2(
Map props, {bool omitReactProps = true, bool onlyCopyDomProps = false, Iterable? keysToOmit, Iterable< Iterable> ? keySetsToOmit, required Map propsToUpdate}) → void -
Adds unconsumed props to a passed in Map reference (
propsToUpdate
). -
generateGuid(
[int length = 4]) → String -
Returns a random GUID with the given
length
consisting of numbers and uppercase/lowercase letters. -
getActiveElement(
) → Element? -
Returns the currently focused element (Document.activeElement),
or
null
if nothing is focused (e.g. Document.activeElement is BodyElement). -
getBackingMap(
Map map) → Map - Returns the underlying map object of either UiProps or UiState.
-
getDartComponent<
T extends Component> (dynamic instance) → T? -
Returns the native Dart component associated with a mounted component
instance
. -
getInstanceKey(
ReactElement instance) → dynamic -
Returns the ReactElement.key associated with the specified
instance
. -
getInstanceRef(
ReactElement instance) → dynamic -
Returns the ReactElement.ref associated with the specified
instance
. -
getPropKey<
T extends Map> (void accessProp(T keySpy), T factory(Map props)) → String -
Returns the string key of the
factory
prop accessed inaccessProp
. -
getProps(
dynamic instance, {bool traverseWrappers = false}) → Map -
Returns an unmodifiable Map view of props for a ReactElement or composite
ReactComponent
instance
. -
getPropsToForward(
Map props, {bool omitReactProps = true, bool onlyCopyDomProps = false, Iterable? keysToOmit, Iterable< Iterable> ? keySetsToOmit}) → Map -
Returns a copy of the specified
props
map, omitting reserved React props by default, in addition to any specifiedkeysToOmit
orkeySetsToOmit
. -
getSelectionStart(
Element? input) → int? -
Returns the index of the first selected character in
input
. -
initRemChangeSensor(
) → Future< Null> -
isComponentOfType(
ReactElement? instance, dynamic typeAlias, {bool traverseWrappers = true, bool matchParentTypes = true}) → bool -
Returns whether
instance
is of the type associated withtypeAlias
, which can be a component's: -
isDartComponent(
Object? instance) → bool -
Returns whether an
instance
is a native Dart component (a react-dart ReactElement orReactComponent
). -
isDomElement(
dynamic instance) → bool -
Returns whether
instance
is a ReactElement for a DOM node. -
isOrContains(
Element? root, Element? other) → bool -
Returns whether
root
is the same as or contains theother
node. -
isValidElement(
dynamic object) → bool - Dart wrapper for React.isValidElement.
-
isValidElementOfType(
dynamic instance, dynamic typeAlias) → bool -
Returns whether
instance
is a valid ReactElement of the type associated withtypeAlias
, which can be a component's: -
lazy<
TProps extends UiProps> (Future< UiFactory< load(), dynamic _config) → UiFactory<TProps> >TProps> - A HOC that creates a "lazy" component that lets you defer loading a component’s code until it is rendered for the first time.
-
memo<
TProps extends UiProps> (UiFactory< TProps> factory, {bool areEqual(TProps prevProps, TProps nextProps)?, String? displayName}) → UiFactory<TProps> -
A higher order component for function components
that behaves similar to the way
React.PureComponent
does for class-based components. -
newStyleFromProps(
Map? props) → Map< String, dynamic> -
Returns a copy of the DomPropsMixin.style map found in
props
. -
preparePropsChangeset(
ReactElement element, Map? newProps, [Iterable< ReactNode?> ? newChildren]) → dynamic -
Returns a new JS map with the specified props and children changes, properly prepared for consumption by
React JS methods such as
cloneElement
,setProps
, and other methods that accept changesets of props to be merged into existing props. -
prettyPrintMap(
Map map) → String -
Returns a pretty-printed version of
map
, with namespaced keys grouped together. -
propsOrStateMapsEqual(
Map a, Map b) → bool -
Returns whether maps
a
andb
have identical sets of values for the same keys. -
recomputeRootFontSize(
) → void - Forces re-computation of the font size of the HtmlDocument.
-
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.
-
registerAbstractComponent2(
Type abstractComponentClass, {ReactDartComponentFactoryProxy2< Component2> ? parentType}) → ReactDartComponentFactoryProxy2<Component2> - Helper function that wraps registerComponent2, 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.
-
registerComponent2(
Component2 dartComponentFactory(), {bool isWrapper = false, ReactDartComponentFactoryProxy< Component> ? parentType, UiFactory<UiProps> ? builderFactory, Type? componentClass, Iterable<String> skipMethods = const ['getDerivedStateFromError', 'componentDidCatch']}) → ReactDartComponentFactoryProxy2<Component2> - Helper function that wraps react.registerComponent2, and allows attachment of additional component factory metadata.
-
setClientConfiguration(
) → void - Method used to initialize the React environment.
-
setSelectionRange(
Element? input, int start, int end, [String? direction]) → void - Custom implementation to prevent the error that TextInputElementBase.setSelectionRange throws when called on an EmailInputElement or NumberInputElement since ONLY Chrome does not support it.
-
splitSpaceDelimitedString(
String string) → List< String> -
Returns a List of space-delimited tokens efficiently split from the specified
string
. -
supportsSelectionRange(
InputElement element) → bool -
Returns whether the provided
element
supportssetSelectionRange
. -
toPx(
dynamic value, {bool treatNumAsPx = false, bool passThroughUnsupportedUnits = false}) → CssValue? -
Converts a rem
value
to its pixel (px
) equivalent using the current font size found on the HtmlDocument. -
toRem(
dynamic value, {bool treatNumAsRem = false, bool passThroughUnsupportedUnits = false}) → CssValue? -
Converts a pixel (
px
)value
to itsrem
equivalent using the current font size found on the HtmlDocument. -
typedDefaultPropsFor<
T extends UiProps> (UiFactory< T> factory) → T -
Returns a typed view into the unmodifiable default props map for the
component associated with
factory
. -
uiForwardRef<
TProps extends UiProps> (dynamic functionComponent(TProps props, dynamic ref), dynamic _config) → UiFactory< TProps> - Creates a function component capable of forwarding its ref to a component it renders.
-
uiFunction<
TProps extends UiProps> (dynamic functionComponent(TProps props), dynamic _config) → UiFactory< TProps> - Declares a function component and returns a factory that can be used to render it.
-
unindent(
String multilineString) → String -
Allows the use of
'''
string blocks, without having to unindent them when used within something like markdown's markdownToHtml function. -
useCallback<
T extends Function> (T callback, List dependencies) → T -
Returns a memoized version of
callback
that only changes if one of thedependencies
has changed. -
useContext<
T> (Context< T> context) → T -
Returns the value of the nearest Context.Provider for the provided
context
object every time that context is updated. -
useDebugValue<
T> (T value, [dynamic format(T)?]) → dynamic -
Displays
value
as a label for a custom hook in React DevTools. -
useEffect(
dynamic sideEffect(), [List< Object?> ? dependencies]) → void -
Runs
sideEffect
after every completed render of a uiFunction component. -
useImperativeHandle(
dynamic ref, dynamic createHandle(), [List? dependencies]) → void -
Customizes the
ref
value that is exposed to parent components when using uiForwardRef by setting Ref.current to the return value ofcreateHandle
. -
useLayoutEffect(
dynamic sideEffect(), [List< Object?> ? dependencies]) → void -
Runs
sideEffect
synchronously after a dart function component renders, but before the screen is updated. -
useMemo<
T> (T createFunction(), [List? dependencies]) → T -
Returns a memoized version of the return value of
createFunction
. -
useReducer<
TState, TAction, TInit> (TState reducer(TState state, TAction action), TState initialState) → ReducerHook< TState, TAction, TInit> -
Initializes state of a uiFunction component to
initialState
and creates ReducerHook.dispatch method. -
useReducerLazy<
TState, TAction, TInit> (TState reducer(TState state, TAction action), TInit initialArg, TState init(TInit)) → ReducerHook< TState, TAction, TInit> -
Initializes state of a uiFunction component to
init(initialArg)
and creates ReducerHook.dispatch method. -
useRef<
T> ([T? initialValue]) → Ref< T?> - Returns an empty mutable Ref object.
-
useRefInit<
T> (T initialValue) → Ref< T> -
Returns a mutable Ref object with Ref.current property initialized to
initialValue
. -
useState<
T> (T initialValue) → StateHook< T> -
Adds local state to a uiFunction component
by returning a StateHook with StateHook.value initialized to
initialValue
. -
useStateLazy<
T> (T init()) → StateHook< T> -
Adds local state to a uiFunction component
by returning a StateHook with StateHook.value initialized to the return value of
init
. -
wrapNativeKeyboardEvent(
KeyboardEvent nativeEvent) → SyntheticKeyboardEvent - Helper util that wraps a native KeyboardEvent in a SyntheticKeyboardEvent.
-
wrapNativeMouseEvent(
MouseEvent nativeEvent) → SyntheticMouseEvent - Helper util that wraps a native MouseEvent in a SyntheticMouseEvent.
Typedefs
- AnimationEventCallback = dynamic Function(SyntheticAnimationEvent event)
- BoolCallback = dynamic Function(bool value)
-
A generic callback that takes a single
bool
value
. -
BuilderOnlyUiFactory<
TProps extends UiProps> = TProps Function() -
A utility variation on UiFactory, without a
backingProps
parameter. - Callback = dynamic Function()
- A generic callback that takes no arguments.
- Callback0Arg = dynamic Function()
-
Callback1Arg<
T1> = dynamic Function(T1 arg1) -
Callback2Arg<
T1, T2> = dynamic Function(T1 arg1, T2 arg2) -
Callback3Arg<
T1, T2, T3> = dynamic Function(T1 arg1, T2 arg2, T3 arg3) -
Callback4Arg<
T1, T2, T3, T4> = dynamic Function(T1 arg1, T2 arg2, T3 arg3, T4 arg4) - CallbackRef = dynamic Function(dynamic ref)
- A function that, when supplied as ReactPropsMixin.ref, is called with the component instance as soon as it is mounted.
- ClipboardEventCallback = dynamic Function(SyntheticClipboardEvent event)
-
CustomRenderFunction<
T extends UiProps, S extends UiState, C extends UiComponent< UiProps> > = ReactElement? Function(T props, S state, C component) -
A custom rendering prop typedef that allows a custom rendering function to be provided
with the current
props
andstate
of thecomponent
. - DomEventCallback = dynamic Function(SyntheticEvent event)
- DomPropsFactory = DomProps Function()
- ElementCallback = Element Function()
- Callback for DOM elements
- FocusEventCallback = dynamic Function(SyntheticFocusEvent event)
- FormEventCallback = dynamic Function(SyntheticFormEvent event)
- KeyboardEventCallback = dynamic Function(SyntheticKeyboardEvent event)
- MouseEventCallback = dynamic Function(SyntheticMouseEvent event)
- PointerEventCallback = dynamic Function(SyntheticPointerEvent event)
- PropsModifier = dynamic Function(Map props)
- Enforces that a function take a single parameter of type Map.
- ReactNode = Object?
-
A value that can be returned from a component's
render
, or used aschildren
. - ResizeSensorHandler = void Function(ResizeSensorEvent event)
- Callback for ResizeSensorEvents
- TouchEventCallback = dynamic Function(SyntheticTouchEvent event)
- TransitionEventCallback = dynamic Function(SyntheticTransitionEvent event)
- UIEventCallback = dynamic Function(SyntheticUIEvent event)
-
UiFactory<
TProps extends UiProps> = TProps Function([Map? backingProps]) -
A function that returns a new
TProps
instance, optionally backed by the specifiedbackingProps
. - ValidationUtilWarningCallback = void Function(String message)
- WheelEventCallback = dynamic Function(SyntheticWheelEvent event)
Exceptions / Errors
- IllegalInstantiationError
- Thrown when a class is directly instantiated when it should not be.
- MissingRequiredPropsError
- PropError
- Errors thrown due to a value within UiComponent2.props being set incorrectly.
- UngeneratedError
-
Thrown when stubbed code (usually annotated with
ToBeGenerated
) that expects to be overridden by generated code is called unexpectedly. - ValidationWarning