Props class
Annotation used with the over_react
builder to declare a UiProps
mixin for a component.
Props are declared as fields, which act as stubs for generated getters/setters that proxy Map key-value pairs.
@Props()
mixin FooProps on UiProps {
String? 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. keyNamespace
, disableRequiredPropValidation
).
If utilizing legacy boilerplate, must be accompanied by a Factory and Component2 declaration.
- Implemented types
Constructors
Properties
-
disableRequiredPropValidation
→ Set<
String> ? -
Names of props to opt out of required prop validation for, both statically in the analyzer plugin
and at runtime when invoking the builder (only with asserts enabled).
final
- disableValidationForClassDefaultProps → bool
-
Whether to disable validation for props defaulted in the class component associated
with these props (defaults to
true
).final - hashCode → int
-
The hash code for this object.
no setterinherited
- keyNamespace → String?
-
A custom namespace for the keys of props defined in the annotated class,
overriding the default of
'${propsClassName}.'
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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