nullableRequiredProp top-level constant
Accessor
const nullableRequiredProp
Marks a prop as required to be set, but allowed to be set explicitly to null.
Prefer using late required props instead; this will eventually be deprecated.
Validation occurs in UiComponent.validateRequiredProps which requires super calls into componentWillMount and
componentWillReceiveProps.
mixin FooProps on UiProps {
@nullableRequiredProp
String nullableRequiredProp;
}
Implementation
const Accessor nullableRequiredProp = Accessor(isRequired: true, isNullable: true);