Component2 class
Annotation used with the over_react
builder to declare a UiComponent2
class for a component.
@Component2()
class FooComponent extends UiComponent2<FooProps> {
render() => Dom.div()(props.bar);
}
NOTE: This is only required for legacy boilerplate and can be omitted
for new implementations. However, it can still be used for custom configurations
(e.g. subtypeOf
).
If utilizing legacy boilerplate, must be accompanied by a Factory and Props declaration.
See also: UiFactory.setTypeMeta
(via extension UiFactoryTypeMeta),
which can be used to provide configuration to function components,
which don't have this annotation.
- Implemented types
Constructors
- Component2({bool isWrapper = false, Type? subtypeOf, bool isErrorBoundary = false})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isErrorBoundary → bool
-
Whether the component serves as a React error boundary.
final
- isWrapper → bool
-
Whether the component clones or passes through its children and needs to be
treated as if it were the wrapped component when passed in to
isComponentOfType
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtypeOf → Type?
-
The component class of this component's "parent type".
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited