fromMap static method
Gets a possible PrintJobInfo instance from a Map value.
Implementation
static PrintJobInfo? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
final instance = PrintJobInfo(
attributes: PrintJobAttributes.fromMap(
map['attributes']?.cast<String, dynamic>()),
canSpawnSeparateThread: map['canSpawnSeparateThread'],
copies: map['copies'],
creationTime: map['creationTime'],
currentPage: map['currentPage'],
firstPage: map['firstPage'],
isCopyingOperation: map['isCopyingOperation'],
label: map['label'],
lastPage: map['lastPage'],
numberOfPages: map['numberOfPages'],
pageOrder: PrintJobPageOrder.fromNativeValue(map['pageOrder']),
preferredRenderingQuality: PrintJobRenderingQuality.fromNativeValue(
map['preferredRenderingQuality']),
printer: Printer.fromMap(map['printer']?.cast<String, dynamic>()),
showsPrintPanel: map['showsPrintPanel'],
showsProgressPanel: map['showsProgressPanel'],
state: PrintJobState.fromNativeValue(map['state']),
);
return instance;
}