FrappeDocFieldConverter class

A helper class containing method to be used with JsonKey

For instance unsaved under FrappeDocument where it comes from the backend as 0, 1 representing false & true, respectively.

The method FrappeDocFieldConverter.checkToBool can be used

The reverse method can be used as well when converting back to JSON, for instance, FrappeDocFieldConverter.boolToCheck

Constructors

FrappeDocFieldConverter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

boolToCheck(bool? boolValue) int?
Converts the value of a check (bool) to Frappé representation (0 or 1)
checkToBool(int? value) bool
Converts to the boolean representation of the "Check" docfield in Frappé false is represented as 0 in Frappé while true is represented as 1
frappeDocStatusToInt(FrappeDocStatus? docStatus) int?
Converts the docStatus of a document FrappeDocStatus to its representation in Frappé 0, 1 or 2
idxFromString(dynamic idx) int?
intToFrappeDocStatus(int? docStatus) FrappeDocStatus?
Converts the docStatus of a document from 0, 1 or 2 to FrappeDocStatus
toFrappeDateTime(DateTime? dateTime) String?