From 5a924df0e158897e66b89e40a7bdec56b0e97d53 Mon Sep 17 00:00:00 2001 From: Jordan Nelson Date: Mon, 18 Mar 2024 13:49:21 -0400 Subject: [PATCH] chore: update generated code --- .../amplify_storage_s3_dart/lib/src/model/s3_item.g.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/storage/amplify_storage_s3_dart/lib/src/model/s3_item.g.dart b/packages/storage/amplify_storage_s3_dart/lib/src/model/s3_item.g.dart index db2c8a9479..5a4c48b825 100644 --- a/packages/storage/amplify_storage_s3_dart/lib/src/model/s3_item.g.dart +++ b/packages/storage/amplify_storage_s3_dart/lib/src/model/s3_item.g.dart @@ -7,7 +7,8 @@ part of 's3_item.dart'; // ************************************************************************** S3Item _$S3ItemFromJson(Map json) => S3Item( - key: json['key'] as String, + key: json['key'] as String?, + path: json['path'] as String? ?? '', size: json['size'] as int?, lastModified: json['lastModified'] == null ? null @@ -22,9 +23,7 @@ S3Item _$S3ItemFromJson(Map json) => S3Item( ); Map _$S3ItemToJson(S3Item instance) { - final val = { - 'key': instance.key, - }; + final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { @@ -32,6 +31,8 @@ Map _$S3ItemToJson(S3Item instance) { } } + writeNotNull('key', instance.key); + val['path'] = instance.path; writeNotNull('size', instance.size); writeNotNull('lastModified', instance.lastModified?.toIso8601String()); writeNotNull('eTag', instance.eTag);