From 59272a559b396dbaca03e3a14c42c9ce8dedd7d2 Mon Sep 17 00:00:00 2001 From: Nika Hassani Date: Thu, 28 Mar 2024 16:26:58 -0700 Subject: [PATCH] run dart fix --- .../lib/src/types/temporal/temporal_date.dart | 4 +- .../src/types/temporal/temporal_datetime.dart | 4 +- .../lib/src/types/temporal/temporal_time.dart | 4 +- .../lib/models/BelongsToChildExplicit.dart | 6 +-- .../lib/models/BelongsToChildImplicit.dart | 6 +-- .../example/lib/models/BelongsToParent.dart | 4 +- .../example/lib/models/Blog.dart | 4 +- .../example/lib/models/Comment.dart | 6 +-- .../CpkHasManyChildBidirectionalExplicit.dart | 6 +-- .../CpkHasManyChildBidirectionalImplicit.dart | 6 +-- ...CpkHasManyParentBidirectionalExplicit.dart | 4 +- ...CpkHasManyParentBidirectionalImplicit.dart | 4 +- ...CpkHasManyUnidirectionalChildExplicit.dart | 4 +- ...CpkHasManyUnidirectionalChildImplicit.dart | 4 +- .../CpkHasManyUnidirectionalParent.dart | 4 +- .../models/CpkHasOneUnidirectionalChild.dart | 4 +- .../models/CpkHasOneUnidirectionalParent.dart | 4 +- .../example/lib/models/CpkInventory.dart | 4 +- .../example/lib/models/CpkManyToManyPost.dart | 4 +- .../example/lib/models/CpkManyToManyTag.dart | 4 +- ...kOneToOneBidirectionalChildExplicitCD.dart | 6 +-- ...kOneToOneBidirectionalChildExplicitID.dart | 6 +-- ...kOneToOneBidirectionalChildImplicitCD.dart | 6 +-- ...kOneToOneBidirectionalChildImplicitID.dart | 6 +-- .../CpkOneToOneBidirectionalParentCD.dart | 4 +- .../CpkOneToOneBidirectionalParentID.dart | 4 +- .../example/lib/models/CpkPostTags.dart | 8 ++-- .../CustomTypeWithAppsyncScalarTypes.dart | 46 +++++++++---------- .../HasManyChildBiDirectionalExplicit.dart | 6 +-- .../HasManyChildBiDirectionalImplicit.dart | 6 +-- .../lib/models/HasManyChildExplicit.dart | 4 +- .../lib/models/HasManyChildImplicit.dart | 4 +- .../example/lib/models/HasManyParent.dart | 4 +- .../HasManyParentBiDirectionalExplicit.dart | 4 +- .../HasManyParentBiDirectionalImplicit.dart | 4 +- .../example/lib/models/HasOneChild.dart | 4 +- .../example/lib/models/HasOneParent.dart | 4 +- .../models/ModelWithAppsyncScalarTypes.dart | 46 +++++++++---------- .../lib/models/ModelWithCustomType.dart | 8 ++-- .../example/lib/models/ModelWithEnum.dart | 6 +-- .../lib/models/MultiRelatedAttendee.dart | 4 +- .../lib/models/MultiRelatedMeeting.dart | 4 +- .../lib/models/MultiRelatedRegistration.dart | 8 ++-- .../example/lib/models/Post.dart | 10 ++-- .../example/lib/models/PostTags.dart | 8 ++-- .../example/lib/models/Tag.dart | 4 +- .../endpoint_info_store_manager.dart | 2 +- .../custom_authorizer_test.dart | 3 +- .../example/integration_test/test_runner.dart | 1 - .../version_upgrade_test.dart | 3 +- .../example/test_driver/hosted_ui_test.dart | 3 +- .../legacy_credential_provider_impl.dart | 8 ++-- .../lib/src/auth_plugin_impl.dart | 4 +- .../lib/common/mock_clients.dart | 4 +- .../lib/common/mock_oauth_server.dart | 2 +- .../amplify_secure_storage_linux.dart | 2 +- .../lib/src/generator/context.dart | 2 +- .../smithy/smithy_test/lib/src/common.dart | 2 +- .../smithy_test/lib/src/xml/equatable.dart | 2 +- .../types/delete_user_response.dart | 6 +-- .../src/stubs/amplify_auth_cognito_stub.dart | 28 +++++------ templates/dart-package/hooks/post_gen.dart | 2 +- .../__brick__/example/lib/main.dart | 2 +- templates/flutter-package/hooks/post_gen.dart | 2 +- tool/send_metric_data.dart | 2 +- 65 files changed, 195 insertions(+), 199 deletions(-) diff --git a/packages/amplify_core/lib/src/types/temporal/temporal_date.dart b/packages/amplify_core/lib/src/types/temporal/temporal_date.dart index 3a5c7f49e29..e45c0dcffd7 100644 --- a/packages/amplify_core/lib/src/types/temporal/temporal_date.dart +++ b/packages/amplify_core/lib/src/types/temporal/temporal_date.dart @@ -116,10 +116,10 @@ class TemporalDate implements Comparable { // Duration.toString returns string of form -9:30:00.000000 / 9:30:00.000000 // But we need -09:30 / +09:30 if (_offset != null) { - if (_offset!.inSeconds == 0) { + if (_offset.inSeconds == 0) { buffer.write('Z'); } else { - buffer.write(Temporal.durationToOffset(_offset!)); + buffer.write(Temporal.durationToOffset(_offset)); } } diff --git a/packages/amplify_core/lib/src/types/temporal/temporal_datetime.dart b/packages/amplify_core/lib/src/types/temporal/temporal_datetime.dart index 51d4f012dfb..0b1b8c096df 100644 --- a/packages/amplify_core/lib/src/types/temporal/temporal_datetime.dart +++ b/packages/amplify_core/lib/src/types/temporal/temporal_datetime.dart @@ -164,10 +164,10 @@ class TemporalDateTime implements Comparable { buffer.write('.${totalMicroseconds.toString().padLeft(9, '0')}'); if (_offset != null) { - if (_offset!.inSeconds == 0) { + if (_offset.inSeconds == 0) { buffer.write('Z'); } else { - buffer.write(Temporal.durationToOffset(_offset!)); + buffer.write(Temporal.durationToOffset(_offset)); } } diff --git a/packages/amplify_core/lib/src/types/temporal/temporal_time.dart b/packages/amplify_core/lib/src/types/temporal/temporal_time.dart index b8dd7601f66..17a8cd4fb58 100644 --- a/packages/amplify_core/lib/src/types/temporal/temporal_time.dart +++ b/packages/amplify_core/lib/src/types/temporal/temporal_time.dart @@ -166,10 +166,10 @@ class TemporalTime implements Comparable { } if (_offset != null) { - if (_offset!.inSeconds == 0) { + if (_offset.inSeconds == 0) { buffer.write('Z'); } else { - buffer.write(Temporal.durationToOffset(_offset!)); + buffer.write(Temporal.durationToOffset(_offset)); } } diff --git a/packages/amplify_datastore/example/lib/models/BelongsToChildExplicit.dart b/packages/amplify_datastore/example/lib/models/BelongsToChildExplicit.dart index ecc1844c7e0..d693a6cb14d 100644 --- a/packages/amplify_datastore/example/lib/models/BelongsToChildExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/BelongsToChildExplicit.dart @@ -98,13 +98,13 @@ class BelongsToChildExplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/BelongsToChildImplicit.dart b/packages/amplify_datastore/example/lib/models/BelongsToChildImplicit.dart index 339797b4490..d21defa21a7 100644 --- a/packages/amplify_datastore/example/lib/models/BelongsToChildImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/BelongsToChildImplicit.dart @@ -98,13 +98,13 @@ class BelongsToChildImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/BelongsToParent.dart b/packages/amplify_datastore/example/lib/models/BelongsToParent.dart index 15b9dbd6825..405e1f85126 100644 --- a/packages/amplify_datastore/example/lib/models/BelongsToParent.dart +++ b/packages/amplify_datastore/example/lib/models/BelongsToParent.dart @@ -136,10 +136,10 @@ class BelongsToParent extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("belongsToParentImplicitChildId=" + "$_belongsToParentImplicitChildId" + diff --git a/packages/amplify_datastore/example/lib/models/Blog.dart b/packages/amplify_datastore/example/lib/models/Blog.dart index 11a9568944a..3766053aa06 100644 --- a/packages/amplify_datastore/example/lib/models/Blog.dart +++ b/packages/amplify_datastore/example/lib/models/Blog.dart @@ -107,10 +107,10 @@ class Blog extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/Comment.dart b/packages/amplify_datastore/example/lib/models/Comment.dart index fb3b8e24d17..5fea748f018 100644 --- a/packages/amplify_datastore/example/lib/models/Comment.dart +++ b/packages/amplify_datastore/example/lib/models/Comment.dart @@ -104,13 +104,13 @@ class Comment extends amplify_core.Model { buffer.write("Comment {"); buffer.write("id=" + "$id" + ", "); - buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("post=" + (_post != null ? _post.toString() : "null") + ", "); buffer.write("content=" + "$_content" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalExplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalExplicit.dart index 32d955f2f8c..40027a8ccda 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalExplicit.dart @@ -120,13 +120,13 @@ class CpkHasManyChildBidirectionalExplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("hasManyParent=" + - (_hasManyParent != null ? _hasManyParent!.toString() : "null") + + (_hasManyParent != null ? _hasManyParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalImplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalImplicit.dart index 9429d9b4351..6da08965b92 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyChildBidirectionalImplicit.dart @@ -120,13 +120,13 @@ class CpkHasManyChildBidirectionalImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("hasManyParent=" + - (_hasManyParent != null ? _hasManyParent!.toString() : "null") + + (_hasManyParent != null ? _hasManyParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalExplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalExplicit.dart index 33901fa9f50..41e258d4269 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalExplicit.dart @@ -132,10 +132,10 @@ class CpkHasManyParentBidirectionalExplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalImplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalImplicit.dart index 4e9eec9af3f..9e3b3a5723e 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyParentBidirectionalImplicit.dart @@ -132,10 +132,10 @@ class CpkHasManyParentBidirectionalImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildExplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildExplicit.dart index 4194c62a483..ca54a2bdac7 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildExplicit.dart @@ -154,10 +154,10 @@ class CpkHasManyUnidirectionalChildExplicit extends amplify_core.Model { buffer.write("hasManyParentID=" + "$_hasManyParentID" + ", "); buffer.write("hasManyParentName=" + "$_hasManyParentName" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildImplicit.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildImplicit.dart index 8195848103f..02e8a141f52 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalChildImplicit.dart @@ -140,10 +140,10 @@ class CpkHasManyUnidirectionalChildImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("cpkHasManyUnidirectionalParentImplicitChildrenId=" + "$_cpkHasManyUnidirectionalParentImplicitChildrenId" + diff --git a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalParent.dart b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalParent.dart index 6f7fa4a35fe..586b4b834ff 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalParent.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasManyUnidirectionalParent.dart @@ -142,10 +142,10 @@ class CpkHasManyUnidirectionalParent extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalChild.dart b/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalChild.dart index 784022d097f..6853a9a63a5 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalChild.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalChild.dart @@ -105,10 +105,10 @@ class CpkHasOneUnidirectionalChild extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalParent.dart b/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalParent.dart index b252975bdd2..66d99c916e4 100644 --- a/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalParent.dart +++ b/packages/amplify_datastore/example/lib/models/CpkHasOneUnidirectionalParent.dart @@ -180,10 +180,10 @@ class CpkHasOneUnidirectionalParent extends amplify_core.Model { buffer.write("explicitChildID=" + "$_explicitChildID" + ", "); buffer.write("explicitChildName=" + "$_explicitChildName" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("cpkHasOneUnidirectionalParentImplicitChildId=" + "$_cpkHasOneUnidirectionalParentImplicitChildId" + diff --git a/packages/amplify_datastore/example/lib/models/CpkInventory.dart b/packages/amplify_datastore/example/lib/models/CpkInventory.dart index 5ca29f017e0..dbad7784f46 100644 --- a/packages/amplify_datastore/example/lib/models/CpkInventory.dart +++ b/packages/amplify_datastore/example/lib/models/CpkInventory.dart @@ -160,10 +160,10 @@ class CpkInventory extends amplify_core.Model { buffer.write("warehouseId=" + "$_warehouseId" + ", "); buffer.write("description=" + "$_description" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkManyToManyPost.dart b/packages/amplify_datastore/example/lib/models/CpkManyToManyPost.dart index 6d28dc07795..b04c95e4b0a 100644 --- a/packages/amplify_datastore/example/lib/models/CpkManyToManyPost.dart +++ b/packages/amplify_datastore/example/lib/models/CpkManyToManyPost.dart @@ -108,10 +108,10 @@ class CpkManyToManyPost extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("title=" + "$_title" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkManyToManyTag.dart b/packages/amplify_datastore/example/lib/models/CpkManyToManyTag.dart index 1442ca78771..2b98b102d54 100644 --- a/packages/amplify_datastore/example/lib/models/CpkManyToManyTag.dart +++ b/packages/amplify_datastore/example/lib/models/CpkManyToManyTag.dart @@ -117,10 +117,10 @@ class CpkManyToManyTag extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("label=" + "$_label" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitCD.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitCD.dart index 5abb0899bf0..b21b4ca7434 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitCD.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitCD.dart @@ -120,13 +120,13 @@ class CpkOneToOneBidirectionalChildExplicitCD extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitID.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitID.dart index 6c5d676e867..25ed70b01ca 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitID.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildExplicitID.dart @@ -120,13 +120,13 @@ class CpkOneToOneBidirectionalChildExplicitID extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitCD.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitCD.dart index 1570042c6a8..1e583b11833 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitCD.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitCD.dart @@ -120,13 +120,13 @@ class CpkOneToOneBidirectionalChildImplicitCD extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitID.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitID.dart index 5f70c35ca14..af453c2cc62 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitID.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalChildImplicitID.dart @@ -120,13 +120,13 @@ class CpkOneToOneBidirectionalChildImplicitID extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("belongsToParent=" + - (_belongsToParent != null ? _belongsToParent!.toString() : "null") + + (_belongsToParent != null ? _belongsToParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentCD.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentCD.dart index e38f868df60..68f644eb659 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentCD.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentCD.dart @@ -199,10 +199,10 @@ class CpkOneToOneBidirectionalParentCD extends amplify_core.Model { buffer.write("customId=" + "$_customId" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("cpkOneToOneBidirectionalParentCDImplicitChildId=" + "$_cpkOneToOneBidirectionalParentCDImplicitChildId" + diff --git a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentID.dart b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentID.dart index ce56bec14c8..47efeada121 100644 --- a/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentID.dart +++ b/packages/amplify_datastore/example/lib/models/CpkOneToOneBidirectionalParentID.dart @@ -185,10 +185,10 @@ class CpkOneToOneBidirectionalParentID extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("cpkOneToOneBidirectionalParentIDImplicitChildId=" + "$_cpkOneToOneBidirectionalParentIDImplicitChildId" + diff --git a/packages/amplify_datastore/example/lib/models/CpkPostTags.dart b/packages/amplify_datastore/example/lib/models/CpkPostTags.dart index 61a9c33d1ce..374e3c52389 100644 --- a/packages/amplify_datastore/example/lib/models/CpkPostTags.dart +++ b/packages/amplify_datastore/example/lib/models/CpkPostTags.dart @@ -121,16 +121,16 @@ class CpkPostTags extends amplify_core.Model { buffer.write("CpkPostTags {"); buffer.write("id=" + "$id" + ", "); buffer.write("cpkManyToManyPost=" + - (_cpkManyToManyPost != null ? _cpkManyToManyPost!.toString() : "null") + + (_cpkManyToManyPost != null ? _cpkManyToManyPost.toString() : "null") + ", "); buffer.write("cpkManyToManyTag=" + - (_cpkManyToManyTag != null ? _cpkManyToManyTag!.toString() : "null") + + (_cpkManyToManyTag != null ? _cpkManyToManyTag.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart b/packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart index 351a8d1c613..b91ab2377ac 100644 --- a/packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart +++ b/packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart @@ -399,86 +399,86 @@ class CustomTypeWithAppsyncScalarTypes { buffer.write("CustomTypeWithAppsyncScalarTypes {"); buffer.write("stringValue=" + "$_stringValue" + ", "); buffer.write("listOfStringValue=" + - (_listOfStringValue != null ? _listOfStringValue!.toString() : "null") + + (_listOfStringValue != null ? _listOfStringValue.toString() : "null") + ", "); buffer.write("intValue=" + - (_intValue != null ? _intValue!.toString() : "null") + + (_intValue != null ? _intValue.toString() : "null") + ", "); buffer.write("listOfIntValue=" + - (_listOfIntValue != null ? _listOfIntValue!.toString() : "null") + + (_listOfIntValue != null ? _listOfIntValue.toString() : "null") + ", "); buffer.write("floatValue=" + - (_floatValue != null ? _floatValue!.toString() : "null") + + (_floatValue != null ? _floatValue.toString() : "null") + ", "); buffer.write("listOfFloatValue=" + - (_listOfFloatValue != null ? _listOfFloatValue!.toString() : "null") + + (_listOfFloatValue != null ? _listOfFloatValue.toString() : "null") + ", "); buffer.write("booleanValue=" + - (_booleanValue != null ? _booleanValue!.toString() : "null") + + (_booleanValue != null ? _booleanValue.toString() : "null") + ", "); buffer.write("listOfBooleanValue=" + (_listOfBooleanValue != null - ? _listOfBooleanValue!.toString() + ? _listOfBooleanValue.toString() : "null") + ", "); buffer.write("awsDateValue=" + - (_awsDateValue != null ? _awsDateValue!.format() : "null") + + (_awsDateValue != null ? _awsDateValue.format() : "null") + ", "); buffer.write("listOfAWSDateValue=" + (_listOfAWSDateValue != null - ? _listOfAWSDateValue!.toString() + ? _listOfAWSDateValue.toString() : "null") + ", "); buffer.write("awsDateTimeValue=" + - (_awsDateTimeValue != null ? _awsDateTimeValue!.format() : "null") + + (_awsDateTimeValue != null ? _awsDateTimeValue.format() : "null") + ", "); buffer.write("listOfAWSDateTimeValue=" + (_listOfAWSDateTimeValue != null - ? _listOfAWSDateTimeValue!.toString() + ? _listOfAWSDateTimeValue.toString() : "null") + ", "); buffer.write("awsTimeValue=" + - (_awsTimeValue != null ? _awsTimeValue!.format() : "null") + + (_awsTimeValue != null ? _awsTimeValue.format() : "null") + ", "); buffer.write("listOfAWSTimeValue=" + (_listOfAWSTimeValue != null - ? _listOfAWSTimeValue!.toString() + ? _listOfAWSTimeValue.toString() : "null") + ", "); buffer.write("awsTimestampValue=" + - (_awsTimestampValue != null ? _awsTimestampValue!.toString() : "null") + + (_awsTimestampValue != null ? _awsTimestampValue.toString() : "null") + ", "); buffer.write("listOfAWSTimestampValue=" + (_listOfAWSTimestampValue != null - ? _listOfAWSTimestampValue!.toString() + ? _listOfAWSTimestampValue.toString() : "null") + ", "); buffer.write("awsEmailValue=" + "$_awsEmailValue" + ", "); buffer.write("listOfAWSEmailValue=" + (_listOfAWSEmailValue != null - ? _listOfAWSEmailValue!.toString() + ? _listOfAWSEmailValue.toString() : "null") + ", "); buffer.write("awsJsonValue=" + "$_awsJsonValue" + ", "); buffer.write("listOfAWSJsonValue=" + (_listOfAWSJsonValue != null - ? _listOfAWSJsonValue!.toString() + ? _listOfAWSJsonValue.toString() : "null") + ", "); buffer.write("awsPhoneValue=" + "$_awsPhoneValue" + ", "); buffer.write("listOfAWSPhoneValue=" + (_listOfAWSPhoneValue != null - ? _listOfAWSPhoneValue!.toString() + ? _listOfAWSPhoneValue.toString() : "null") + ", "); buffer.write("awsURLValue=" + "$_awsURLValue" + ", "); buffer.write("listOfAWSURLValue=" + - (_listOfAWSURLValue != null ? _listOfAWSURLValue!.toString() : "null") + + (_listOfAWSURLValue != null ? _listOfAWSURLValue.toString() : "null") + ", "); buffer.write("awsIPAddressValue=" + "$_awsIPAddressValue" + ", "); buffer.write("listOfAWSIPAddressValue=" + (_listOfAWSIPAddressValue != null - ? _listOfAWSIPAddressValue!.toString() + ? _listOfAWSIPAddressValue.toString() : "null") + ", "); buffer.write("enumValue=" + @@ -486,17 +486,17 @@ class CustomTypeWithAppsyncScalarTypes { ", "); buffer.write("listOfEnumValue=" + (_listOfEnumValue != null - ? _listOfEnumValue! + ? _listOfEnumValue .map((e) => amplify_core.enumToString(e)) .toString() : "null") + ", "); buffer.write("customTypeValue=" + - (_customTypeValue != null ? _customTypeValue!.toString() : "null") + + (_customTypeValue != null ? _customTypeValue.toString() : "null") + ", "); buffer.write("listOfCustomTypeValue=" + (_listOfCustomTypeValue != null - ? _listOfCustomTypeValue!.toString() + ? _listOfCustomTypeValue.toString() : "null")); buffer.write("}"); diff --git a/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalExplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalExplicit.dart index 6836d3dda00..7b1cdf3d001 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalExplicit.dart @@ -100,13 +100,13 @@ class HasManyChildBiDirectionalExplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("hasManyParent=" + - (_hasManyParent != null ? _hasManyParent!.toString() : "null") + + (_hasManyParent != null ? _hasManyParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalImplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalImplicit.dart index 1eaf8ed6620..83c675f9b63 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyChildBiDirectionalImplicit.dart @@ -100,13 +100,13 @@ class HasManyChildBiDirectionalImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("hasManyParent=" + - (_hasManyParent != null ? _hasManyParent!.toString() : "null") + + (_hasManyParent != null ? _hasManyParent.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasManyChildExplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyChildExplicit.dart index 3355ab6bd0c..7b093ee1520 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyChildExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyChildExplicit.dart @@ -108,10 +108,10 @@ class HasManyChildExplicit extends amplify_core.Model { buffer.write("name=" + "$_name" + ", "); buffer.write("hasManyParentID=" + "$_hasManyParentID" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasManyChildImplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyChildImplicit.dart index 07b36026f36..499d945e3d9 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyChildImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyChildImplicit.dart @@ -103,10 +103,10 @@ class HasManyChildImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write("hasManyParentImplicitChildrenId=" + "$_hasManyParentImplicitChildrenId"); diff --git a/packages/amplify_datastore/example/lib/models/HasManyParent.dart b/packages/amplify_datastore/example/lib/models/HasManyParent.dart index be9a9f0d01e..b98bef22ac8 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyParent.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyParent.dart @@ -121,10 +121,10 @@ class HasManyParent extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalExplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalExplicit.dart index b4adc1f7811..babe82f0fc9 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalExplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalExplicit.dart @@ -109,10 +109,10 @@ class HasManyParentBiDirectionalExplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalImplicit.dart b/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalImplicit.dart index 34941410ee4..8596d8bca43 100644 --- a/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalImplicit.dart +++ b/packages/amplify_datastore/example/lib/models/HasManyParentBiDirectionalImplicit.dart @@ -109,10 +109,10 @@ class HasManyParentBiDirectionalImplicit extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasOneChild.dart b/packages/amplify_datastore/example/lib/models/HasOneChild.dart index cc31fe87fdc..2ff9c47c199 100644 --- a/packages/amplify_datastore/example/lib/models/HasOneChild.dart +++ b/packages/amplify_datastore/example/lib/models/HasOneChild.dart @@ -85,10 +85,10 @@ class HasOneChild extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("name=" + "$_name" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/HasOneParent.dart b/packages/amplify_datastore/example/lib/models/HasOneParent.dart index c6be4446bf6..556122b3e19 100644 --- a/packages/amplify_datastore/example/lib/models/HasOneParent.dart +++ b/packages/amplify_datastore/example/lib/models/HasOneParent.dart @@ -135,10 +135,10 @@ class HasOneParent extends amplify_core.Model { buffer.write("name=" + "$_name" + ", "); buffer.write("explicitChildID=" + "$_explicitChildID" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write("updatedAt=" + - (_updatedAt != null ? _updatedAt!.format() : "null") + + (_updatedAt != null ? _updatedAt.format() : "null") + ", "); buffer.write( "hasOneParentImplicitChildId=" + "$_hasOneParentImplicitChildId"); diff --git a/packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart b/packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart index 79cc247eef0..49d18a675f1 100644 --- a/packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart +++ b/packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart @@ -407,96 +407,96 @@ class ModelWithAppsyncScalarTypes extends amplify_core.Model { buffer.write("stringValue=" + "$_stringValue" + ", "); buffer.write("altStringValue=" + "$_altStringValue" + ", "); buffer.write("listOfStringValue=" + - (_listOfStringValue != null ? _listOfStringValue!.toString() : "null") + + (_listOfStringValue != null ? _listOfStringValue.toString() : "null") + ", "); buffer.write("intValue=" + - (_intValue != null ? _intValue!.toString() : "null") + + (_intValue != null ? _intValue.toString() : "null") + ", "); buffer.write("altIntValue=" + - (_altIntValue != null ? _altIntValue!.toString() : "null") + + (_altIntValue != null ? _altIntValue.toString() : "null") + ", "); buffer.write("listOfIntValue=" + - (_listOfIntValue != null ? _listOfIntValue!.toString() : "null") + + (_listOfIntValue != null ? _listOfIntValue.toString() : "null") + ", "); buffer.write("floatValue=" + - (_floatValue != null ? _floatValue!.toString() : "null") + + (_floatValue != null ? _floatValue.toString() : "null") + ", "); buffer.write("listOfFloatValue=" + - (_listOfFloatValue != null ? _listOfFloatValue!.toString() : "null") + + (_listOfFloatValue != null ? _listOfFloatValue.toString() : "null") + ", "); buffer.write("booleanValue=" + - (_booleanValue != null ? _booleanValue!.toString() : "null") + + (_booleanValue != null ? _booleanValue.toString() : "null") + ", "); buffer.write("listOfBooleanValue=" + (_listOfBooleanValue != null - ? _listOfBooleanValue!.toString() + ? _listOfBooleanValue.toString() : "null") + ", "); buffer.write("awsDateValue=" + - (_awsDateValue != null ? _awsDateValue!.format() : "null") + + (_awsDateValue != null ? _awsDateValue.format() : "null") + ", "); buffer.write("listOfAWSDateValue=" + (_listOfAWSDateValue != null - ? _listOfAWSDateValue!.toString() + ? _listOfAWSDateValue.toString() : "null") + ", "); buffer.write("awsTimeValue=" + - (_awsTimeValue != null ? _awsTimeValue!.format() : "null") + + (_awsTimeValue != null ? _awsTimeValue.format() : "null") + ", "); buffer.write("listOfAWSTimeValue=" + (_listOfAWSTimeValue != null - ? _listOfAWSTimeValue!.toString() + ? _listOfAWSTimeValue.toString() : "null") + ", "); buffer.write("awsDateTimeValue=" + - (_awsDateTimeValue != null ? _awsDateTimeValue!.format() : "null") + + (_awsDateTimeValue != null ? _awsDateTimeValue.format() : "null") + ", "); buffer.write("listOfAWSDateTimeValue=" + (_listOfAWSDateTimeValue != null - ? _listOfAWSDateTimeValue!.toString() + ? _listOfAWSDateTimeValue.toString() : "null") + ", "); buffer.write("awsTimestampValue=" + - (_awsTimestampValue != null ? _awsTimestampValue!.toString() : "null") + + (_awsTimestampValue != null ? _awsTimestampValue.toString() : "null") + ", "); buffer.write("listOfAWSTimestampValue=" + (_listOfAWSTimestampValue != null - ? _listOfAWSTimestampValue!.toString() + ? _listOfAWSTimestampValue.toString() : "null") + ", "); buffer.write("awsEmailValue=" + "$_awsEmailValue" + ", "); buffer.write("listOfAWSEmailValue=" + (_listOfAWSEmailValue != null - ? _listOfAWSEmailValue!.toString() + ? _listOfAWSEmailValue.toString() : "null") + ", "); buffer.write("awsJsonValue=" + "$_awsJsonValue" + ", "); buffer.write("listOfAWSJsonValue=" + (_listOfAWSJsonValue != null - ? _listOfAWSJsonValue!.toString() + ? _listOfAWSJsonValue.toString() : "null") + ", "); buffer.write("awsPhoneValue=" + "$_awsPhoneValue" + ", "); buffer.write("listOfAWSPhoneValue=" + (_listOfAWSPhoneValue != null - ? _listOfAWSPhoneValue!.toString() + ? _listOfAWSPhoneValue.toString() : "null") + ", "); buffer.write("awsURLValue=" + "$_awsURLValue" + ", "); buffer.write("listOfAWSURLValue=" + - (_listOfAWSURLValue != null ? _listOfAWSURLValue!.toString() : "null") + + (_listOfAWSURLValue != null ? _listOfAWSURLValue.toString() : "null") + ", "); buffer.write("awsIPAddressValue=" + "$_awsIPAddressValue" + ", "); buffer.write("listOfAWSIPAddressValue=" + (_listOfAWSIPAddressValue != null - ? _listOfAWSIPAddressValue!.toString() + ? _listOfAWSIPAddressValue.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/ModelWithCustomType.dart b/packages/amplify_datastore/example/lib/models/ModelWithCustomType.dart index 49cf015547d..f7483b3ff0b 100644 --- a/packages/amplify_datastore/example/lib/models/ModelWithCustomType.dart +++ b/packages/amplify_datastore/example/lib/models/ModelWithCustomType.dart @@ -108,18 +108,18 @@ class ModelWithCustomType extends amplify_core.Model { buffer.write("ModelWithCustomType {"); buffer.write("id=" + "$id" + ", "); buffer.write("customTypeValue=" + - (_customTypeValue != null ? _customTypeValue!.toString() : "null") + + (_customTypeValue != null ? _customTypeValue.toString() : "null") + ", "); buffer.write("listOfCustomTypeValue=" + (_listOfCustomTypeValue != null - ? _listOfCustomTypeValue!.toString() + ? _listOfCustomTypeValue.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/ModelWithEnum.dart b/packages/amplify_datastore/example/lib/models/ModelWithEnum.dart index 1afcb1db7fc..6d698a1c036 100644 --- a/packages/amplify_datastore/example/lib/models/ModelWithEnum.dart +++ b/packages/amplify_datastore/example/lib/models/ModelWithEnum.dart @@ -105,16 +105,16 @@ class ModelWithEnum extends amplify_core.Model { ", "); buffer.write("listOfEnumField=" + (_listOfEnumField != null - ? _listOfEnumField! + ? _listOfEnumField .map((e) => amplify_core.enumToString(e)) .toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/MultiRelatedAttendee.dart b/packages/amplify_datastore/example/lib/models/MultiRelatedAttendee.dart index 9829bbb5b60..0a271df8e0c 100644 --- a/packages/amplify_datastore/example/lib/models/MultiRelatedAttendee.dart +++ b/packages/amplify_datastore/example/lib/models/MultiRelatedAttendee.dart @@ -92,10 +92,10 @@ class MultiRelatedAttendee extends amplify_core.Model { buffer.write("MultiRelatedAttendee {"); buffer.write("id=" + "$id" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/MultiRelatedMeeting.dart b/packages/amplify_datastore/example/lib/models/MultiRelatedMeeting.dart index ec605c07333..125cd76262b 100644 --- a/packages/amplify_datastore/example/lib/models/MultiRelatedMeeting.dart +++ b/packages/amplify_datastore/example/lib/models/MultiRelatedMeeting.dart @@ -112,10 +112,10 @@ class MultiRelatedMeeting extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("title=" + "$_title" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/MultiRelatedRegistration.dart b/packages/amplify_datastore/example/lib/models/MultiRelatedRegistration.dart index 2764d2dba17..589cee8cff3 100644 --- a/packages/amplify_datastore/example/lib/models/MultiRelatedRegistration.dart +++ b/packages/amplify_datastore/example/lib/models/MultiRelatedRegistration.dart @@ -121,15 +121,15 @@ class MultiRelatedRegistration extends amplify_core.Model { buffer.write("MultiRelatedRegistration {"); buffer.write("id=" + "$id" + ", "); buffer.write( - "meeting=" + (_meeting != null ? _meeting!.toString() : "null") + ", "); + "meeting=" + (_meeting != null ? _meeting.toString() : "null") + ", "); buffer.write("attendee=" + - (_attendee != null ? _attendee!.toString() : "null") + + (_attendee != null ? _attendee.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/Post.dart b/packages/amplify_datastore/example/lib/models/Post.dart index 09031c06d16..a3579f4a266 100644 --- a/packages/amplify_datastore/example/lib/models/Post.dart +++ b/packages/amplify_datastore/example/lib/models/Post.dart @@ -164,15 +164,15 @@ class Post extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("title=" + "$_title" + ", "); buffer.write( - "rating=" + (_rating != null ? _rating!.toString() : "null") + ", "); + "rating=" + (_rating != null ? _rating.toString() : "null") + ", "); buffer.write( - "created=" + (_created != null ? _created!.format() : "null") + ", "); - buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null") + ", "); + "created=" + (_created != null ? _created.format() : "null") + ", "); + buffer.write("blog=" + (_blog != null ? _blog.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/PostTags.dart b/packages/amplify_datastore/example/lib/models/PostTags.dart index b77b0ef9a90..c44f688721c 100644 --- a/packages/amplify_datastore/example/lib/models/PostTags.dart +++ b/packages/amplify_datastore/example/lib/models/PostTags.dart @@ -113,13 +113,13 @@ class PostTags extends amplify_core.Model { buffer.write("PostTags {"); buffer.write("id=" + "$id" + ", "); - buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); - buffer.write("tag=" + (_tag != null ? _tag!.toString() : "null") + ", "); + buffer.write("post=" + (_post != null ? _post.toString() : "null") + ", "); + buffer.write("tag=" + (_tag != null ? _tag.toString() : "null") + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/amplify_datastore/example/lib/models/Tag.dart b/packages/amplify_datastore/example/lib/models/Tag.dart index 971a4bb5d60..b6de2bac37e 100644 --- a/packages/amplify_datastore/example/lib/models/Tag.dart +++ b/packages/amplify_datastore/example/lib/models/Tag.dart @@ -107,10 +107,10 @@ class Tag extends amplify_core.Model { buffer.write("id=" + "$id" + ", "); buffer.write("label=" + "$_label" + ", "); buffer.write("createdAt=" + - (_createdAt != null ? _createdAt!.format() : "null") + + (_createdAt != null ? _createdAt.format() : "null") + ", "); buffer.write( - "updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + "updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null")); buffer.write("}"); return buffer.toString(); diff --git a/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_info_store_manager.dart b/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_info_store_manager.dart index 68d9463e787..54ffade7cc0 100644 --- a/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_info_store_manager.dart +++ b/packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_info_store_manager.dart @@ -61,7 +61,7 @@ class EndpointInfoStoreManager { if (storeVersion == null) { if (_legacyNativeDataProvider != null) { final legacyEndpointId = - await _legacyNativeDataProvider!.getEndpointId(_pinpointAppId); + await _legacyNativeDataProvider.getEndpointId(_pinpointAppId); if (legacyEndpointId != null) { await _endpointStore.write( key: EndpointStoreKey.endpointId.name, diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/custom_authorizer_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/custom_authorizer_test.dart index 3b6ff9fb6df..afa8f6ee503 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/custom_authorizer_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/custom_authorizer_test.dart @@ -4,7 +4,6 @@ import 'dart:convert'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; -import 'package:amplify_auth_cognito_example/amplifyconfiguration.dart'; import 'package:amplify_auth_integration_test/amplify_auth_integration_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_integration_test/amplify_integration_test.dart'; @@ -41,7 +40,7 @@ void main() { 'User Pools', skip: testRunner.shouldSkip(userPoolEnv), () { - final configJson = amplifyEnvironments[userPoolEnv]!; + final configJson = amplifyEnvironments[userPoolEnv]; final config = AmplifyConfig.fromJson( jsonDecode(configJson) as Map, ); diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/test_runner.dart b/packages/auth/amplify_auth_cognito/example/integration_test/test_runner.dart index 5cdb5f79adf..9daa2c9d6ae 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/test_runner.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/test_runner.dart @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; -import 'package:amplify_auth_cognito_example/amplifyconfiguration.dart'; import 'package:amplify_auth_integration_test/amplify_auth_integration_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/version_upgrade_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/version_upgrade_test.dart index 579039c8296..d1bb3dac591 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/version_upgrade_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/version_upgrade_test.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; -import 'package:amplify_auth_cognito_example/amplifyconfiguration.dart'; import 'package:amplify_auth_integration_test/amplify_auth_integration_test.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_integration_test/amplify_integration_test.dart'; @@ -15,7 +14,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'test_runner.dart'; import 'utils/validation_utils.dart'; -final config = amplifyEnvironments['device-tracking-always']!; +final config = amplifyEnvironments['device-tracking-always']; AmplifyAuthCognito get plugin => Amplify.Auth.getPlugin(AmplifyAuthCognito.pluginKey); diff --git a/packages/auth/amplify_auth_cognito/example/test_driver/hosted_ui_test.dart b/packages/auth/amplify_auth_cognito/example/test_driver/hosted_ui_test.dart index d2b1f712154..804f176f249 100644 --- a/packages/auth/amplify_auth_cognito/example/test_driver/hosted_ui_test.dart +++ b/packages/auth/amplify_auth_cognito/example/test_driver/hosted_ui_test.dart @@ -4,7 +4,6 @@ @TestOn('windows || mac-os || linux') import 'package:amplify_api_dart/amplify_api_dart.dart'; -import 'package:amplify_auth_cognito_example/amplifyconfiguration.dart'; import 'package:amplify_auth_cognito_test/hosted_ui/hosted_ui_client.dart'; import 'package:amplify_auth_cognito_test/hosted_ui/hosted_ui_common.dart'; import 'package:amplify_core/amplify_core.dart'; @@ -37,7 +36,7 @@ void main() { ); addTearDown(chromedriver.kill); - final config = amplifyEnvironments['hosted-ui']!; + final config = amplifyEnvironments['hosted-ui']; application = await HostedUiClient.connect(config); addTearDown(application.close); diff --git a/packages/auth/amplify_auth_cognito/lib/src/credentials/legacy_credential_provider_impl.dart b/packages/auth/amplify_auth_cognito/lib/src/credentials/legacy_credential_provider_impl.dart index ca86dc5b963..40736a0efc0 100644 --- a/packages/auth/amplify_auth_cognito/lib/src/credentials/legacy_credential_provider_impl.dart +++ b/packages/auth/amplify_auth_cognito/lib/src/credentials/legacy_credential_provider_impl.dart @@ -41,7 +41,7 @@ class LegacyCredentialProviderImpl implements LegacyCredentialProvider { CognitoOAuthConfig? hostedUiConfig, }) async { if (_instance == null) return null; - return _instance!.fetchLegacyCredentials( + return _instance.fetchLegacyCredentials( userPoolConfig: userPoolConfig, identityPoolConfig: identityPoolConfig, hostedUiConfig: hostedUiConfig, @@ -55,7 +55,7 @@ class LegacyCredentialProviderImpl implements LegacyCredentialProvider { CognitoOAuthConfig? hostedUiConfig, }) async { if (_instance == null) return; - return _instance!.deleteLegacyCredentials( + return _instance.deleteLegacyCredentials( userPoolConfig: userPoolConfig, identityPoolConfig: identityPoolConfig, hostedUiConfig: hostedUiConfig, @@ -68,7 +68,7 @@ class LegacyCredentialProviderImpl implements LegacyCredentialProvider { CognitoUserPoolConfig? userPoolConfig, }) async { if (_instance == null) return null; - return _instance!.fetchLegacyDeviceSecrets( + return _instance.fetchLegacyDeviceSecrets( username: username, userPoolConfig: userPoolConfig, ); @@ -80,7 +80,7 @@ class LegacyCredentialProviderImpl implements LegacyCredentialProvider { CognitoUserPoolConfig? userPoolConfig, }) async { if (_instance == null) return; - return _instance!.deleteLegacyDeviceSecrets( + return _instance.deleteLegacyDeviceSecrets( username: username, userPoolConfig: userPoolConfig, ); diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/auth_plugin_impl.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/auth_plugin_impl.dart index a68e5e4f5e6..b168e8ed345 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/auth_plugin_impl.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/auth_plugin_impl.dart @@ -164,10 +164,10 @@ class AmplifyAuthCognitoDart extends AuthPluginInterface ) ..addInstance(logger); if (_hostedUiPlatformFactory != null) { - _stateMachine.addBuilder(_hostedUiPlatformFactory!); + _stateMachine.addBuilder(_hostedUiPlatformFactory); } if (_initialParameters != null) { - _stateMachine.addInstance(_initialParameters!); + _stateMachine.addInstance(_initialParameters); } _stateMachineSubscription = _stateMachine.stream.listen( (state) { diff --git a/packages/auth/amplify_auth_cognito_test/lib/common/mock_clients.dart b/packages/auth/amplify_auth_cognito_test/lib/common/mock_clients.dart index b306d9a54b6..4461571da4d 100644 --- a/packages/auth/amplify_auth_cognito_test/lib/common/mock_clients.dart +++ b/packages/auth/amplify_auth_cognito_test/lib/common/mock_clients.dart @@ -213,7 +213,7 @@ class MockCognitoIdentityProviderClient AWSCredentialsProvider? credentialsProvider, }) => _mockIfProvided( - _initiateAuth == null ? null : () => _initiateAuth!(input), + _initiateAuth == null ? null : () => _initiateAuth(input), ); @override @@ -241,7 +241,7 @@ class MockCognitoIdentityProviderClient _mockIfProvided( _respondToAuthChallenge == null ? null - : () => _respondToAuthChallenge!(input), + : () => _respondToAuthChallenge(input), ); @override diff --git a/packages/auth/amplify_auth_cognito_test/lib/common/mock_oauth_server.dart b/packages/auth/amplify_auth_cognito_test/lib/common/mock_oauth_server.dart index f43ea576015..61698562f21 100644 --- a/packages/auth/amplify_auth_cognito_test/lib/common/mock_oauth_server.dart +++ b/packages/auth/amplify_auth_cognito_test/lib/common/mock_oauth_server.dart @@ -148,7 +148,7 @@ class MockOAuthServer { final MockClientHandler? _authorizeHandler; Future authorizeHandler(Request request) async { if (_authorizeHandler != null) { - return _authorizeHandler!(request); + return _authorizeHandler(request); } final query = request.url.queryParameters; diff --git a/packages/secure_storage/amplify_secure_storage_dart/lib/src/platforms/amplify_secure_storage_linux.dart b/packages/secure_storage/amplify_secure_storage_dart/lib/src/platforms/amplify_secure_storage_linux.dart index 82f2a09898e..f4a2ec495f9 100644 --- a/packages/secure_storage/amplify_secure_storage_dart/lib/src/platforms/amplify_secure_storage_linux.dart +++ b/packages/secure_storage/amplify_secure_storage_dart/lib/src/platforms/amplify_secure_storage_linux.dart @@ -97,7 +97,7 @@ class AmplifySecureStorageLinux extends AmplifySecureStorageInterface { /// The ID of the package, such as com.example.app Future _getPackageId() async { - if (_packageId != null) return _packageId!; + if (_packageId != null) return _packageId; return _packageIdMemo.runOnce(getApplicationId); } diff --git a/packages/smithy/smithy_codegen/lib/src/generator/context.dart b/packages/smithy/smithy_codegen/lib/src/generator/context.dart index 4982a946bd5..b1dec4c51bb 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/context.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/context.dart @@ -92,7 +92,7 @@ class CodegenContext { /// The name of the service being generated. String get serviceName { if (_serviceName != null) { - return _serviceName!; + return _serviceName; } final sdkId = service?.getTrait()?.sdkId; if (sdkId != null) { diff --git a/packages/smithy/smithy_test/lib/src/common.dart b/packages/smithy/smithy_test/lib/src/common.dart index 77a3d994238..9288e164897 100644 --- a/packages/smithy/smithy_test/lib/src/common.dart +++ b/packages/smithy/smithy_test/lib/src/common.dart @@ -9,7 +9,7 @@ import 'package:test/test.dart'; SmithyAst createAst(List shapes) { return SmithyAst( (b) => - b..shapes = ShapeMap({for (var shape in shapes) shape.shapeId: shape}), + b..shapes = ShapeMap({for (final shape in shapes) shape.shapeId: shape}), ); } diff --git a/packages/smithy/smithy_test/lib/src/xml/equatable.dart b/packages/smithy/smithy_test/lib/src/xml/equatable.dart index 6e38fd8a41f..d99e7e1ba56 100644 --- a/packages/smithy/smithy_test/lib/src/xml/equatable.dart +++ b/packages/smithy/smithy_test/lib/src/xml/equatable.dart @@ -26,7 +26,7 @@ class _EquatableVisitor with XmlVisitor { List _children(XmlHasChildren node) => [ ...[...node.childElements] ..sort((a, b) => a.name.local.compareTo(b.name.local)), - ...node.children.where((el) => el is! XmlElement) + ...node.children.where((el) => el is! XmlElement), ]; /// Visit an [XmlName]. diff --git a/packages/test/amplify_integration_test/lib/src/integration_test_utils/auth_cognito/types/delete_user_response.dart b/packages/test/amplify_integration_test/lib/src/integration_test_utils/auth_cognito/types/delete_user_response.dart index 5c6cf739475..ef710b80652 100644 --- a/packages/test/amplify_integration_test/lib/src/integration_test_utils/auth_cognito/types/delete_user_response.dart +++ b/packages/test/amplify_integration_test/lib/src/integration_test_utils/auth_cognito/types/delete_user_response.dart @@ -4,11 +4,11 @@ import 'dart:convert'; class DeleteUserResponse { - late bool success; - String? error; DeleteUserResponse.fromJson(String resolverData) { - Map parsedMap = (jsonDecode(resolverData) as Map).cast(); + final parsedMap = (jsonDecode(resolverData) as Map).cast(); success = parsedMap['deleteUser']['success'] as bool; error = parsedMap['deleteUser']['error'] as String?; } + late bool success; + String? error; } diff --git a/packages/test/amplify_integration_test/lib/src/stubs/amplify_auth_cognito_stub.dart b/packages/test/amplify_integration_test/lib/src/stubs/amplify_auth_cognito_stub.dart index 4285160278a..d363d66ecc8 100644 --- a/packages/test/amplify_integration_test/lib/src/stubs/amplify_auth_cognito_stub.dart +++ b/packages/test/amplify_integration_test/lib/src/stubs/amplify_auth_cognito_stub.dart @@ -67,11 +67,11 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface SignUpOptions? options, }) async { await Future.delayed(delay); - var user = _users[username]; + final user = _users[username]; if (user != null) { throw usernameExistsException; } else { - var newUser = MockCognitoUser( + final newUser = MockCognitoUser( username: username, password: password, email: options?.userAttributes['email'], @@ -111,7 +111,7 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface ResendSignUpCodeOptions? options, }) async { await Future.delayed(delay); - var user = _users[username]; + final user = _users[username]; if (user == null) { throw userNotFoundException; } @@ -125,7 +125,7 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface SignInOptions? options, }) async { await Future.delayed(delay); - var user = _users[username]; + final user = _users[username]; if (user == null) { throw userNotFoundException; } @@ -174,7 +174,7 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface ResetPasswordOptions? options, }) async { await Future.delayed(delay); - var user = _users[username]; + final user = _users[username]; if (user == null) { throw userNotFoundException; } @@ -195,14 +195,14 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface ConfirmResetPasswordOptions? options, }) async { await Future.delayed(delay); - var user = _users[username]; + final user = _users[username]; if (user == null) { throw userNotFoundException; } if (confirmationCode != verificationCode) { throw codeMismatchException; } - var updatedUser = user.copyWith(password: newPassword); + final updatedUser = user.copyWith(password: newPassword); _users[username] = updatedUser; _currentUser = updatedUser; return const CognitoResetPasswordResult( @@ -391,13 +391,6 @@ class AmplifyAuthCognitoStub extends AuthPluginInterface } class MockCognitoUser { - const MockCognitoUser._({ - required this.sub, - required this.username, - required this.password, - required this.phoneNumber, - required this.email, - }); factory MockCognitoUser({ required String username, @@ -413,6 +406,13 @@ class MockCognitoUser { phoneNumber: phoneNumber, ); } + const MockCognitoUser._({ + required this.sub, + required this.username, + required this.password, + required this.phoneNumber, + required this.email, + }); final String sub; final String username; final String password; diff --git a/templates/dart-package/hooks/post_gen.dart b/templates/dart-package/hooks/post_gen.dart index c0926dfafe0..72d5469e0d8 100644 --- a/templates/dart-package/hooks/post_gen.dart +++ b/templates/dart-package/hooks/post_gen.dart @@ -10,7 +10,7 @@ Future _runCommand(String command, [List args = const []]) async { stdoutEncoding: utf8, stderrEncoding: utf8, ); - if (await result.exitCode != 0) { + if (result.exitCode != 0) { throw Exception( 'Error running `$command ${args.join()}`:\n' '${result.stdout}\n${result.stderr}', diff --git a/templates/flutter-package/__brick__/example/lib/main.dart b/templates/flutter-package/__brick__/example/lib/main.dart index 8874f1183ba..d3fc17219ae 100644 --- a/templates/flutter-package/__brick__/example/lib/main.dart +++ b/templates/flutter-package/__brick__/example/lib/main.dart @@ -73,7 +73,7 @@ class _MyHomePageState extends State { ), Text( '$_counter', - style: Theme.of(context).textTheme.headline4, + style: Theme.of(context).textTheme.headlineMedium, ), ], ), diff --git a/templates/flutter-package/hooks/post_gen.dart b/templates/flutter-package/hooks/post_gen.dart index e03b47359c7..e9dc616b00e 100644 --- a/templates/flutter-package/hooks/post_gen.dart +++ b/templates/flutter-package/hooks/post_gen.dart @@ -10,7 +10,7 @@ Future _runCommand(String command, [List args = const []]) async { stdoutEncoding: utf8, stderrEncoding: utf8, ); - if (await result.exitCode != 0) { + if (result.exitCode != 0) { throw Exception( 'Error running `$command ${args.join()}`:\n' '${result.stdout}\n${result.stderr}', diff --git a/tool/send_metric_data.dart b/tool/send_metric_data.dart index a74c81887a8..a9049e14265 100755 --- a/tool/send_metric_data.dart +++ b/tool/send_metric_data.dart @@ -43,7 +43,7 @@ void main(List args) { value, ]; - if (!dimensionsTrimmed.isEmpty) { + if (dimensionsTrimmed.isNotEmpty) { cloudArgs.add('--dimensions'); cloudArgs.add(dimensionsTrimmed); }