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