SchemaDocumentValueExt extension Null safety
SchemaDocumentValueExt
Extension on the SchemaDocumentValue
class which provides a useful suite of methods
to manage user generated data.
- on
-
- SchemaDocumentValue
Methods
-
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. -
setValue<
T> (T v) → T?