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_reactbuilder to declare an abstractUiComponentclass for an abstract component. - AbstractComponent2
-
Annotation used with the
over_reactbuilder to declare an abstractUiComponent2class for an abstract component. - AbstractProps
-
Annotation used with the
over_reactbuilder to declare an abstractUiPropsmixin for an abstract component. - AbstractState
-
Annotation used with the
over_reactbuilder to declare an abstractUiPropsclass for an abstract component. -
AbstractTransitionComponent<
T extends AbstractTransitionProps, S extends AbstractTransitionState> - How to use AbstractTransitionComponent:
- AbstractTransitionProps
- AbstractTransitionState
- Accessor
-
Annotation used with the
over_reactbuilder 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_reactbuilder to declare aUiComponentclass for a component. - Component2
-
Annotation used with the
over_reactbuilder to declare aUiComponent2class 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
MapViewwith 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.DOMin 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_reactbuilder to declare aUiFactoryfor a component. -
FluxUiComponent<
TProps extends FluxUiProps> -
Builds on top of UiComponent, adding w_flux integration, much like the
FluxComponentin w_flux. -
FluxUiComponent2<
TProps extends FluxUiProps> -
Builds on top of UiComponent2, adding w_flux integration, much like the
FluxComponentin w_flux. -
FluxUiProps<
ActionsT, StoresT> - Deprecated. Use FluxUiPropsMixin instead.
-
FluxUiStatefulComponent<
TProps extends FluxUiProps, TState extends UiState> -
Builds on top of UiStatefulComponent, adding
w_fluxintegration, much like theFluxComponentin w_flux. -
FluxUiStatefulComponent2<
TProps extends FluxUiProps, TState extends UiState> -
Builds on top of UiStatefulComponent2, adding
w_fluxintegration, much like theFluxComponentin 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
propdeclared within a UiProps subclass or props mixin. - Props
-
Annotation used with the
over_reactbuilder to declare aUiPropsmixin 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_reactbuilder to declare a mixin for use in aUiPropsclass. -
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_reactbuilder to declare aUiStatemixin for a component. - StateDescriptor
-
Provides a representation of a single
statedeclared 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_reactbuilder to declare a mixin for use in aUiStateclass. - 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
MapViewhelper 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
ActionandStoreprops for use with FluxUiComponent2. -
PureComponentMixin<
T extends UiProps> -
A mixin to make a
Component2instance behave like a ReactJSPureComponent. - SuspensePropsMixin
-
TypedSnapshot<
TSnapshot> -
Mixin that enforces consistent typing of the
snapshotparameter returned byComponent2.getSnapshotBeforeUpdateand 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
JsMaptoMapand back. - convertJsRefProp → const _CommonConversionCases
-
Utility version of ConvertProp for ref props to generate getters and setters
to convert from
JsReftoRefand 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
typeattribute 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
propas required to be set, but allowed to be set explicitly tonull. - requiredProp → const Accessor
-
Marks a
propas 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
valuetoUiFactory<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
elementwithnewCallbackRef. -
chainRefs(
dynamic ref1, dynamic ref2) → dynamic -
Returns a ref that updates both
ref1andref2, 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
lowerBoundup to an optionalupperBound(both inclusive) that matchesselector, ornullif 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
childreninto 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
SyntheticCompositionEventinstance. -
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
SyntheticPointerEventinstance. -
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
_changeSensoradded 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
onChangeon 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
lengthconsisting of numbers and uppercase/lowercase letters. -
getActiveElement(
) → Element? -
Returns the currently focused element (Document.activeElement),
or
nullif 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
factoryprop accessed inaccessProp. -
getProps(
dynamic instance, {bool traverseWrappers = false}) → Map -
Returns an unmodifiable Map view of props for a ReactElement or composite
ReactComponentinstance. -
getPropsToForward(
Map props, {bool omitReactProps = true, bool onlyCopyDomProps = false, Iterable? keysToOmit, Iterable< Iterable> ? keySetsToOmit}) → Map -
Returns a copy of the specified
propsmap, omitting reserved React props by default, in addition to any specifiedkeysToOmitorkeySetsToOmit. -
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
instanceis of the type associated withtypeAlias, which can be a component's: -
isDartComponent(
Object? instance) → bool -
Returns whether an
instanceis a native Dart component (a react-dart ReactElement orReactComponent). -
isDomElement(
dynamic instance) → bool -
Returns whether
instanceis a ReactElement for a DOM node. -
isOrContains(
Element? root, Element? other) → bool -
Returns whether
rootis the same as or contains theothernode. -
isValidElement(
dynamic object) → bool - Dart wrapper for React.isValidElement.
-
isValidElementOfType(
dynamic instance, dynamic typeAlias) → bool -
Returns whether
instanceis 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.PureComponentdoes 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
aandbhave 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
elementsupportssetSelectionRange. -
toPx(
dynamic value, {bool treatNumAsPx = false, bool passThroughUnsupportedUnits = false}) → CssValue? -
Converts a rem
valueto 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)valueto itsremequivalent 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
callbackthat only changes if one of thedependencieshas changed. -
useContext<
T> (Context< T> context) → T -
Returns the value of the nearest Context.Provider for the provided
contextobject every time that context is updated. -
useDebugValue<
T> (T value, [dynamic format(T)?]) → dynamic -
Displays
valueas a label for a custom hook in React DevTools. -
useEffect(
dynamic sideEffect(), [List< Object?> ? dependencies]) → void -
Runs
sideEffectafter every completed render of a uiFunction component. -
useImperativeHandle(
dynamic ref, dynamic createHandle(), [List? dependencies]) → void -
Customizes the
refvalue 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
sideEffectsynchronously 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
initialStateand 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
boolvalue. -
BuilderOnlyUiFactory<
TProps extends UiProps> = TProps Function() -
A utility variation on UiFactory, without a
backingPropsparameter. - 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
propsandstateof 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
TPropsinstance, 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