From e7804f160605e8fd5e9c37054878d0be84914bf3 Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Wed, 12 Oct 2022 17:06:33 +0200 Subject: [PATCH] fixed exchangeable_object_generator --- .../generators/lib/src/exchangeable_object_generator.dart | 4 ++-- lib/src/types/print_job_attributes.g.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev_packages/generators/lib/src/exchangeable_object_generator.dart b/dev_packages/generators/lib/src/exchangeable_object_generator.dart index acbf0a6a..cbde4c7d 100644 --- a/dev_packages/generators/lib/src/exchangeable_object_generator.dart +++ b/dev_packages/generators/lib/src/exchangeable_object_generator.dart @@ -497,9 +497,9 @@ class ExchangeableObjectGenerator } } else if (elementType.getDisplayString(withNullability: false) == "EdgeInsets") { - return "MapEdgeInsets.fromMap($value?.cast())${isNullable ? '!' : ''}"; + return "MapEdgeInsets.fromMap($value?.cast())${!isNullable ? '!' : ''}"; } else if (elementType.getDisplayString(withNullability: false) == "Size") { - return "MapSize.fromMap($value?.cast())${isNullable ? '!' : ''}"; + return "MapSize.fromMap($value?.cast())${!isNullable ? '!' : ''}"; } else if (elementType.getDisplayString(withNullability: false) == "DateTime") { if (!isNullable) { diff --git a/lib/src/types/print_job_attributes.g.dart b/lib/src/types/print_job_attributes.g.dart index e87932fb..16e16fa1 100644 --- a/lib/src/types/print_job_attributes.g.dart +++ b/lib/src/types/print_job_attributes.g.dart @@ -128,7 +128,7 @@ class PrintJobAttributes { PrintJobMediaSize.fromMap(map['mediaSize']?.cast()), resolution: PrintJobResolution.fromMap( map['resolution']?.cast()), - margins: MapEdgeInsets.fromMap(map['margins']?.cast())!, + margins: MapEdgeInsets.fromMap(map['margins']?.cast()), footerHeight: map['footerHeight'], headerHeight: map['headerHeight'], printableRect: InAppWebViewRect.fromMap(