fixed exchangeable_object_generator

This commit is contained in:
Lorenzo Pichilli 2022-10-12 17:06:33 +02:00
parent 05cb0184fc
commit e7804f1606
2 changed files with 3 additions and 3 deletions

View File

@ -497,9 +497,9 @@ class ExchangeableObjectGenerator
} }
} else if (elementType.getDisplayString(withNullability: false) == } else if (elementType.getDisplayString(withNullability: false) ==
"EdgeInsets") { "EdgeInsets") {
return "MapEdgeInsets.fromMap($value?.cast<String, dynamic>())${isNullable ? '!' : ''}"; return "MapEdgeInsets.fromMap($value?.cast<String, dynamic>())${!isNullable ? '!' : ''}";
} else if (elementType.getDisplayString(withNullability: false) == "Size") { } else if (elementType.getDisplayString(withNullability: false) == "Size") {
return "MapSize.fromMap($value?.cast<String, dynamic>())${isNullable ? '!' : ''}"; return "MapSize.fromMap($value?.cast<String, dynamic>())${!isNullable ? '!' : ''}";
} else if (elementType.getDisplayString(withNullability: false) == } else if (elementType.getDisplayString(withNullability: false) ==
"DateTime") { "DateTime") {
if (!isNullable) { if (!isNullable) {

View File

@ -128,7 +128,7 @@ class PrintJobAttributes {
PrintJobMediaSize.fromMap(map['mediaSize']?.cast<String, dynamic>()), PrintJobMediaSize.fromMap(map['mediaSize']?.cast<String, dynamic>()),
resolution: PrintJobResolution.fromMap( resolution: PrintJobResolution.fromMap(
map['resolution']?.cast<String, dynamic>()), map['resolution']?.cast<String, dynamic>()),
margins: MapEdgeInsets.fromMap(map['margins']?.cast<String, dynamic>())!, margins: MapEdgeInsets.fromMap(map['margins']?.cast<String, dynamic>()),
footerHeight: map['footerHeight'], footerHeight: map['footerHeight'],
headerHeight: map['headerHeight'], headerHeight: map['headerHeight'],
printableRect: InAppWebViewRect.fromMap( printableRect: InAppWebViewRect.fromMap(