SchemaDocumentExt extension Null safety
SchemaDocumentExt is an extension on the SchemaDocument
class which provides a useful suite of methods
to manage user generated data.
- on
-
- SchemaDocument
Methods
-
get<
T> (String name) → T? -
Returns the provided
T
value from theSchemaDocument
for the givenname
of the field, or null if the field does not exist. -
pull(
String cid) → Future< SchemaDocument?> -
Pulls the
SchemaDocument
from the current accounts application-specific data store using the providedcid
. The account then decrypts the data and its values are returned as aSchemaDocument
. A succesful transaction will return aSchemaDocument
. -
save(
String label) → Future< SchemaDocument?> -
Saves the
SchemaDocument
to the current accounts application-specific data store. The account then encrypts the data and effectively becomes the only entity to be able to view the values. A succesful transaction will return aUploadDocumentResponse
. -
set<
T> (String name, T value) → T? -
Sets the provided
T
value
to theSchemaDocument
for the givenname
of the field. Returns true if the field was found and set, false otherwise.