SchemaDocumentValueExt extension Null safety Extensions
Extension on the SchemaDocumentValue
class which provides a useful suite of methods
to manage user generated data.
- on
-
- SchemaDocumentValue
Methods
-
getList<
T> () → List< T> ? -
Checks if the
SchemaDocumentValue
is of the providedT
type. If the value cannot be cast to the provided type, or the providedT
doesnt matchSchemaKind
, then false is returned. -
getValue<
T> () → T? -
Returns the underlying value of the
SchemaDocumentValue
as the providedT
type. If the value cannot be cast to the provided type, or the providedT
doesnt matchSchemaKind
, then null is returned. -
isMatchingType<
T> (T value) → bool -
Checks if the provided
T
type matches theSchemaKind
of theSchemaDocumentValue
. If the providedT
doesnt matchSchemaKind
, then false is returned. -
setList<
T> (List< T> v) → List<T> ? -
Sets list of values of the
SchemaDocumentValue
to the providedvalue
. If the providedT
doesnt matchSchemaKind
, then false is returned. -
setValue<
T> (T v) → T? -
Sets the value of the
SchemaDocumentValue
to the providedvalue
. If the providedT
doesnt matchSchemaKind
, then false is returned.