diff --git a/canaries/test/widget_test.dart b/canaries/test/widget_test.dart index 0fc34b822d..4a753d63ef 100644 --- a/canaries/test/widget_test.dart +++ b/canaries/test/widget_test.dart @@ -5,11 +5,10 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. +import 'package:amplified_todo/main.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:amplified_todo/main.dart'; - void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. diff --git a/packages/aft/lib/src/commands/docs_command.dart b/packages/aft/lib/src/commands/docs_command.dart index 612392278d..3c1b7ee760 100644 --- a/packages/aft/lib/src/commands/docs_command.dart +++ b/packages/aft/lib/src/commands/docs_command.dart @@ -119,7 +119,7 @@ abstract class _DocsSubcommand extends AmplifyCommand '--fragment-dir-path=doc/.dart_tool/build/generated', '--yaml', '--write-in-place', - 'lib' + 'lib', ], ); } diff --git a/packages/aft/lib/src/commands/generate/generate_goldens_command.dart b/packages/aft/lib/src/commands/generate/generate_goldens_command.dart index b6ceddf7c1..ed8b86f81b 100644 --- a/packages/aft/lib/src/commands/generate/generate_goldens_command.dart +++ b/packages/aft/lib/src/commands/generate/generate_goldens_command.dart @@ -22,7 +22,7 @@ const awsProtocols = [ 'awsQuery', 'restJson1', 'restXml', - 'restXmlWithNamespace' + 'restXmlWithNamespace', ]; /// Command for generating the AWS SDK for a given package and `sdk.yaml` file. diff --git a/packages/aft/lib/src/commands/generate/generate_workflows_command.dart b/packages/aft/lib/src/commands/generate/generate_workflows_command.dart index 77c8612cf7..6b44cd919f 100644 --- a/packages/aft/lib/src/commands/generate/generate_workflows_command.dart +++ b/packages/aft/lib/src/commands/generate/generate_workflows_command.dart @@ -315,11 +315,11 @@ jobs: final androidPlatformPackagePaths = [ if (platformPackageAndroidTestDirExists) - '${repoRelativePath}_android/**/*' + '${repoRelativePath}_android/**/*', ]; final androidWorkflowPaths = [ '.github/workflows/$androidWorkflow', - p.relative(androidWorkflowFilepath, from: rootDir.path) + p.relative(androidWorkflowFilepath, from: rootDir.path), ]; final androidPathString = (androidPlatformPackagePaths + androidWorkflowPaths) @@ -396,11 +396,11 @@ jobs: ); final iosPlatformPackagePaths = [ - if (platformPackageDirExists) '${repoRelativePath}_ios/**/*' + if (platformPackageDirExists) '${repoRelativePath}_ios/**/*', ]; final iosWorkflowPaths = [ '.github/workflows/$iosWorkflow', - p.relative(iosWorkflowFilepath, from: rootDir.path) + p.relative(iosWorkflowFilepath, from: rootDir.path), ]; final iosPathString = (iosPlatformPackagePaths + iosWorkflowPaths) .map((path) => " - '$path'") diff --git a/packages/aft/lib/src/commands/link_command.dart b/packages/aft/lib/src/commands/link_command.dart index c6e1a3e941..d10649a418 100644 --- a/packages/aft/lib/src/commands/link_command.dart +++ b/packages/aft/lib/src/commands/link_command.dart @@ -88,7 +88,7 @@ Future _createPubspecOverride( 'url': v.url.toString(), if (ref != null) 'ref': ref, if (path != null) 'path': path, - } + }, }); } if (v is PathDependency) { diff --git a/packages/aft/lib/src/repo.dart b/packages/aft/lib/src/repo.dart index 0d3ba0139b..ae6edcccc7 100644 --- a/packages/aft/lib/src/repo.dart +++ b/packages/aft/lib/src/repo.dart @@ -449,7 +449,7 @@ class Repo { dependent.pubspecInfo.pubspecYamlEditor.update( [ if (hasDependency) 'dependencies' else 'dev_dependencies', - package.name + package.name, ], newConstraint, ); diff --git a/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart b/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart index 21e58a8dd3..10e8c6127e 100644 --- a/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart +++ b/packages/amplify_core/lib/src/config/amplify_plugin_registry.dart @@ -60,7 +60,7 @@ class AmplifyPluginRegistry { void _registerDefaultPlugins() { _plugins.addAll({ - for (var plugin in _defaultPlugins) plugin.name: plugin, + for (final plugin in _defaultPlugins) plugin.name: plugin, }); } diff --git a/packages/amplify_core/lib/src/hub/amplify_hub_impl.dart b/packages/amplify_core/lib/src/hub/amplify_hub_impl.dart index e15a5c0b8b..4852449bd0 100644 --- a/packages/amplify_core/lib/src/hub/amplify_hub_impl.dart +++ b/packages/amplify_core/lib/src/hub/amplify_hub_impl.dart @@ -77,7 +77,7 @@ class AmplifyHubImpl extends AmplifyHub { ]).ignore(); Future.wait([ for (final subs in _subscriptions.values) - for (final sub in subs) sub.cancel() + for (final sub in subs) sub.cancel(), ]).ignore(); _availableStreams.clear(); _subscriptions.clear(); diff --git a/packages/amplify_core/lib/src/types/auth/attribute/cognito_user_attribute_key.dart b/packages/amplify_core/lib/src/types/auth/attribute/cognito_user_attribute_key.dart index 2e87c38c81..c4eb781dc4 100644 --- a/packages/amplify_core/lib/src/types/auth/attribute/cognito_user_attribute_key.dart +++ b/packages/amplify_core/lib/src/types/auth/attribute/cognito_user_attribute_key.dart @@ -201,7 +201,7 @@ class CognitoUserAttributeKey extends AuthUserAttributeKey { sub, updatedAt, website, - zoneinfo + zoneinfo, ]; @override diff --git a/packages/amplify_core/lib/src/types/datastore/conflict_handler/datastore_conflict_handler.dart b/packages/amplify_core/lib/src/types/datastore/conflict_handler/datastore_conflict_handler.dart index 81c1e97912..b6aaa8cb57 100644 --- a/packages/amplify_core/lib/src/types/datastore/conflict_handler/datastore_conflict_handler.dart +++ b/packages/amplify_core/lib/src/types/datastore/conflict_handler/datastore_conflict_handler.dart @@ -55,6 +55,6 @@ class ConflictResolutionDecision { Map toJson() => { 'resolutionStrategy': _resolutionStrategy.name, - 'customModel': customModel?.toJson() + 'customModel': customModel?.toJson(), }; } diff --git a/packages/amplify_core/lib/src/types/datastore/sync/datastore_sync_expression.dart b/packages/amplify_core/lib/src/types/datastore/sync/datastore_sync_expression.dart index dda8bc4fd8..c2d5bc4ca5 100644 --- a/packages/amplify_core/lib/src/types/datastore/sync/datastore_sync_expression.dart +++ b/packages/amplify_core/lib/src/types/datastore/sync/datastore_sync_expression.dart @@ -25,7 +25,7 @@ class DataStoreSyncExpression { return { 'id': id, 'modelName': _modelType.modelName(), - 'queryPredicate': _queryPredicateResolver().serializeAsMap() + 'queryPredicate': _queryPredicateResolver().serializeAsMap(), }; } } diff --git a/packages/amplify_core/lib/src/types/query/query_field_operators.dart b/packages/amplify_core/lib/src/types/query/query_field_operators.dart index 41c719a1c5..3fd94f20ec 100644 --- a/packages/amplify_core/lib/src/types/query/query_field_operators.dart +++ b/packages/amplify_core/lib/src/types/query/query_field_operators.dart @@ -49,7 +49,7 @@ abstract class QueryFieldOperator { ) { return { 'operatorName': operatorName, - 'value': serializeDynamicValue(value) + 'value': serializeDynamicValue(value), }; } @@ -360,7 +360,7 @@ class BetweenQueryOperator> return { 'operatorName': QueryFieldOperatorType.between.toShortString(), 'start': serializeDynamicValue(start), - 'end': serializeDynamicValue(end) + 'end': serializeDynamicValue(end), }; } } diff --git a/packages/amplify_core/lib/src/types/query/query_predicate.dart b/packages/amplify_core/lib/src/types/query/query_predicate.dart index e7290c5827..03128a1b79 100644 --- a/packages/amplify_core/lib/src/types/query/query_predicate.dart +++ b/packages/amplify_core/lib/src/types/query/query_predicate.dart @@ -148,7 +148,7 @@ class QueryPredicateGroup extends QueryPredicate { 'queryPredicateGroup': { 'type': type.name, 'predicates': - predicates.map((predicate) => predicate.serializeAsMap()).toList() + predicates.map((predicate) => predicate.serializeAsMap()).toList(), }, }; } diff --git a/packages/amplify_core/test/config/auth_config_test.dart b/packages/amplify_core/test/config/auth_config_test.dart index ec855af577..4db2edab33 100644 --- a/packages/amplify_core/test/config/auth_config_test.dart +++ b/packages/amplify_core/test/config/auth_config_test.dart @@ -179,7 +179,7 @@ const expected = { 'email', 'openid', 'profile', - 'aws.cognito.signin.user.admin' + 'aws.cognito.signin.user.admin', ], signInRedirectUri: OAUTH_SIGNIN, signOutRedirectUri: OAUTH_SIGNOUT, diff --git a/packages/amplify_core/test/config/cli_config_test.dart b/packages/amplify_core/test/config/cli_config_test.dart index 8c15552903..2129d41037 100644 --- a/packages/amplify_core/test/config/cli_config_test.dart +++ b/packages/amplify_core/test/config/cli_config_test.dart @@ -177,5 +177,5 @@ const expected = { ), }, ), - ) + ), }; diff --git a/packages/amplify_core/test/config/unknown_test.dart b/packages/amplify_core/test/config/unknown_test.dart index 520627e22f..64ed3d5e51 100644 --- a/packages/amplify_core/test/config/unknown_test.dart +++ b/packages/amplify_core/test/config/unknown_test.dart @@ -18,8 +18,8 @@ void main() { 'auth': { 'plugins': { customPluginName: customPluginConfig, - } - } + }, + }, }; final config = AmplifyConfig.fromJson(json); diff --git a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/events_test.dart b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/events_test.dart index 3ba7d7f73c..c696593573 100644 --- a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/events_test.dart +++ b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/events_test.dart @@ -157,7 +157,7 @@ void main() { Map.fromEntries([ stringifiedBoolProperty, stringProperty, - secondStringProperty + secondStringProperty, ]), ), ) diff --git a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/identify_user_test.dart b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/identify_user_test.dart index 46013c4155..00a12e6951 100644 --- a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/identify_user_test.dart +++ b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/identify_user_test.dart @@ -64,7 +64,7 @@ void main() { location: location, customProperties: properties, userAttributes: { - stringProperty.key: [stringProperty.value, stringProperty.value] + stringProperty.key: [stringProperty.value, stringProperty.value], }, ), ); diff --git a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart index f3f91d084c..8b47cade45 100644 --- a/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart +++ b/packages/analytics/amplify_analytics_pinpoint/example/integration_test/no_unauth_test.dart @@ -19,7 +19,7 @@ void main() { for (final environmentName in const [ 'no-unauth-access', - 'no-unauth-identities' + 'no-unauth-identities', ]) { testWidgets(environmentName, (_) async { storageFactory(scope) => mockPersistedSecuredStorage; diff --git a/packages/analytics/amplify_analytics_pinpoint/example/lib/main.dart b/packages/analytics/amplify_analytics_pinpoint/example/lib/main.dart index 41d4b0e00f..08adabc474 100644 --- a/packages/analytics/amplify_analytics_pinpoint/example/lib/main.dart +++ b/packages/analytics/amplify_analytics_pinpoint/example/lib/main.dart @@ -136,7 +136,7 @@ class _MyAppState extends State { ..addDoubleProperty('${_userId}_endpoint_doubleKey', 10) ..addBoolProperty('${_userId}_endpoint_boolKey', false), userAttributes: { - '${_userId}_user_stringKey': ['stringValue', 'anotherStringValue'] + '${_userId}_user_stringKey': ['stringValue', 'anotherStringValue'], }, ); @@ -175,7 +175,7 @@ class _MyAppState extends State { Center( child: Text('Is Amplify Configured?: $_amplifyConfigured\n'), - ) + ), ], ), ), @@ -280,7 +280,7 @@ class _MyAppState extends State { ), ], ), - ) + ), ], ), ), diff --git a/packages/analytics/amplify_analytics_pinpoint_dart/test/event_client_test.dart b/packages/analytics/amplify_analytics_pinpoint_dart/test/event_client_test.dart index cc3d7f412a..af55075c87 100644 --- a/packages/analytics/amplify_analytics_pinpoint_dart/test/event_client_test.dart +++ b/packages/analytics/amplify_analytics_pinpoint_dart/test/event_client_test.dart @@ -304,7 +304,7 @@ void main() { '1': EventItemResponse( message: 'Retryable Exception', statusCode: 500, - ) + ), }, ), }, @@ -351,7 +351,7 @@ void main() { '1': EventItemResponse( message: 'ValidationException', statusCode: 400, - ) + ), }, ), }, diff --git a/packages/api/amplify_api/example/integration_test/util.dart b/packages/api/amplify_api/example/integration_test/util.dart index 5f589537c3..4efee87a8f 100644 --- a/packages/api/amplify_api/example/integration_test/util.dart +++ b/packages/api/amplify_api/example/integration_test/util.dart @@ -83,7 +83,7 @@ Future configureAmplify() async { macOSOptions: MacOSSecureStorageOptions(useDataProtection: false), ), ), - AmplifyAPI(modelProvider: ModelProvider.instance) + AmplifyAPI(modelProvider: ModelProvider.instance), ]); await Amplify.configure(amplifyconfig); } diff --git a/packages/api/amplify_api/example/lib/main.dart b/packages/api/amplify_api/example/lib/main.dart index 69aa1b4848..1175650f60 100644 --- a/packages/api/amplify_api/example/lib/main.dart +++ b/packages/api/amplify_api/example/lib/main.dart @@ -104,7 +104,7 @@ class _MyAppState extends State { ElevatedButton( onPressed: _onGraphQlApiViewButtonClick, child: const Text('GraphQL API'), - ) + ), ], ), ), diff --git a/packages/api/amplify_api/example/lib/widgets/auth_mode.dart b/packages/api/amplify_api/example/lib/widgets/auth_mode.dart index 2496a7d8e6..4460508f0f 100644 --- a/packages/api/amplify_api/example/lib/widgets/auth_mode.dart +++ b/packages/api/amplify_api/example/lib/widgets/auth_mode.dart @@ -32,9 +32,7 @@ class GraphQLAuthMode extends StatelessWidget { icon: const Icon(Icons.arrow_downward), isExpanded: true, elevation: 16, - onChanged: (APIAuthorizationType? value) { - setAuthType(value!); - }, + onChanged: (apiType) => setAuthType(apiType!), items: authTypes.map>( (APIAuthorizationType value) { return DropdownMenuItem( diff --git a/packages/api/amplify_api/test/connectivity_plus_platform_test.dart b/packages/api/amplify_api/test/connectivity_plus_platform_test.dart index 43cd732ccf..da0b87a082 100644 --- a/packages/api/amplify_api/test/connectivity_plus_platform_test.dart +++ b/packages/api/amplify_api/test/connectivity_plus_platform_test.dart @@ -79,7 +79,7 @@ void main() { ConnectivityStatus.connected, ConnectivityStatus.connected, ConnectivityStatus.disconnected, - ConnectivityStatus.connected + ConnectivityStatus.connected, ]), ); stream.listen(null); diff --git a/packages/api/amplify_api_dart/lib/src/graphql/factories/graphql_request_factory.dart b/packages/api/amplify_api_dart/lib/src/graphql/factories/graphql_request_factory.dart index 5aed615c5d..0cb87855c4 100644 --- a/packages/api/amplify_api_dart/lib/src/graphql/factories/graphql_request_factory.dart +++ b/packages/api/amplify_api_dart/lib/src/graphql/factories/graphql_request_factory.dart @@ -250,7 +250,7 @@ class GraphQLRequestFactory { return { 'filter': filter, 'limit': limit, - 'nextToken': nextToken + 'nextToken': nextToken, }; } @@ -312,7 +312,7 @@ class GraphQLRequestFactory { return { fieldName: _queryFieldOperatorToPartialGraphQLFilter( queryPredicate.queryFieldOperator, - ) + ), }; } @@ -329,7 +329,7 @@ class GraphQLRequestFactory { typeExpression: queryPredicateToGraphQLFilter( queryPredicate.predicates[0], modelType, - ) + ), }; } // Public not() API only allows 1 condition but QueryPredicateGroup @@ -346,7 +346,7 @@ class GraphQLRequestFactory { (predicate) => queryPredicateToGraphQLFilter(predicate, modelType)!, ) - .toList() + .toList(), }; } @@ -443,15 +443,15 @@ Map _queryFieldOperatorToPartialGraphQLFilter( final filterExpression = _getGraphQLFilterExpression(queryFieldOperator.type); if (queryFieldOperator is QueryFieldOperatorSingleValue) { return { - filterExpression: _getSerializedValue(queryFieldOperator.value) + filterExpression: _getSerializedValue(queryFieldOperator.value), }; } if (queryFieldOperator is BetweenQueryOperator) { return { filterExpression: [ _getSerializedValue(queryFieldOperator.start), - _getSerializedValue(queryFieldOperator.end) - ] + _getSerializedValue(queryFieldOperator.end), + ], }; } @@ -470,7 +470,7 @@ String _getGraphQLFilterExpression(QueryFieldOperatorType operatorType) { QueryFieldOperatorType.greater_or_equal: 'ge', QueryFieldOperatorType.between: 'between', QueryFieldOperatorType.contains: 'contains', - QueryFieldOperatorType.begins_with: 'beginsWith' + QueryFieldOperatorType.begins_with: 'beginsWith', }; final result = dictionary[operatorType]; if (result == null) { diff --git a/packages/api/amplify_api_dart/lib/src/graphql/helpers/graphql_response_decoder.dart b/packages/api/amplify_api_dart/lib/src/graphql/helpers/graphql_response_decoder.dart index 4694b4bc2b..fcba949129 100644 --- a/packages/api/amplify_api_dart/lib/src/graphql/helpers/graphql_response_decoder.dart +++ b/packages/api/amplify_api_dart/lib/src/graphql/helpers/graphql_response_decoder.dart @@ -92,7 +92,7 @@ class GraphQLResponseDecoder { if (resultNextToken != null) { final variablesWithNextToken = { ...request.variables, - _nextToken: resultNextToken + _nextToken: resultNextToken, }; requestForNextResult = GraphQLRequest( document: request.document, diff --git a/packages/api/amplify_api_dart/lib/src/graphql/utils.dart b/packages/api/amplify_api_dart/lib/src/graphql/utils.dart index 87b1f589dc..e8db5b07d1 100644 --- a/packages/api/amplify_api_dart/lib/src/graphql/utils.dart +++ b/packages/api/amplify_api_dart/lib/src/graphql/utils.dart @@ -146,7 +146,7 @@ Map transformAppSyncJsonToModelJson( _serializedData: transformAppSyncJsonToModelJson( e as Map, parentSchema, - ) + ), }, ) .toList(); @@ -155,7 +155,7 @@ Map transformAppSyncJsonToModelJson( _serializedData: transformAppSyncJsonToModelJson( parentData as Map, parentSchema, - ) + ), }; }); } @@ -174,7 +174,7 @@ Map transformAppSyncJsonToModelJson( _serializedData: transformAppSyncJsonToModelJson( item as Map, childSchema, - ) + ), }, ) .toList(); diff --git a/packages/api/amplify_api_dart/lib/src/graphql/web_socket/types/web_socket_types.dart b/packages/api/amplify_api_dart/lib/src/graphql/web_socket/types/web_socket_types.dart index 37491ed1ba..61b24c0b15 100644 --- a/packages/api/amplify_api_dart/lib/src/graphql/web_socket/types/web_socket_types.dart +++ b/packages/api/amplify_api_dart/lib/src/graphql/web_socket/types/web_socket_types.dart @@ -109,8 +109,8 @@ class SubscriptionRegistrationPayload extends WebSocketMessagePayload { {'variables': request.variables, 'query': request.document}, ), 'extensions': >{ - 'authorization': authorizationHeaders - } + 'authorization': authorizationHeaders, + }, }; } } diff --git a/packages/api/amplify_api_dart/test/graphql_helpers_legacy_schema_test.dart b/packages/api/amplify_api_dart/test/graphql_helpers_legacy_schema_test.dart index 331a4f43ba..fe79a994f1 100644 --- a/packages/api/amplify_api_dart/test/graphql_helpers_legacy_schema_test.dart +++ b/packages/api/amplify_api_dart/test/graphql_helpers_legacy_schema_test.dart @@ -105,7 +105,7 @@ void main() { 'input': { 'id': id, 'name': name, - } + }, }; const expectedDoc = 'mutation createBlog(\$input: CreateBlogInput!, \$condition: ModelBlogConditionInput) { createBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -136,8 +136,8 @@ void main() { 'id': postId, 'title': title, 'rating': rating, - 'blogID': blogId - } + 'blogID': blogId, + }, }; const expectedDoc = 'mutation createPost(\$input: CreatePostInput!, \$condition: ModelPostConditionInput) { createPost(input: \$input, condition: \$condition) { id title rating createdAt updatedAt blog { $blogSelectionSet } blogID owner } }'; @@ -169,7 +169,7 @@ void main() { test('query by ID', () { const blogId = 'blog-123'; final expectedFilter = { - 'id': {'eq': blogId} + 'id': {'eq': blogId}, }; testQueryPredicateTranslation( @@ -182,7 +182,7 @@ void main() { test('query child by parent ID', () { const blogId = 'blog-123'; final expectedFilter = { - 'blogID': {'eq': blogId} + 'blogID': {'eq': blogId}, }; testQueryPredicateTranslation( @@ -195,7 +195,7 @@ void main() { test('query by legacy QueryField definition', () { const blogId = 'blog-123'; final expectedFilter = { - 'id': {'eq': blogId} + 'id': {'eq': blogId}, }; testQueryPredicateTranslation( diff --git a/packages/api/amplify_api_dart/test/graphql_helpers_mtm_test.dart b/packages/api/amplify_api_dart/test/graphql_helpers_mtm_test.dart index fc1d09ea56..0082f4ce7e 100644 --- a/packages/api/amplify_api_dart/test/graphql_helpers_mtm_test.dart +++ b/packages/api/amplify_api_dart/test/graphql_helpers_mtm_test.dart @@ -73,8 +73,8 @@ void main() { 'input': { 'id': 'firstMtmRelationId', 'manyToManyPrimaryId': 'mtmPrimaryId', - 'manyToManySecondaryId': 'mtmSecondaryId' - } + 'manyToManySecondaryId': 'mtmSecondaryId', + }, }; final primary = ManyToManyPrimary( @@ -110,9 +110,9 @@ void main() { 'input': { 'id': 'firstMtmRelationId', 'manyToManyPrimaryId': 'mtmPrimaryId', - 'manyToManySecondaryId': 'mtmSecondaryId' + 'manyToManySecondaryId': 'mtmSecondaryId', }, - 'condition': null + 'condition': null, }; final primary = ManyToManyPrimary( @@ -149,15 +149,15 @@ void main() { 'id': 'id-first-mtm-relation', 'manyToManyPrimary': { 'id': 'id-mtm-primary', - 'name': 'mtm primary' + 'name': 'mtm primary', }, 'manyToManySecondary': { 'id': 'id-mtm-secondary', - 'name': 'mtm secondary' - } + 'name': 'mtm secondary', + }, } - ] - } + ], + }, }; final response = GraphQLResponseDecoder.instance diff --git a/packages/api/amplify_api_dart/test/graphql_helpers_test.dart b/packages/api/amplify_api_dart/test/graphql_helpers_test.dart index c0ff011241..3b4747ab9a 100644 --- a/packages/api/amplify_api_dart/test/graphql_helpers_test.dart +++ b/packages/api/amplify_api_dart/test/graphql_helpers_test.dart @@ -301,7 +301,7 @@ void main() { const expectedDocument = 'query listBlogs(\$filter: ModelBlogFilterInput, \$limit: Int, \$nextToken: String) { listBlogs(filter: \$filter, limit: \$limit, nextToken: \$nextToken) { items { $blogSelectionSet } nextToken } }'; const expectedFilter = { - 'name': {'eq': expectedTitle} + 'name': {'eq': expectedTitle}, }; final queryPredicate = Blog.NAME.eq(expectedTitle); @@ -320,7 +320,7 @@ void main() { const limit = 2; const expectedTitle = 'Test Blog 1'; const expectedFilter = { - 'name': {'eq': expectedTitle} + 'name': {'eq': expectedTitle}, }; final queryPredicate = Blog.NAME.eq(expectedTitle); @@ -427,7 +427,7 @@ void main() { final Blog blog = Blog(id: id, name: name); final expectedVars = { - 'input': {'id': id, 'name': name} + 'input': {'id': id, 'name': name}, }; const expectedDoc = 'mutation createBlog(\$input: CreateBlogInput!, \$condition: ModelBlogConditionInput) { createBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -471,8 +471,8 @@ void main() { 'title': title, 'rating': rating, 'created': null, - 'blogID': blogId - } + 'blogID': blogId, + }, }; const expectedDoc = 'mutation createPost(\$input: CreatePostInput!, \$condition: ModelPostConditionInput) { createPost(input: \$input, condition: \$condition) { id title rating created createdAt updatedAt blog { $blogSelectionSet } blogID } }'; @@ -524,7 +524,7 @@ void main() { final expectedVars = { 'input': {'id': id}, - 'condition': null + 'condition': null, }; const expectedDoc = 'mutation deleteBlog(\$input: DeleteBlogInput!, \$condition: ModelBlogConditionInput) { deleteBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -560,7 +560,7 @@ void main() { final expectedVars = { 'input': {'id': id}, - 'condition': null + 'condition': null, }; const expectedDoc = 'mutation deleteBlog(\$input: DeleteBlogInput!, \$condition: ModelBlogConditionInput) { deleteBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -602,7 +602,7 @@ void main() { final expectedVars = { 'input': {'id': id, 'name': name}, - 'condition': null + 'condition': null, }; const expectedDoc = 'mutation updateBlog(\$input: UpdateBlogInput!, \$condition: ModelBlogConditionInput) { updateBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -634,9 +634,9 @@ void main() { 'title': title, 'rating': rating, 'created': null, - 'blogID': blogId + 'blogID': blogId, }, - 'condition': null + 'condition': null, }; const expectedDoc = 'mutation updatePost(\$input: UpdatePostInput!, \$condition: ModelPostConditionInput) { updatePost(input: \$input, condition: \$condition) { id title rating created createdAt updatedAt blog { $blogSelectionSet } blogID } }'; @@ -657,8 +657,8 @@ void main() { final expectedVars = { 'input': {'id': id, 'name': name}, 'condition': { - 'name': {'lt': 'zzz'} - } + 'name': {'lt': 'zzz'}, + }, }; const expectedDoc = 'mutation updateBlog(\$input: UpdateBlogInput!, \$condition: ModelBlogConditionInput) { updateBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -695,8 +695,8 @@ void main() { final expectedVars = { 'input': {'id': id}, 'condition': { - 'name': {'lt': 'zzz'} - } + 'name': {'lt': 'zzz'}, + }, }; const expectedDoc = 'mutation deleteBlog(\$input: DeleteBlogInput!, \$condition: ModelBlogConditionInput) { deleteBlog(input: \$input, condition: \$condition) { $blogSelectionSet } }'; @@ -738,8 +738,8 @@ void main() { 'cpkOneToOneBidirectionalParentCDImplicitChildId': null, 'cpkOneToOneBidirectionalParentCDImplicitChildName': null, 'cpkOneToOneBidirectionalParentCDExplicitChildId': null, - 'cpkOneToOneBidirectionalParentCDExplicitChildName': null - } + 'cpkOneToOneBidirectionalParentCDExplicitChildName': null, + }, }; expect(deepEquals(req.variables, expectedVars), isTrue); }, @@ -765,7 +765,7 @@ void main() { 'name': child.name, 'belongsToParentID': customParentId, 'belongsToParentName': parent.name, - } + }, }; expect(deepEquals(req.variables, expectedVars), isTrue); }); @@ -798,8 +798,8 @@ void main() { ); final expectedFilter = { 'filter': { - 'name': {'eq': 'sample'} - } + 'name': {'eq': 'sample'}, + }, }; expect(req.document, expected); @@ -835,8 +835,8 @@ void main() { ); final expectedFilter = { 'filter': { - 'name': {'eq': 'sample'} - } + 'name': {'eq': 'sample'}, + }, }; expect(req.apiName, _exampleApiName); @@ -871,8 +871,8 @@ void main() { ); final expectedFilter = { 'filter': { - 'name': {'eq': 'sample'} - } + 'name': {'eq': 'sample'}, + }, }; expect(req.apiName, _exampleApiName); @@ -896,7 +896,7 @@ void main() { final blogInput = { 'id': 'abc123', 'name': 'Lorem Ipsum', - 'posts': null + 'posts': null, }; final blogOutput = transformAppSyncJsonToModelJson(blogInput, Blog.schema); @@ -907,7 +907,7 @@ void main() { 'title': 'Lorem Ipsum', 'rating': 0, 'comments': null, - 'blog': null + 'blog': null, }; final postOutput = transformAppSyncJsonToModelJson(postInput, Post.schema); @@ -920,9 +920,9 @@ void main() { 'name': 'Lorem Ipsum', 'posts': { 'items': [ - {'id': 'xyz456', 'rating': 0, 'title': 'Lorem ipsum'} - ] - } + {'id': 'xyz456', 'rating': 0, 'title': 'Lorem ipsum'}, + ], + }, }; final expectedOutput = { 'id': 'abc123', @@ -932,10 +932,10 @@ void main() { 'serializedData': { 'id': 'xyz456', 'rating': 0, - 'title': 'Lorem ipsum' - } + 'title': 'Lorem ipsum', + }, } - ] + ], }; final output = transformAppSyncJsonToModelJson(input, Blog.schema); expect(output, expectedOutput); @@ -948,10 +948,10 @@ void main() { 'rating': 0, 'comments': { 'items': [ - {'id': 'def456', 'content': 'Worst... post... ever!'} - ] + {'id': 'def456', 'content': 'Worst... post... ever!'}, + ], }, - 'blog': {'id': 'abc123', 'title': 'blog about life'} + 'blog': {'id': 'abc123', 'title': 'blog about life'}, }; final expectedOutput = { 'id': 'xyz456', @@ -961,13 +961,13 @@ void main() { { 'serializedData': { 'id': 'def456', - 'content': 'Worst... post... ever!' - } + 'content': 'Worst... post... ever!', + }, } ], 'blog': { - 'serializedData': {'id': 'abc123', 'title': 'blog about life'} - } + 'serializedData': {'id': 'abc123', 'title': 'blog about life'}, + }, }; final output = transformAppSyncJsonToModelJson(input, Post.schema); expect(output, expectedOutput); @@ -980,15 +980,15 @@ void main() { 'id': 'xyz456', 'title': 'Lorem Ipsum', 'rating': 0, - 'blog': {'id': 'abc123', 'title': 'blog about life'} + 'blog': {'id': 'abc123', 'title': 'blog about life'}, }, { 'id': 'lmn456', 'title': 'Lorem Ipsum better', 'rating': 0, - 'blog': {'id': 'abc123', 'title': 'blog about life'} + 'blog': {'id': 'abc123', 'title': 'blog about life'}, } - ] + ], }; final expectedOutput = { 'items': [ @@ -997,18 +997,18 @@ void main() { 'title': 'Lorem Ipsum', 'rating': 0, 'blog': { - 'serializedData': {'id': 'abc123', 'title': 'blog about life'} - } + 'serializedData': {'id': 'abc123', 'title': 'blog about life'}, + }, }, { 'id': 'lmn456', 'title': 'Lorem Ipsum better', 'rating': 0, 'blog': { - 'serializedData': {'id': 'abc123', 'title': 'blog about life'} - } + 'serializedData': {'id': 'abc123', 'title': 'blog about life'}, + }, } - ] + ], }; final output = transformAppSyncJsonToModelJson( input, @@ -1025,10 +1025,10 @@ void main() { 'id': 'xyz456', 'title': 'Lorem Ipsum', 'rating': 0, - 'blog': {'id': 'abc123', 'title': 'blog about life'} + 'blog': {'id': 'abc123', 'title': 'blog about life'}, }, - null - ] + null, + ], }; final expectedOutput = { 'items': [ @@ -1037,11 +1037,11 @@ void main() { 'title': 'Lorem Ipsum', 'rating': 0, 'blog': { - 'serializedData': {'id': 'abc123', 'title': 'blog about life'} - } + 'serializedData': {'id': 'abc123', 'title': 'blog about life'}, + }, }, - null - ] + null, + ], }; final output = transformAppSyncJsonToModelJson( input, @@ -1058,10 +1058,10 @@ void main() { 'rating': 0, 'comments': { 'items': [ - {'id': 'def456', 'content': 'Worst... post... ever!'} - ] + {'id': 'def456', 'content': 'Worst... post... ever!'}, + ], }, - 'blog': {'id': 'abc123', 'title': 'blog about life'} + 'blog': {'id': 'abc123', 'title': 'blog about life'}, }; final output = transformAppSyncJsonToModelJson(input, Comment.schema); expect(output, input); @@ -1070,13 +1070,13 @@ void main() { test('should translate custom type model', () { final input = { 'id': 'xyz456', - 'customTypeValue': {'stringValue': 'abc123'} + 'customTypeValue': {'stringValue': 'abc123'}, }; final expectedOutput = { 'id': 'xyz456', 'customTypeValue': { - 'serializedData': {'stringValue': 'abc123'} - } + 'serializedData': {'stringValue': 'abc123'}, + }, }; final output = transformAppSyncJsonToModelJson( input, diff --git a/packages/api/amplify_api_dart/test/graphql_test.dart b/packages/api/amplify_api_dart/test/graphql_test.dart index 79fd1dfebf..aa3e567536 100644 --- a/packages/api/amplify_api_dart/test/graphql_test.dart +++ b/packages/api/amplify_api_dart/test/graphql_test.dart @@ -28,11 +28,11 @@ const _expectedQuerySuccessResponseBody = { { 'id': 'TEST_ID', 'name': 'Test App Blog', - 'createdAt': '2022-06-28T17:36:52.460Z' + 'createdAt': '2022-06-28T17:36:52.460Z', } - ] - } - } + ], + }, + }, }; final _modelQueryId = uuid(); @@ -41,30 +41,30 @@ final _expectedModelQueryResult = { 'getBlog': { 'createdAt': '2021-07-21T22:23:33.707Z', 'id': _modelQueryId, - 'name': 'Test App Blog' - } - } + 'name': 'Test App Blog', + }, + }, }; const _expectedMutateSuccessResponseBody = { 'data': { 'createBlog': { 'id': 'TEST_ID', 'name': 'Test App Blog', - 'createdAt': '2022-07-06T18:42:26.126Z' - } - } + 'createdAt': '2022-07-06T18:42:26.126Z', + }, + }, }; // Error Mocks const _errorMessage = 'Unable to parse GraphQL query.'; const _errorLocations = [ {'line': 2, 'column': 3}, - {'line': 4, 'column': 5} + {'line': 4, 'column': 5}, ]; const _errorPath = ['a', 1, 'b']; const _errorExtensions = { 'a': 'blah', - 'b': {'c': 'd'} + 'b': {'c': 'd'}, }; const _errorType = 'DynamoDB:ConditionalCheckFailedException'; const _errorInfo = {'a': 'b'}; @@ -79,7 +79,7 @@ const _expectedErrorResponseBody = { 'errorType': _errorType, 'errorInfo': _errorInfo, }, - ] + ], }; const _authErrorMessage = 'Not authorized'; @@ -89,7 +89,7 @@ const _expectedAuthErrorResponseBody = { { 'message': _authErrorMessage, }, - ] + ], }; final mockHttpClient = MockAWSHttpClient((request, _) async { diff --git a/packages/api/amplify_api_dart/test/plugin_configuration_test.dart b/packages/api/amplify_api_dart/test/plugin_configuration_test.dart index 5f648f3db1..1acbfc8d32 100644 --- a/packages/api/amplify_api_dart/test/plugin_configuration_test.dart +++ b/packages/api/amplify_api_dart/test/plugin_configuration_test.dart @@ -20,11 +20,11 @@ const _expectedQuerySuccessResponseBody = { { 'id': 'TEST_ID', 'name': 'Test App Blog', - 'createdAt': '2022-06-28T17:36:52.460Z' + 'createdAt': '2022-06-28T17:36:52.460Z', } - ] - } - } + ], + }, + }, }; /// Asserts user agent and API key present. diff --git a/packages/api/amplify_api_dart/test/query_predicate_graphql_filter_test.dart b/packages/api/amplify_api_dart/test/query_predicate_graphql_filter_test.dart index aacbbfb884..9a6a985896 100644 --- a/packages/api/amplify_api_dart/test/query_predicate_graphql_filter_test.dart +++ b/packages/api/amplify_api_dart/test/query_predicate_graphql_filter_test.dart @@ -26,7 +26,7 @@ void main() { test('simple query predicate converts to expected filter', () { const expectedTitle = 'Blog name ABC'; const expectedFilter = { - 'name': {'eq': expectedTitle} + 'name': {'eq': expectedTitle}, }; final queryPredicate = Blog.NAME.eq(expectedTitle); @@ -44,12 +44,12 @@ void main() { const expectedFilter = { 'and': [ { - 'id': {'eq': 'id'} + 'id': {'eq': 'id'}, }, { - 'created': {'eq': dateString} + 'created': {'eq': dateString}, }, - ] + ], }; testQueryPredicateTranslation( queryPredicate, @@ -62,8 +62,8 @@ void main() { final queryPredicate = not(Blog.ID.eq('id')); const expectedFilter = { 'not': { - 'id': {'eq': 'id'} - } + 'id': {'eq': 'id'}, + }, }; testQueryPredicateTranslation( queryPredicate, @@ -89,35 +89,35 @@ void main() { const expectedFilter = { 'and': [ { - 'id': {'ne': 'id'} + 'id': {'ne': 'id'}, }, { - 'id': {'eq': 'id'} + 'id': {'eq': 'id'}, }, { - 'id': {'lt': 'id'} + 'id': {'lt': 'id'}, }, { - 'id': {'le': 'id'} + 'id': {'le': 'id'}, }, { - 'id': {'gt': 'id'} + 'id': {'gt': 'id'}, }, { - 'id': {'ge': 'id'} + 'id': {'ge': 'id'}, }, { - 'id': {'contains': 'id'} + 'id': {'contains': 'id'}, }, { 'id': { - 'between': ['id', 'id'] - } + 'between': ['id', 'id'], + }, }, { - 'id': {'beginsWith': 'id'} + 'id': {'beginsWith': 'id'}, } - ] + ], }; testQueryPredicateTranslation( queryPredicate, @@ -132,19 +132,19 @@ void main() { const expectedFilter = { 'and': [ { - 'id': {'eq': 'id'} + 'id': {'eq': 'id'}, }, { 'or': [ { - 'name': {'beginsWith': 'Title'} + 'name': {'beginsWith': 'Title'}, }, { - 'name': {'contains': 'Turtles'} + 'name': {'contains': 'Turtles'}, } - ] + ], } - ] + ], }; testQueryPredicateTranslation( queryPredicate, @@ -159,19 +159,19 @@ void main() { const expectedFilter = { 'or': [ { - 'id': {'eq': 'id'} + 'id': {'eq': 'id'}, }, { 'and': [ { - 'name': {'beginsWith': 'Title'} + 'name': {'beginsWith': 'Title'}, }, { - 'name': {'contains': 'Turtles'} + 'name': {'contains': 'Turtles'}, } - ] + ], }, - ] + ], }; testQueryPredicateTranslation( queryPredicate, @@ -184,7 +184,7 @@ void main() { const dateString = '2019-11-23T02:06:50.689000000Z'; final exampleValue = TemporalDateTime(DateTime.parse(dateString)); const expectedFilter = { - 'created': {'le': dateString} + 'created': {'le': dateString}, }; final queryPredicate = Post.CREATED.le(exampleValue); @@ -199,7 +199,7 @@ void main() { const dateString = '2019-11-23'; final exampleValue = TemporalDate(DateTime.parse(dateString)); const expectedFilter = { - 'created': {'le': dateString} + 'created': {'le': dateString}, }; final queryPredicate = Post.CREATED.le(exampleValue); @@ -214,7 +214,7 @@ void main() { const dateString = '02:06:50.689000000'; final exampleValue = TemporalTime.fromString(dateString); const expectedFilter = { - 'created': {'le': dateString} + 'created': {'le': dateString}, }; final queryPredicate = Post.CREATED.le(exampleValue); @@ -229,7 +229,7 @@ void main() { const dateString = '2019-11-23T02:06:50.689000000Z'; final exampleValue = DateTime.parse(dateString); const expectedFilter = { - 'created': {'le': dateString} + 'created': {'le': dateString}, }; final queryPredicate = Post.CREATED.le(exampleValue); @@ -244,7 +244,7 @@ void main() { const blogId = 'blog-123'; final queryPredicate = Post.BLOG.eq(blogId); final expectedFilter = { - 'blogID': {'eq': blogId} + 'blogID': {'eq': blogId}, }; testQueryPredicateTranslation( @@ -259,7 +259,7 @@ void main() { // expect this predicate to translate as follows. final queryPredicate = Post.TITLE.eq(Size.medium); final expectedFilter = { - 'title': {'eq': Size.medium.name} + 'title': {'eq': Size.medium.name}, }; testQueryPredicateTranslation( diff --git a/packages/api/amplify_api_dart/test/util.dart b/packages/api/amplify_api_dart/test/util.dart index c97f8404d2..ada83fec74 100644 --- a/packages/api/amplify_api_dart/test/util.dart +++ b/packages/api/amplify_api_dart/test/util.dart @@ -113,14 +113,14 @@ const mockSubscriptionData = { 'createdAt': '2022-08-15T18:22:15.164Z', 'file': null, 'files': null, - 'updatedAt': '2022-08-15T18:22:15.164Z' - } - } + 'updatedAt': '2022-08-15T18:22:15.164Z', + }, + }, }; const mockAckMessage = { 'type': 'connection_ack', - 'payload': {'connectionTimeoutMs': 300000} + 'payload': {'connectionTimeoutMs': 300000}, }; final isATestPost = isA().having( diff --git a/packages/api/amplify_api_dart/test/web_socket/web_socket_bloc_test.dart b/packages/api/amplify_api_dart/test/web_socket/web_socket_bloc_test.dart index f6f54f5658..cf4ca8f769 100644 --- a/packages/api/amplify_api_dart/test/web_socket/web_socket_bloc_test.dart +++ b/packages/api/amplify_api_dart/test/web_socket/web_socket_bloc_test.dart @@ -35,8 +35,8 @@ void main() { 'onCreateBlog': { 'id': '', 'name': 'Unit Test Blog', - 'createdAt': '2022-09-12T18:03:36.230Z' - } + 'createdAt': '2022-09-12T18:03:36.230Z', + }, }; final mockDataString = jsonEncode({ diff --git a/packages/api/amplify_api_dart/test/web_socket/web_socket_types_test.dart b/packages/api/amplify_api_dart/test/web_socket/web_socket_types_test.dart index f308f0b0e8..0b5a3f116f 100644 --- a/packages/api/amplify_api_dart/test/web_socket/web_socket_types_test.dart +++ b/packages/api/amplify_api_dart/test/web_socket/web_socket_types_test.dart @@ -18,7 +18,7 @@ void main() { MessageTypeTestEntry( { 'type': 'connection_ack', - 'payload': {'connectionTimeoutMs': 300000} + 'payload': {'connectionTimeoutMs': 300000}, }, MessageType.connectionAck, ), @@ -42,11 +42,11 @@ void main() { 'id': 'def-789', 'name': 'Integration Test Blog - subscription create', 'createdAt': '2022-09-26T21:41:14.711Z', - 'updatedAt': '2022-09-26T21:41:14.711Z' - } + 'updatedAt': '2022-09-26T21:41:14.711Z', + }, }, - 'errors': null - } + 'errors': null, + }, }, MessageType.data, ), @@ -58,10 +58,10 @@ void main() { 'errors': [ { 'errorType': 'UnknownOperationError', - 'message': 'Unknown operation id abc-456' + 'message': 'Unknown operation id abc-456', } - ] - } + ], + }, }, MessageType.error, ), @@ -83,13 +83,13 @@ void main() { final errors = [ { 'message': errorMessage, - 'path': ['onCreateBlog', 'updatedAt'] + 'path': ['onCreateBlog', 'updatedAt'], } ]; final entry = { 'id': 'xyz-456', 'type': 'data', - 'payload': {'data': null, 'errors': errors} + 'payload': {'data': null, 'errors': errors}, }; final message = WebSocketMessage.fromJson(entry); expect(message.messageType, MessageType.data); diff --git a/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart b/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart index 86f0451999..65bc116c76 100644 --- a/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart +++ b/packages/auth/amplify_auth_cognito/example/integration_test/user_attributes_test.dart @@ -57,7 +57,7 @@ void main() { AuthUserAttribute( userAttributeKey: AuthUserAttributeKey.phoneNumber, value: phoneNumber, - ) + ), ], ); diff --git a/packages/auth/amplify_auth_cognito/example/lib/screens/sign_in.dart b/packages/auth/amplify_auth_cognito/example/lib/screens/sign_in.dart index 511162aeee..cc706478f9 100644 --- a/packages/auth/amplify_auth_cognito/example/lib/screens/sign_in.dart +++ b/packages/auth/amplify_auth_cognito/example/lib/screens/sign_in.dart @@ -189,7 +189,7 @@ class _SignInWidgetState extends State { items: [ AuthProvider.google, AuthProvider.facebook, - AuthProvider.amazon + AuthProvider.amazon, ].map>((AuthProvider value) { return DropdownMenuItem( value: value, @@ -198,7 +198,7 @@ class _SignInWidgetState extends State { }).toList(), ), ], - ) + ), ], ), ), diff --git a/packages/auth/amplify_auth_cognito/example/lib/screens/update_user_attributes.dart b/packages/auth/amplify_auth_cognito/example/lib/screens/update_user_attributes.dart index e1fe267fab..bf371daf94 100644 --- a/packages/auth/amplify_auth_cognito/example/lib/screens/update_user_attributes.dart +++ b/packages/auth/amplify_auth_cognito/example/lib/screens/update_user_attributes.dart @@ -178,7 +178,7 @@ class _UpdateUserAttributesScreenState size: 18, ), onPressed: () => _removeAttribute(element), - ) + ), ], ), ], diff --git a/packages/auth/amplify_auth_cognito/example/lib/screens/view_user_attributes.dart b/packages/auth/amplify_auth_cognito/example/lib/screens/view_user_attributes.dart index 5c9cc1ff51..f00f0ec154 100644 --- a/packages/auth/amplify_auth_cognito/example/lib/screens/view_user_attributes.dart +++ b/packages/auth/amplify_auth_cognito/example/lib/screens/view_user_attributes.dart @@ -75,7 +75,7 @@ class _ViewUserAttributesScreenState extends State { IconButton( icon: const Icon(Icons.refresh), onPressed: () => _fetchAttributes(isRefresh: true), - ) + ), ], ), body: Builder( diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/attribute_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/attribute_component.dart index 0b91d6ddce..05a88990fa 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/attribute_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/attribute_component.dart @@ -122,7 +122,7 @@ class UserAttributeComponent extends StatefulComponent { ), ], ), - ButtonComponent(innerHtml: 'Submit', onClick: _save) + ButtonComponent(innerHtml: 'Submit', onClick: _save), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/change_password_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/change_password_component.dart index 8e7c616cba..93d3d9b886 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/change_password_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/change_password_component.dart @@ -76,7 +76,7 @@ class ChangePasswordComponent extends StatefulComponent { onClick: _changePassword, ), ], - ) + ), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_attribute_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_attribute_component.dart index efafcdbda5..b121c8888a 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_attribute_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_attribute_component.dart @@ -67,13 +67,13 @@ abstract class ConfirmAttributeComponent extends StatefulComponent { onChanged: (value) { _confirmationCode = value ?? ''; }, - ) + ), ], ), ], ), ButtonComponent(innerHtml: 'Confirm', onClick: _confirm), - ButtonComponent(innerHtml: 'Resend code', onClick: _resendCode) + ButtonComponent(innerHtml: 'Resend code', onClick: _resendCode), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_new_password_form_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_new_password_form_component.dart index 414fdac252..c1c7bfc977 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_new_password_form_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_new_password_form_component.dart @@ -86,7 +86,7 @@ class ConfirmNewPasswordFormComponent extends StatefulComponent { onClick: _confirmPassword, ), ], - ) + ), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_sign_in_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_sign_in_component.dart index b93ac433e1..f69d1d41d7 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_sign_in_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/confirm_sign_in_component.dart @@ -67,7 +67,7 @@ class ConfirmSignInComponent extends StatefulComponent { onClick: _confirmSignIn, ), ], - ) + ), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/forgot_password_form_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/forgot_password_form_component.dart index 308d333a59..e59af92c63 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/forgot_password_form_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/forgot_password_form_component.dart @@ -64,7 +64,7 @@ class ForgotPasswordFormComponent extends StatefulComponent { onClick: _forgotPassword, ), ], - ) + ), ], ); } diff --git a/packages/auth/amplify_auth_cognito_dart/example/web/components/user_component.dart b/packages/auth/amplify_auth_cognito_dart/example/web/components/user_component.dart index 7dfa2d1b95..a086b98445 100644 --- a/packages/auth/amplify_auth_cognito_dart/example/web/components/user_component.dart +++ b/packages/auth/amplify_auth_cognito_dart/example/web/components/user_component.dart @@ -39,14 +39,14 @@ class UserComponent extends StatefulComponent { ['refreshToken', session.userPoolTokensResult.value.refreshToken], [ 'credential session', - session.credentialsResult.value.sessionToken ?? 'null' + session.credentialsResult.value.sessionToken ?? 'null', ], ...devices.map((device) => device.asCognitoDevice).map( (device) => [ 'Device: ${device.id}', device.attributes.toString(), ], - ) + ), ]; }); } diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signout/cognito_sign_out_result.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signout/cognito_sign_out_result.dart index fc9f15beac..d3119a0b17 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/model/signout/cognito_sign_out_result.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/model/signout/cognito_sign_out_result.dart @@ -106,7 +106,7 @@ final class CognitoPartialSignOut extends CognitoSignOutResult { hostedUiException, globalSignOutException, revokeTokenException, - signedOutLocally + signedOutLocally, ]; @override diff --git a/packages/auth/amplify_auth_cognito_dart/lib/src/state/machines/sign_in_state_machine.dart b/packages/auth/amplify_auth_cognito_dart/lib/src/state/machines/sign_in_state_machine.dart index 9d3f2d3c15..509e32fa36 100644 --- a/packages/auth/amplify_auth_cognito_dart/lib/src/state/machines/sign_in_state_machine.dart +++ b/packages/auth/amplify_auth_cognito_dart/lib/src/state/machines/sign_in_state_machine.dart @@ -676,7 +676,7 @@ final class SignInStateMachine ..userAttributes.addAll([ for (final MapEntry(:key, :value) in _attributesNeedingUpdate!.entries) - AttributeType(name: key.key, value: value) + AttributeType(name: key.key, value: value), ]), ), ) diff --git a/packages/auth/amplify_auth_cognito_test/test/jwt/keyset_test.dart b/packages/auth/amplify_auth_cognito_test/test/jwt/keyset_test.dart index 1d050fdb86..d7a04e6e8f 100644 --- a/packages/auth/amplify_auth_cognito_test/test/jwt/keyset_test.dart +++ b/packages/auth/amplify_auth_cognito_test/test/jwt/keyset_test.dart @@ -62,7 +62,7 @@ void main() { keyId: '2011-04-29', ), ]), - ) + ), ]; for (var i = 0; i < tests.length; i++) { diff --git a/packages/authenticator/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart b/packages/authenticator/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart index b7aed61401..80bf7f2b60 100644 --- a/packages/authenticator/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart +++ b/packages/authenticator/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart @@ -236,7 +236,7 @@ class TermsAndConditionsCheckBox extends FormField { ); }, child: const Text('terms and conditions'), - ) + ), ], ), value: state.value, diff --git a/packages/authenticator/amplify_authenticator/example/lib/main.dart b/packages/authenticator/amplify_authenticator/example/lib/main.dart index 9c26e83648..62f25380e0 100644 --- a/packages/authenticator/amplify_authenticator/example/lib/main.dart +++ b/packages/authenticator/amplify_authenticator/example/lib/main.dart @@ -121,7 +121,7 @@ class _MyAppState extends State { SignUpFormField.custom( title: 'Age', attributeKey: const CognitoUserAttributeKey.custom('age'), - ) + ), ], ), diff --git a/packages/authenticator/amplify_authenticator/lib/amplify_authenticator.dart b/packages/authenticator/amplify_authenticator/lib/amplify_authenticator.dart index 06f62a70e6..b24c99d961 100644 --- a/packages/authenticator/amplify_authenticator/lib/amplify_authenticator.dart +++ b/packages/authenticator/amplify_authenticator/lib/amplify_authenticator.dart @@ -311,7 +311,7 @@ class Authenticator extends StatefulWidget { ErrorSummary('Invalid initialStep'), ErrorDescription( 'initialStep must be one of the following values: \n - ${validInitialAuthenticatorSteps.join('\n -')}', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/l10n/authenticator_localizations.dart b/packages/authenticator/amplify_authenticator/lib/src/l10n/authenticator_localizations.dart index bce4836e68..d46afbf80c 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/l10n/authenticator_localizations.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/l10n/authenticator_localizations.dart @@ -26,7 +26,7 @@ abstract class AuthenticatorLocalizations { AuthenticatorButtonLocalizations.delegate, AuthenticatorTitleLocalizations.delegate, AuthenticatorInputLocalizations.delegate, - AuthenticatorCountryLocalizations.delegate + AuthenticatorCountryLocalizations.delegate, ]; static final _buttonsFallback = AuthenticatorButtonLocalizationsEn(); diff --git a/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_radio_field.dart b/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_radio_field.dart index 6e48f46e0f..de6ddeace5 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_radio_field.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/mixins/authenticator_radio_field.dart @@ -22,7 +22,7 @@ mixin AuthenticatorRadioField[ - for (var selection in selections) + for (final selection in selections) ListTile( key: Key('${selection.value}${widget.titleKey}'), horizontalTitleGap: 0, diff --git a/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart b/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart index 3da05ecd69..f085de0e86 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart @@ -247,7 +247,7 @@ class _AuthenticatorTabViewState TabBar( controller: _controller, tabs: [ - for (var tab in widget.tabs) + for (final tab in widget.tabs) Tab( key: ValueKey(tab), text: stringResolver.buttons.resolve(context, tab.tabTitle), diff --git a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_auth_bloc.dart b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_auth_bloc.dart index 55b3676f35..431ec0cd60 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_auth_bloc.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_auth_bloc.dart @@ -30,7 +30,7 @@ class InheritedAuthBloc extends InheritedWidget { ErrorSummary('No InheritedAuthBloc widget found.'), ErrorDescription( 'Make sure your app is wrapped with an Authenticator widget.', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_builder.dart b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_builder.dart index f8f66217b8..578298acf2 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_builder.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_builder.dart @@ -32,7 +32,7 @@ class InheritedAuthenticatorBuilder extends InheritedWidget { ErrorSummary('No InheritedAuthenticatorBuilder widget found.'), ErrorDescription( 'Make sure your app is wrapped with an Authenticator widget.', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_state.dart b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_state.dart index 1dc452b904..6904a6d6b0 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_state.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_authenticator_state.dart @@ -34,7 +34,7 @@ class InheritedAuthenticatorState extends InheritedNotifier { ErrorSummary('No InheritedAuthenticatorState widget found.'), ErrorDescription( 'Make sure your app is wrapped with an Authenticator widget.', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_forms.dart b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_forms.dart index 2feec3e9d2..f3af16439c 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_forms.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_forms.dart @@ -66,7 +66,7 @@ class InheritedForms extends InheritedWidget { ErrorSummary('No InheritedForms widget found.'), ErrorDescription( 'Make sure your app is wrapped with an Authenticator widget.', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_strings.dart b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_strings.dart index 6b4df02c56..670146dc4d 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/state/inherited_strings.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/state/inherited_strings.dart @@ -23,7 +23,7 @@ class InheritedStrings extends InheritedWidget { ErrorSummary('No InheritedStrings widget found.'), ErrorDescription( 'Make sure your app is wrapped with an Authenticator widget.', - ) + ), ]); } return true; diff --git a/packages/authenticator/amplify_authenticator/lib/src/utils/country_code.dart b/packages/authenticator/amplify_authenticator/lib/src/utils/country_code.dart index 0bec603d64..05e4d9cca8 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/utils/country_code.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/utils/country_code.dart @@ -260,7 +260,7 @@ const countryCodes = [ Country('WF', '681', CountryResolverKey.wf$), Country('YE', '967', CountryResolverKey.ye$), Country('ZM', '260', CountryResolverKey.zm$), - Country('ZW', '263', CountryResolverKey.zw$) + Country('ZW', '263', CountryResolverKey.zw$), ]; const initialCountryCode = Country('US', '1', CountryResolverKey.us$); diff --git a/packages/authenticator/amplify_authenticator/lib/src/utils/list.dart b/packages/authenticator/amplify_authenticator/lib/src/utils/list.dart index 86f923822e..b100ec57e0 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/utils/list.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/utils/list.dart @@ -4,10 +4,10 @@ extension ListX on List { List spacedBy(T spacer) { return [ - for (var item in this) ...[ + for (final item in this) ...[ item, spacer, - ] + ], ]..removeLast(); } } diff --git a/packages/authenticator/amplify_authenticator/lib/src/widgets/form.dart b/packages/authenticator/amplify_authenticator/lib/src/widgets/form.dart index 22b4beb71b..609725674d 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/widgets/form.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/widgets/form.dart @@ -118,7 +118,7 @@ class AuthenticatorFormState ErrorDescription( 'If you are using prebuilt Form Field widgets to create a custom Authenticator UI, ' 'ensure that they are a descendant of a AuthenticatorForm widget.', - ) + ), ]), ), ); @@ -187,7 +187,7 @@ class AuthenticatorFormState if (runtimeActions.isNotEmpty) ...[ const Divider(), ...runtimeActions, - ] + ], ].spacedBy(const SizedBox(height: 12)), ), ], @@ -636,7 +636,7 @@ class ConfirmResetPasswordForm extends AuthenticatorForm { fields: const [ ResetPasswordFormField.verificationCode(), ResetPasswordFormField.newPassword(), - ResetPasswordFormField.passwordConfirmation() + ResetPasswordFormField.passwordConfirmation(), ], actions: const [ ConfirmResetPasswordButton(), diff --git a/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/verify_user_form_field.dart b/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/verify_user_form_field.dart index 6da870f95d..5e73bd1042 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/verify_user_form_field.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/verify_user_form_field.dart @@ -155,7 +155,7 @@ class _VerifyAttributeFieldState const InputSelection( label: InputResolverKey.phoneNumberTitle, value: CognitoUserAttributeKey.phoneNumber, - ) + ), ]; initialValue = selections.first.value; WidgetsBinding.instance.addPostFrameCallback((_) { diff --git a/packages/authenticator/amplify_authenticator/lib/src/widgets/social/social_button.dart b/packages/authenticator/amplify_authenticator/lib/src/widgets/social/social_button.dart index 4329c7fb43..bb1eaa3fa9 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/widgets/social/social_button.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/widgets/social/social_button.dart @@ -58,7 +58,7 @@ class SocialSignInButtons extends StatelessAuthenticatorComponent { return Column( children: [ - for (var provider in providers) + for (final provider in providers) SocialSignInButton(provider: provider, maxWidth: maxWidth), ].spacedBy(const SizedBox(height: 12)), ); diff --git a/packages/aws_common/lib/src/http/aws_http_client_io.dart b/packages/aws_common/lib/src/http/aws_http_client_io.dart index 41c2ebb939..7e8485fd88 100644 --- a/packages/aws_common/lib/src/http/aws_http_client_io.dart +++ b/packages/aws_common/lib/src/http/aws_http_client_io.dart @@ -185,7 +185,7 @@ class AWSHttpClientImpl extends AWSHttpClient { 'authorization', 'www-authenticate', 'cookie', - 'cookie2' + 'cookie2', ]; return !nonRedirectHeaders.contains(headerKey.toLowerCase()); } diff --git a/packages/aws_common/test/config/file_location_test.dart b/packages/aws_common/test/config/file_location_test.dart index ed3f47f81c..9963547245 100644 --- a/packages/aws_common/test/config/file_location_test.dart +++ b/packages/aws_common/test/config/file_location_test.dart @@ -18,7 +18,7 @@ void main() { 'HOME': r'/home/user', 'USERPROFILE': r'ignored', 'HOMEDRIVE': r'ignored', - 'HOMEPATH': r'ignored' + 'HOMEPATH': r'ignored', }, () { expect( @@ -46,7 +46,7 @@ void main() { 'HOME': r'C:\users\user', 'USERPROFILE': r'ignored', 'HOMEDRIVE': r'ignored', - 'HOMEPATH': r'ignored' + 'HOMEPATH': r'ignored', }, () { expect( @@ -73,7 +73,7 @@ void main() { { 'USERPROFILE': r'C:\users\user', 'HOMEDRIVE': r'ignored', - 'HOMEPATH': r'ignored' + 'HOMEPATH': r'ignored', }, () { expect( @@ -145,7 +145,7 @@ void main() { overrideEnvironment( { 'AWS_SHARED_CREDENTIALS_FILE': r'/other/path/credentials', - 'HOME': r'/home/user' + 'HOME': r'/home/user', }, () { expect( @@ -171,7 +171,7 @@ void main() { overrideEnvironment( { 'AWS_CONFIG_FILE': r'C:\other\path\config', - 'HOME': r'C:\users\user' + 'HOME': r'C:\users\user', }, () { expect( @@ -197,7 +197,7 @@ void main() { overrideEnvironment( { 'AWS_SHARED_CREDENTIALS_FILE': r'C:\other\path\credentials', - 'HOME': r'C:\users\user' + 'HOME': r'C:\users\user', }, () { expect( diff --git a/packages/aws_common/test/http/aws_http_request_test.dart b/packages/aws_common/test/http/aws_http_request_test.dart index 34a2a8589a..aea8822399 100644 --- a/packages/aws_common/test/http/aws_http_request_test.dart +++ b/packages/aws_common/test/http/aws_http_request_test.dart @@ -37,7 +37,7 @@ void main() { request.queryParametersAll, equals({ 'abc': ['123', '456'], - 'def': ['000'] + 'def': ['000'], }), ); @@ -91,7 +91,7 @@ void main() { Stream> makeBody() => Stream.fromIterable([ [0], [1], - [2] + [2], ]); final emitsBody = emitsInOrder([ orderedEquals([0]), @@ -127,7 +127,7 @@ void main() { request.queryParametersAll, equals({ 'abc': ['123', '456'], - 'def': ['000'] + 'def': ['000'], }), ); diff --git a/packages/aws_common/test/http/client_conformance_tests/response_headers_test.dart b/packages/aws_common/test/http/client_conformance_tests/response_headers_test.dart index cbd2f9906f..ba0d6bf33f 100644 --- a/packages/aws_common/test/http/client_conformance_tests/response_headers_test.dart +++ b/packages/aws_common/test/http/client_conformance_tests/response_headers_test.dart @@ -38,7 +38,7 @@ void main() { headers: const { 'field1': 'value1', 'field2': 'value2', - 'field3': 'value3' + 'field3': 'value3', }, ); final response = await client().send(request).response; diff --git a/packages/aws_common/test/http/http_payload_test.dart b/packages/aws_common/test/http/http_payload_test.dart index 2c8cfc5f23..36a25497d1 100644 --- a/packages/aws_common/test/http/http_payload_test.dart +++ b/packages/aws_common/test/http/http_payload_test.dart @@ -107,7 +107,7 @@ void main() { base64Decode( 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==', ), - emitsDone + emitsDone, ]), ); }); diff --git a/packages/aws_common/test/js/readable_stream_test.dart b/packages/aws_common/test/js/readable_stream_test.dart index d0aa10cde6..ea8f253282 100644 --- a/packages/aws_common/test/js/readable_stream_test.dart +++ b/packages/aws_common/test/js/readable_stream_test.dart @@ -52,7 +52,7 @@ void main() { test('', () { final stream = Stream.fromIterable([ [1, 2, 3, 4, 5], - [6, 7, 8, 9, 0] + [6, 7, 8, 9, 0], ]); final readableStream = stream.asReadableStream(); expect( diff --git a/packages/aws_sdk/smoke_test/lib/src/sdk/src/api_gateway/model/deployment.g.dart b/packages/aws_sdk/smoke_test/lib/src/sdk/src/api_gateway/model/deployment.g.dart index 6cd35ab316..5eda14147b 100644 --- a/packages/aws_sdk/smoke_test/lib/src/sdk/src/api_gateway/model/deployment.g.dart +++ b/packages/aws_sdk/smoke_test/lib/src/sdk/src/api_gateway/model/deployment.g.dart @@ -68,10 +68,9 @@ class DeploymentBuilder implements Builder { set createdDate(DateTime? createdDate) => _$this._createdDate = createdDate; _i3.MapBuilder>? _apiSummary; - _i3.MapBuilder> get apiSummary => _$this - ._apiSummary ??= - new _i3.MapBuilder>(); + _i3.MapBuilder> + get apiSummary => _$this._apiSummary ??= new _i3 + .MapBuilder>(); set apiSummary( _i3.MapBuilder>? apiSummary) => diff --git a/packages/aws_signature_v4/test/streamed_request_test.dart b/packages/aws_signature_v4/test/streamed_request_test.dart index 94e8bf8ab6..2585c58da3 100644 --- a/packages/aws_signature_v4/test/streamed_request_test.dart +++ b/packages/aws_signature_v4/test/streamed_request_test.dart @@ -24,7 +24,7 @@ void main() { Stream> makeBody() => Stream.fromIterable([ [0], [1], - [2] + [2], ]); group('base service configuration', () { diff --git a/packages/common/amplify_db_common_dart/example/web/main.dart b/packages/common/amplify_db_common_dart/example/web/main.dart index 70c3cc0385..85235dfbcf 100644 --- a/packages/common/amplify_db_common_dart/example/web/main.dart +++ b/packages/common/amplify_db_common_dart/example/web/main.dart @@ -84,7 +84,7 @@ class AppComponent extends StatefulComponent { ButtonComponent( innerHtml: 'Add', onClick: _insert, - ) + ), ], ), RowComponent( @@ -92,7 +92,7 @@ class AppComponent extends StatefulComponent { ButtonComponent( innerHtml: 'Re-query Database', onClick: _query, - ) + ), ], ), if (_loading) TextComponent('Loading ...'), @@ -106,7 +106,7 @@ class AppComponent extends StatefulComponent { rows: _todos.map((e) => [e.title, e.content]).toList(), ), ), - ) + ), ], ), ); diff --git a/packages/example_common/example/web/main.dart b/packages/example_common/example/web/main.dart index 9e393e1205..c2899c4586 100644 --- a/packages/example_common/example/web/main.dart +++ b/packages/example_common/example/web/main.dart @@ -11,7 +11,7 @@ void main() { labelText: 'Example Form Field', onChanged: (_) {}, ), - ButtonComponent(innerHtml: 'Example Button', onClick: () {}) + ButtonComponent(innerHtml: 'Example Button', onClick: () {}), ], ), ); diff --git a/packages/notifications/push/amplify_push_notifications/test/test_data/fake_notification_messges.dart b/packages/notifications/push/amplify_push_notifications/test/test_data/fake_notification_messges.dart index e40e4f3874..29cc89b050 100644 --- a/packages/notifications/push/amplify_push_notifications/test/test_data/fake_notification_messges.dart +++ b/packages/notifications/push/amplify_push_notifications/test/test_data/fake_notification_messges.dart @@ -14,8 +14,8 @@ const standardAndroidPushMessage = { 'pinpoint.notification.title': 'TITTLE', 'pinpoint.notification.body': 'BODY', 'pinpoint.campaign.campaign_id': '_DIRECT', - 'pinpoint.notification.silentPush': 0 - } + 'pinpoint.notification.silentPush': 0, + }, }; const urlsAndroidMessage = { @@ -31,8 +31,8 @@ const urlsAndroidMessage = { 'pinpoint.notification.title': 'TITTLE', 'pinpoint.notification.body': 'BODY', 'pinpoint.campaign.campaign_id': '_DIRECT', - 'pinpoint.notification.silentPush': 0 - } + 'pinpoint.notification.silentPush': 0, + }, }; const imageUrlAndroidPushMessage = { @@ -48,8 +48,8 @@ const imageUrlAndroidPushMessage = { 'pinpoint.notification.title': 'TITTLE', 'pinpoint.notification.body': 'BODY', 'pinpoint.campaign.campaign_id': '_DIRECT', - 'pinpoint.notification.silentPush': 0 - } + 'pinpoint.notification.silentPush': 0, + }, }; const standardiOSMessage = { @@ -57,7 +57,7 @@ const standardiOSMessage = { 'alert': {'title': 'TITTLE', 'body': 'BODY'}, 'mutable-content': 0, 'content-available': 1, - } + }, }; const imageUrliOSMessage = { @@ -68,16 +68,16 @@ const imageUrliOSMessage = { 'alert': {'title': 'TITTLE', 'body': 'BODY'}, 'mutable-content': 0, 'content-available': 1, - } + }, }; const urlsiOSMessage = { 'data': { - 'pinpoint': {'deeplink': 'URL'} + 'pinpoint': {'deeplink': 'URL'}, }, 'aps': { 'alert': {'title': 'TITTLE', 'body': 'BODY'}, 'mutable-content': 0, - 'content-available': 1 - } + 'content-available': 1, + }, }; diff --git a/packages/notifications/push/amplify_push_notifications_pinpoint/test/push_notifications_background_processing_test.dart b/packages/notifications/push/amplify_push_notifications_pinpoint/test/push_notifications_background_processing_test.dart index f7865c325a..e8655a5375 100644 --- a/packages/notifications/push/amplify_push_notifications_pinpoint/test/push_notifications_background_processing_test.dart +++ b/packages/notifications/push/amplify_push_notifications_pinpoint/test/push_notifications_background_processing_test.dart @@ -59,7 +59,7 @@ void main() { ); expect(log, [ - isMethodCall('amplifyBackgroundProcessorFinished', arguments: null) + isMethodCall('amplifyBackgroundProcessorFinished', arguments: null), ]); }); }); diff --git a/packages/notifications/push/amplify_push_notifications_pinpoint/test/test_data/fake_notification_messges.dart b/packages/notifications/push/amplify_push_notifications_pinpoint/test/test_data/fake_notification_messges.dart index fde25af695..398c7225ad 100644 --- a/packages/notifications/push/amplify_push_notifications_pinpoint/test/test_data/fake_notification_messges.dart +++ b/packages/notifications/push/amplify_push_notifications_pinpoint/test/test_data/fake_notification_messges.dart @@ -16,15 +16,15 @@ const androidJourneyMessage = { 'journey': { 'journey_activity_id': 'JOURNEY_ACTIVITY_ID', 'journey_run_id': 'JOURNEY_RUN_ID', - 'journey_id': 'JOURNEY_ID' - } + 'journey_id': 'JOURNEY_ID', + }, }, 'pinpoint.notification.body': 'BODY', 'data': { - 'pinpoint': {'endpointId': 'ENDPOINTID'} + 'pinpoint': {'endpointId': 'ENDPOINTID'}, }, - 'pinpoint.notification.silentPush': 0 - } + 'pinpoint.notification.silentPush': 0, + }, }; const androidCampaignMessage = { @@ -41,19 +41,19 @@ const androidCampaignMessage = { 'pinpoint.notification.title': 'TITTLE', 'pinpoint.notification.body': 'BODY', 'data': { - 'pinpoint': {'endpointId': 'ENDPOINTID'} + 'pinpoint': {'endpointId': 'ENDPOINTID'}, }, 'pinpoint.campaign.campaign_id': 'CAMPAIGN_ID', 'pinpoint.notification.silentPush': 0, - 'pinpoint.campaign.campaign_activity_id': 'CAMPAIGN_ACTIVITY_ID' - } + 'pinpoint.campaign.campaign_activity_id': 'CAMPAIGN_ACTIVITY_ID', + }, }; const iosCampaignMessage = { 'aps': { 'alert': {'title': 'TITTLE', 'body': 'BODY'}, 'mutable-content': 0, - 'content-available': 1 + 'content-available': 1, }, 'data': { 'pinpoint': { @@ -61,10 +61,10 @@ const iosCampaignMessage = { 'campaign': { 'treatment_id': 0, 'campaign_id': 'CAMPAIGN_ID', - 'campaign_activity_id': 'CAMPAIGN_ACTIVITY_ID' - } - } - } + 'campaign_activity_id': 'CAMPAIGN_ACTIVITY_ID', + }, + }, + }, }; const iosJourneyMessage = { @@ -73,14 +73,14 @@ const iosJourneyMessage = { 'journey': { 'journey_run_id': 'JOURNEY_RUN_ID', 'journey_activity_id': 'JOURNEY_ACTIVITY_ID', - 'journey_id': 'JOURNEY_ID' + 'journey_id': 'JOURNEY_ID', }, - 'endpointId': 'ENDPOINT_ID' - } + 'endpointId': 'ENDPOINT_ID', + }, }, 'aps': { 'alert': {'title': 'TITTLE', 'body': 'BODY'}, 'mutable-content': 0, - 'content-available': 1 - } + 'content-available': 1, + }, }; diff --git a/packages/secure_storage/amplify_secure_storage_dart/example/web/main.dart b/packages/secure_storage/amplify_secure_storage_dart/example/web/main.dart index 590ebbdf4e..7b193ddf1d 100644 --- a/packages/secure_storage/amplify_secure_storage_dart/example/web/main.dart +++ b/packages/secure_storage/amplify_secure_storage_dart/example/web/main.dart @@ -96,9 +96,9 @@ class AppComponent extends StatefulComponent { onClick: _delete, ), ], - ) + ), ], - ) + ), ], ), ); diff --git a/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.debug.dart b/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.debug.dart index cc61e7afd0..a5df12480a 100644 --- a/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.debug.dart +++ b/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.debug.dart @@ -4,6 +4,6 @@ import 'package:amplify_secure_storage_dart/src/worker/secure_storage_worker.dar import 'package:worker_bee/worker_bee.dart'; final _workers = { - 'SecureStorageWorker': SecureStorageWorker.create + 'SecureStorageWorker': SecureStorageWorker.create, }; void main() => runHive(_workers); diff --git a/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.release.dart b/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.release.dart index cc61e7afd0..a5df12480a 100644 --- a/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.release.dart +++ b/packages/secure_storage/amplify_secure_storage_dart/lib/src/worker/workers.release.dart @@ -4,6 +4,6 @@ import 'package:amplify_secure_storage_dart/src/worker/secure_storage_worker.dar import 'package:worker_bee/worker_bee.dart'; final _workers = { - 'SecureStorageWorker': SecureStorageWorker.create + 'SecureStorageWorker': SecureStorageWorker.create, }; void main() => runHive(_workers); diff --git a/packages/smithy/smithy/lib/src/ast/serializers.dart b/packages/smithy/smithy/lib/src/ast/serializers.dart index 92fc453271..9a37cd236f 100644 --- a/packages/smithy/smithy/lib/src/ast/serializers.dart +++ b/packages/smithy/smithy/lib/src/ast/serializers.dart @@ -39,7 +39,7 @@ part 'serializers.g.dart'; StringEnumShape, StructureShape, TimestampShape, - UnionShape + UnionShape, ]) @internal final Serializers serializers = (_$serializers.toBuilder() diff --git a/packages/smithy/smithy/lib/src/ast/shapes/trait_map.dart b/packages/smithy/smithy/lib/src/ast/shapes/trait_map.dart index 0278f21b34..b1e5a76a59 100644 --- a/packages/smithy/smithy/lib/src/ast/shapes/trait_map.dart +++ b/packages/smithy/smithy/lib/src/ast/shapes/trait_map.dart @@ -15,7 +15,7 @@ class TraitMap extends DelegatingMap { /// Creates a [TraitMap] from [traits]. factory TraitMap.fromTraits(Iterable traits) => - TraitMap({for (var trait in traits) trait.shapeId: trait}); + TraitMap({for (final trait in traits) trait.shapeId: trait}); /// Returns the trait of type [T], if it exists on the shape. T? getTrait() => values.whereType().firstOrNull; diff --git a/packages/smithy/smithy/lib/src/serialization/json/smithy_json_plugin.dart b/packages/smithy/smithy/lib/src/serialization/json/smithy_json_plugin.dart index 9fae51549d..c3c073cabc 100644 --- a/packages/smithy/smithy/lib/src/serialization/json/smithy_json_plugin.dart +++ b/packages/smithy/smithy/lib/src/serialization/json/smithy_json_plugin.dart @@ -23,7 +23,7 @@ class SmithyJsonPlugin extends StandardJsonPlugin { // the standard JSON plugin since it will be serialized to a map. final types = [ specifiedType.root, - ...specifiedType.parameters.map((p) => p.root) + ...specifiedType.parameters.map((p) => p.root), ]; if (object is List && (types.contains(BuiltList) || diff --git a/packages/smithy/smithy/lib/src/serialization/xml/smithy_xml_plugin.dart b/packages/smithy/smithy/lib/src/serialization/xml/smithy_xml_plugin.dart index 682522c85a..21043eaaba 100644 --- a/packages/smithy/smithy/lib/src/serialization/xml/smithy_xml_plugin.dart +++ b/packages/smithy/smithy/lib/src/serialization/xml/smithy_xml_plugin.dart @@ -136,7 +136,7 @@ class SmithyXmlPlugin implements SerializerPlugin { namespace = key.namespace; } final namespaces = { - if (namespace != null) namespace.uri: namespace.prefix ?? '' + if (namespace != null) namespace.uri: namespace.prefix ?? '', }; if (value is Iterable || value is! Iterable) { diff --git a/packages/smithy/smithy/lib/src/serialization/xml/xml_built_multimap_serializer.dart b/packages/smithy/smithy/lib/src/serialization/xml/xml_built_multimap_serializer.dart index 6fd7309272..6b99c85f5f 100644 --- a/packages/smithy/smithy/lib/src/serialization/xml/xml_built_multimap_serializer.dart +++ b/packages/smithy/smithy/lib/src/serialization/xml/xml_built_multimap_serializer.dart @@ -46,7 +46,7 @@ class XmlBuiltMultimapSerializer if (specifiedType.parameters.isEmpty) FullType.unspecified else - specifiedType.parameters[1] + specifiedType.parameters[1], ]); var index = 0; @@ -86,7 +86,7 @@ class XmlBuiltMultimapSerializer if (specifiedType.parameters.isEmpty) FullType.unspecified else - specifiedType.parameters[1] + specifiedType.parameters[1], ]); final result = isUnderspecified diff --git a/packages/smithy/smithy/test/ast/smithy_ast_v1_test.dart b/packages/smithy/smithy/test/ast/smithy_ast_v1_test.dart index 6e12bc8659..acd0e0d233 100644 --- a/packages/smithy/smithy/test/ast/smithy_ast_v1_test.dart +++ b/packages/smithy/smithy/test/ast/smithy_ast_v1_test.dart @@ -101,7 +101,7 @@ void main() { ..memberName = 'member' ..traits = TraitMap({ DocumentationTrait.id: - const DocumentationTrait('Member documentation') + const DocumentationTrait('Member documentation'), }); }); @@ -113,7 +113,7 @@ void main() { (b) => b ..shapeId = listId ..member.replace(memberShape), - ) + ), }), ); @@ -214,7 +214,7 @@ void main() { ..target = integerId, ), }), - ) + ), }), ); @@ -264,11 +264,11 @@ void main() { ..traits = TraitMap({ DocumentationTrait.id: const DocumentationTrait( 'My documentation string', - ) + ), }), - ) + ), }), - ) + ), }), ); diff --git a/packages/smithy/smithy/test/ast/smithy_ast_v2_test.dart b/packages/smithy/smithy/test/ast/smithy_ast_v2_test.dart index 79d32fd4ab..68c6f9d25d 100644 --- a/packages/smithy/smithy/test/ast/smithy_ast_v2_test.dart +++ b/packages/smithy/smithy/test/ast/smithy_ast_v2_test.dart @@ -101,7 +101,7 @@ void main() { ..memberName = 'member' ..traits = TraitMap({ DocumentationTrait.id: - const DocumentationTrait('Member documentation') + const DocumentationTrait('Member documentation'), }); }); @@ -113,7 +113,7 @@ void main() { (b) => b ..shapeId = listId ..member.replace(memberShape), - ) + ), }), ); @@ -214,7 +214,7 @@ void main() { ..target = integerId, ), }), - ) + ), }), ); @@ -264,11 +264,11 @@ void main() { ..traits = TraitMap({ DocumentationTrait.id: const DocumentationTrait( 'My documentation string', - ) + ), }), - ) + ), }), - ) + ), }), ); diff --git a/packages/smithy/smithy/test/enum_test.dart b/packages/smithy/smithy/test/enum_test.dart index 56c8efa6bc..22f4e0a197 100644 --- a/packages/smithy/smithy/test/enum_test.dart +++ b/packages/smithy/smithy/test/enum_test.dart @@ -29,7 +29,7 @@ class _MyEnum extends SmithyEnum<_MyEnum> { values: values, sdkUnknown: _MyEnum._sdkUnknown, supportedProtocols: [], - ) + ), ]; } diff --git a/packages/smithy/smithy_aws/test/http/aws_retryer_test.dart b/packages/smithy/smithy_aws/test/http/aws_retryer_test.dart index 3c65d4f2bf..74be741fd8 100644 --- a/packages/smithy/smithy_aws/test/http/aws_retryer_test.dart +++ b/packages/smithy/smithy_aws/test/http/aws_retryer_test.dart @@ -67,7 +67,7 @@ class TestSuiteGiven { initialRetryTokens, exponentialBase, exponentialPower, - maxBackoffTime + maxBackoffTime, ].join('|'); } diff --git a/packages/smithy/smithy_aws/test/http/dummy_operation.dart b/packages/smithy/smithy_aws/test/http/dummy_operation.dart index 369b5afbea..2fb5b74973 100644 --- a/packages/smithy/smithy_aws/test/http/dummy_operation.dart +++ b/packages/smithy/smithy_aws/test/http/dummy_operation.dart @@ -38,7 +38,7 @@ class DummyHttpOperation extends HttpOperation { DummySmithyException, statusCode: 500, builder: DummySmithyException.fromResponse, - ) + ), ]; @override diff --git a/packages/smithy/smithy_codegen/lib/src/generate.dart b/packages/smithy/smithy_codegen/lib/src/generate.dart index fe580beae4..9fe9e828de 100644 --- a/packages/smithy/smithy_codegen/lib/src/generate.dart +++ b/packages/smithy/smithy_codegen/lib/src/generate.dart @@ -134,7 +134,7 @@ Map generateForAst( final libraries = [ ...operations, ...additionalShapes.map(context.shapeFor), - serviceShape + serviceShape, ].expand((shape) => shape.accept(visitor) ?? const []); outputs[serviceShape.shapeId] = GeneratedOutput( context: context, diff --git a/packages/smithy/smithy_codegen/lib/src/generator/enum_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/enum_generator.dart index 9ba748ac70..5e361751fb 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/enum_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/enum_generator.dart @@ -182,8 +182,8 @@ class EnumGenerator extends LibraryGenerator { 'supportedProtocols': literalConstList([ for (final protocol in context.serviceProtocols) if (!protocol.isSynthetic) protocol.shapeId.constructed, - ]) - }) + ]), + }), ]).code, ); } @@ -235,7 +235,7 @@ class EnumGenerator extends LibraryGenerator { ..returns = symbol ..name = 'byValue' ..docs.addAll([ - '/// Returns the value of [$className] whose value matches [value].' + '/// Returns the value of [$className] whose value matches [value].', ]) ..requiredParameters.add( Parameter( diff --git a/packages/smithy/smithy_codegen/lib/src/generator/generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/generator.dart index 4ee7826303..909f75ab53 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/generator.dart @@ -102,7 +102,7 @@ abstract class ShapeGenerator implements Generator { if (format == TimestampFormat.epochSeconds) DartTypes.core.int.property('parse').call([ref]) else - ref + ref, ], { 'format': DartTypes.smithy.timestampFormat.property(format.name), }).property('asDateTime'); @@ -117,7 +117,7 @@ abstract class ShapeGenerator implements Generator { final memberTarget = context.shapeFor(memberShape.target); return DartTypes.smithy.parseHeader .call([ - ref + ref, ], { if (memberTarget is TimestampShape) 'isTimestampList': literalTrue, @@ -229,12 +229,12 @@ abstract class ShapeGenerator implements Generator { ..requiredParameters.add(Parameter((p) => p..name = 'el')) ..lambda = true ..body = DartTypes.smithy.sanitizeHeader.call([ - refer('el') + refer('el'), ], { if (memberTarget is TimestampShape) 'isTimestampList': literalTrue, }).code, - ).closure + ).closure, ]); } if (isHeader) { diff --git a/packages/smithy/smithy_codegen/lib/src/generator/operation_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/operation_generator.dart index dc1733236d..5045e3cf05 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/operation_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/operation_generator.dart @@ -194,7 +194,7 @@ class OperationGenerator extends LibraryGenerator DartTypes.smithyAws.withChecksum.newInstance([ (memberIsNullable ? inputProperty.nullChecked : inputProperty) .property('value'), - ]) + ]), ]).wrapWithBlockIf( inputProperty.notEqualTo(literalNull), memberIsNullable, @@ -423,7 +423,7 @@ class OperationGenerator extends LibraryGenerator ..name = 'errorTypes' ..lambda = true ..body = literalConstList([ - for (var error in errorSymbols) error.constInstance, + for (final error in errorSymbols) error.constInstance, ]).code, ); @@ -547,10 +547,10 @@ class OperationGenerator extends LibraryGenerator Method( (m) => m ..body = refer('super').property('run').call([ - refer('input') + refer('input'), ], { 'client': refer('client'), - 'useProtocol': refer('useProtocol') + 'useProtocol': refer('useProtocol'), }).code, ).closure, ], { @@ -586,7 +586,7 @@ class OperationGenerator extends LibraryGenerator ) ..name = 'protocols' ..assignment = literalList([ - for (var protocol in context.serviceProtocols) + for (final protocol in context.serviceProtocols) protocol.instantiableProtocolSymbol.newInstance([], { 'serializers': protocol.serializers(context), 'builderFactories': context.builderFactoriesRef, @@ -702,7 +702,7 @@ class OperationGenerator extends LibraryGenerator (p) => p ..type = pageSize?.symbol.boxed ?? DartTypes.core.void$ ..name = 'pageSize', - ) + ), ]) ..lambda = true ..body = refer('input').property('rebuild').call([ @@ -722,7 +722,7 @@ class OperationGenerator extends LibraryGenerator pageSize.isNullable, ), ]), - ).closure + ).closure, ]).code, ); } diff --git a/packages/smithy/smithy_codegen/lib/src/generator/operation_test_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/operation_test_generator.dart index 75df9de856..dda2deb627 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/operation_test_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/operation_test_generator.dart @@ -82,7 +82,7 @@ class OperationTestGenerator extends LibraryGenerator literalString('https://${testCase.host ?? 'example.com'}'), ]) else if (_testValues.containsKey(param.name)) - param.name: _testValues[param.name]! + param.name: _testValues[param.name]!, }); /// Tests to skip on Web. To be filled in during codegen since it depends @@ -202,7 +202,7 @@ class OperationTestGenerator extends LibraryGenerator ).generate(), ..._collectSerializers(errorShape, protocol), ], - } + }, }; static const _vendorProtocol = GenericJsonProtocolDefinitionTrait(); @@ -319,7 +319,7 @@ class OperationTestGenerator extends LibraryGenerator }), 'inputSerializers': literalConstList([ for (final serializer in _uniqueSerializers(serializers)) - refer(serializer.name).constInstance([]) + refer(serializer.name).constInstance([]), ]), }); yield _buildTest(testCase, testCall, type: TestType.request); @@ -337,7 +337,7 @@ class OperationTestGenerator extends LibraryGenerator 'testCase': _buildResponseTestCase(testCase), 'outputSerializers': literalConstList([ for (final serializer in _uniqueSerializers(serializers)) - refer(serializer.name).constInstance([]) + refer(serializer.name).constInstance([]), ]), }); yield _buildTest(testCase, testCall, type: TestType.response); @@ -358,7 +358,7 @@ class OperationTestGenerator extends LibraryGenerator 'testCase': _buildResponseTestCase(testCase), 'errorSerializers': literalConstList([ for (final serializer in _uniqueSerializers(serializers)) - refer(serializer.name).constInstance([]) + refer(serializer.name).constInstance([]), ]), }, [ inputPayload.symbol, @@ -386,7 +386,7 @@ class OperationTestGenerator extends LibraryGenerator initBlock.addExpression( declareFinal('config').assign( refer('vendorSerializers').property('deserialize').call([ - literalMap(testCase.vendorParams) + literalMap(testCase.vendorParams), ], { 'specifiedType': vendorParamsSymbol.fullType(), }).asA(vendorParamsSymbol), @@ -456,7 +456,7 @@ class OperationTestGenerator extends LibraryGenerator DartTypes.awsSigV4.s3ServiceConfiguration.newInstance([], { 'signPayload': literalFalse, 'chunked': literalFalse, - }) + }), }), ), ); diff --git a/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_serializer_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_serializer_generator.dart index 9308619d11..355021986b 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_serializer_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_serializer_generator.dart @@ -341,7 +341,7 @@ class StructureSerializerGenerator extends SerializerGenerator member, memberRef, memberSymbol: context.symbolFor(member.target, shape).unboxed, - ) + ), ]) .statement .wrapWithBlockIf(memberRef.notEqualTo(literalNull), true), diff --git a/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_xml_serializer_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_xml_serializer_generator.dart index decbb969e3..b042531d2b 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_xml_serializer_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/serialization/structure_xml_serializer_generator.dart @@ -192,8 +192,8 @@ class StructureXmlSerializerGenerator extends StructureSerializerGenerator { [ DartTypes.smithy.xmlElementName.constInstance([ literalString(payloadResponseName), - if (namespace != null) namespace.constructedInstance - ]) + if (namespace != null) namespace.constructedInstance, + ]), ], DartTypes.core.object.boxed, ), diff --git a/packages/smithy/smithy_codegen/lib/src/generator/service_client_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/service_client_generator.dart index 4f47b5be48..8ffa4f9eef 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/service_client_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/service_client_generator.dart @@ -142,7 +142,7 @@ class ServiceClientGenerator extends LibraryGenerator { (p) => p ..type = operationInput ..name = 'input', - ) + ), ]) ..optionalParameters.addAll( operationParameters.where((p) => p.location.inClientMethod).map( @@ -166,7 +166,7 @@ class ServiceClientGenerator extends LibraryGenerator { ? refer(param.name).ifNullThen(refer(private(param.name))) : param.location.inClientConstructor ? refer(private(param.name)) - : refer(param.name) + : refer(param.name), }) .property(isPaginated ? 'runPaginated' : 'run') .call([ @@ -180,7 +180,7 @@ class ServiceClientGenerator extends LibraryGenerator { )) param.name: param.location.inClientConstructor ? refer(param.name).ifNullThen(refer(private(param.name))) - : refer(param.name) + : refer(param.name), }) .returned .statement, diff --git a/packages/smithy/smithy_codegen/lib/src/generator/service_server_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/service_server_generator.dart index b7b6a4d425..9e51f8fbad 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/service_server_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/service_server_generator.dart @@ -103,7 +103,7 @@ class ServiceServerGenerator extends LibraryGenerator { (p) => p ..name = label.memberName ..type = DartTypes.core.string, - ) + ), ]) ..modifier = MethodModifier.async ..body = Block.of(_serviceMethodBody(shape)), @@ -155,8 +155,8 @@ class ServiceServerGenerator extends LibraryGenerator { ], { 'labels': literalMap({ for (final label in inputLabels) - label.memberName: refer(label.memberName) - }) + label.memberName: refer(label.memberName), + }), }); yield declareFinal('input').assign(input).statement; @@ -206,7 +206,7 @@ class ServiceServerGenerator extends LibraryGenerator { .property('wireSerializer') .property('serialize') .call([ - refer('output') + refer('output'), ], { 'specifiedType': operation.outputSymbol(context).fullType([ operation.outputShape(context).httpPayload(context).symbol, @@ -257,7 +257,7 @@ class ServiceServerGenerator extends LibraryGenerator { .property('wireSerializer') .property('serialize') .call([ - refer('e') + refer('e'), ], { 'specifiedType': errorSymbol.fullType([ errorShape.httpPayload(context).symbol, diff --git a/packages/smithy/smithy_codegen/lib/src/generator/structure_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/structure_generator.dart index 3e8280b4ce..c6ff9d41dd 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/structure_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/structure_generator.dart @@ -509,7 +509,10 @@ class StructureGenerator extends LibraryGenerator if (hasNestedBuilder) { block.statements.add( builder.property(memberName).property('replace').call([ - if (isNullable) refer(memberName).nullChecked else refer(memberName) + if (isNullable) + refer(memberName).nullChecked + else + refer(memberName), ]).wrapWithBlockIf( refer(memberName).notEqualTo(literalNull), isNullable, @@ -668,7 +671,7 @@ class StructureGenerator extends LibraryGenerator DartTypes.core.override, DartTypes.builtValue.builtValueField.newInstance([], { 'compare': literalFalse, - }) + }), ]) ..returns = DartTypes.core.int.withBoxed(statusCode == null) ..type = MethodType.getter @@ -687,7 +690,7 @@ class StructureGenerator extends LibraryGenerator DartTypes.core.override, DartTypes.builtValue.builtValueField.newInstance([], { 'compare': literalFalse, - }) + }), ]) ..returns = DartTypes.core .map( @@ -722,7 +725,7 @@ class StructureGenerator extends LibraryGenerator ShapeType.map, ShapeType.list, ShapeType.set, - ShapeType.structure + ShapeType.structure, ].contains(targetShapeType); if (isNestedBuilder) { final isNullable = member.isNullable(context, shape); @@ -733,7 +736,7 @@ class StructureGenerator extends LibraryGenerator if (isNullable && member != payloadShape) payloadProp.nullChecked else - payloadProp + payloadProp, ]) .statement .wrapWithBlockIf(payloadProp.notEqualTo(literalNull), isNullable); @@ -793,7 +796,7 @@ class StructureGenerator extends LibraryGenerator .property('key') .property('startsWith') .call([literalString(prefixHeaders.trait.value)]).code, - ).closure + ).closure, ]) .property('map') .call([ @@ -812,7 +815,7 @@ class StructureGenerator extends LibraryGenerator refer('el').property('value'), ]).code, ).closure, - ]) + ]), ]).statement; } diff --git a/packages/smithy/smithy_codegen/lib/src/generator/waiter_generator.dart b/packages/smithy/smithy_codegen/lib/src/generator/waiter_generator.dart index cade33145c..3d1dd2d4d6 100644 --- a/packages/smithy/smithy_codegen/lib/src/generator/waiter_generator.dart +++ b/packages/smithy/smithy_codegen/lib/src/generator/waiter_generator.dart @@ -70,7 +70,7 @@ class WaiterGenerator extends LibraryGenerator ..lambda = true ..body = symbol.newInstance([], { for (final parameter in constructorParams) - parameter.name: refer(parameter.name) + parameter.name: refer(parameter.name), }).code, ).closure, }).code, @@ -186,7 +186,7 @@ class WaiterGenerator extends LibraryGenerator ..body = refer('el') .equalTo(literalString(matcher.expected)) .code, - ).closure + ).closure, ]), ), ) diff --git a/packages/smithy/smithy_codegen/lib/src/util/protocol_ext.dart b/packages/smithy/smithy_codegen/lib/src/util/protocol_ext.dart index 31318288ec..13530b91f4 100644 --- a/packages/smithy/smithy_codegen/lib/src/util/protocol_ext.dart +++ b/packages/smithy/smithy_codegen/lib/src/util/protocol_ext.dart @@ -125,7 +125,7 @@ extension ProtocolUtils on ProtocolDefinitionTrait { context.service!.shapeId.shape, shape.shapeId.shape, ].join('.'), - ) + ), ]); case RestJson1Trait _: // Empty payloads should not contain `Content-Length` and `Content-Type` diff --git a/packages/smithy/smithy_codegen/lib/src/util/shape_ext.dart b/packages/smithy/smithy_codegen/lib/src/util/shape_ext.dart index 58c9cc4c57..f18f1a07c4 100644 --- a/packages/smithy/smithy_codegen/lib/src/util/shape_ext.dart +++ b/packages/smithy/smithy_codegen/lib/src/util/shape_ext.dart @@ -125,7 +125,7 @@ extension ShapeUtils on Shape { const primitiveTypes = [ ShapeType.boolean, ShapeType.integer, - ShapeType.long + ShapeType.long, ]; final targetShape = switch (this) { final MemberShape member => context.shapeFor(member.target), @@ -842,7 +842,7 @@ extension StructureShapeUtil on StructureShape { /// Member shapes and their [Reference] types. Map memberSymbols(CodegenContext context) => { - for (var member in sortedMembers) + for (final member in sortedMembers) member: context .symbolFor(member.target, this) .withBoxed(member.isNullable(context, this)), diff --git a/packages/smithy/smithy_codegen/lib/src/util/symbol_ext.dart b/packages/smithy/smithy_codegen/lib/src/util/symbol_ext.dart index 988a91e84a..cd7ba50c5f 100644 --- a/packages/smithy/smithy_codegen/lib/src/util/symbol_ext.dart +++ b/packages/smithy/smithy_codegen/lib/src/util/symbol_ext.dart @@ -34,7 +34,7 @@ extension ExpressionUtil on Expression { const Code(') {'), ], statement, - if (performCheck) const Code('}') + if (performCheck) const Code('}'), ]); } } @@ -48,7 +48,7 @@ extension CodeHelpers on Code { const Code(') {'), ], this, - if (performCheck) const Code('}') + if (performCheck) const Code('}'), ]); } } diff --git a/packages/smithy/smithy_codegen/test/common.dart b/packages/smithy/smithy_codegen/test/common.dart index 2d53f5c83d..630db7d927 100644 --- a/packages/smithy/smithy_codegen/test/common.dart +++ b/packages/smithy/smithy_codegen/test/common.dart @@ -12,7 +12,7 @@ CodegenContext createTestContext( }) { return CodegenContext( smithyVersion: SmithyVersion.v2, - shapes: ShapeMap({for (var shape in shapes) shape.shapeId: shape}), + shapes: ShapeMap({for (final shape in shapes) shape.shapeId: shape}), packageName: packageName, serviceName: serviceName, ); diff --git a/packages/smithy/smithy_codegen/test/naming_test.dart b/packages/smithy/smithy_codegen/test/naming_test.dart index 826557d57c..3f01ba2427 100644 --- a/packages/smithy/smithy_codegen/test/naming_test.dart +++ b/packages/smithy/smithy_codegen/test/naming_test.dart @@ -191,7 +191,7 @@ void main() { (b) => b ..shapeId = ShapeId.parse('com.example#MyEnumBuilder') ..traits = TraitMap.fromTraits([ - const EnumTrait([EnumDefinition(value: 'test')]) + const EnumTrait([EnumDefinition(value: 'test')]), ]), ); final shapes = [myEnum, myEnumBuilder]; diff --git a/packages/storage/amplify_storage_s3/example/integration_test/use_case_test.dart b/packages/storage/amplify_storage_s3/example/integration_test/use_case_test.dart index 6c0a016b88..f0f268ff6c 100644 --- a/packages/storage/amplify_storage_s3/example/integration_test/use_case_test.dart +++ b/packages/storage/amplify_storage_s3/example/integration_test/use_case_test.dart @@ -482,7 +482,7 @@ void main() { targetAccessLevel: StorageAccessLevel.private, uploadSource: AWSFile.fromData(testLargeFileBytes), referenceBytes: testLargeFileBytes, - ) + ), ], ); }); diff --git a/packages/storage/amplify_storage_s3/test/amplify_storage_s3_impl_test.dart b/packages/storage/amplify_storage_s3/test/amplify_storage_s3_impl_test.dart index ebc67facd9..4612eb6b5a 100644 --- a/packages/storage/amplify_storage_s3/test/amplify_storage_s3_impl_test.dart +++ b/packages/storage/amplify_storage_s3/test/amplify_storage_s3_impl_test.dart @@ -18,7 +18,7 @@ void main() { S3PluginConfig.pluginKey: S3PluginConfig( bucket: '123', region: 'west-2', - ) + ), }, ), ); diff --git a/packages/storage/amplify_storage_s3_dart/lib/src/storage_s3_service/service/storage_s3_service_impl.dart b/packages/storage/amplify_storage_s3_dart/lib/src/storage_s3_service/service/storage_s3_service_impl.dart index ec21772dc4..926d20d0e9 100644 --- a/packages/storage/amplify_storage_s3_dart/lib/src/storage_s3_service/service/storage_s3_service_impl.dart +++ b/packages/storage/amplify_storage_s3_dart/lib/src/storage_s3_service/service/storage_s3_service_impl.dart @@ -456,7 +456,7 @@ class StorageS3Service { logger: _logger, accessLevel: destination.accessLevel, identityId: destination.targetIdentityId, - ) + ), ]); final sourceKey = '${resolvedPrefixes[0]}${source.storageItem.key}'; final destinationKey = diff --git a/packages/storage/amplify_storage_s3_dart/test/amplify_storage_s3_dart_test.dart b/packages/storage/amplify_storage_s3_dart/test/amplify_storage_s3_dart_test.dart index f9ebc0fa0c..af7c26e7a3 100644 --- a/packages/storage/amplify_storage_s3_dart/test/amplify_storage_s3_dart_test.dart +++ b/packages/storage/amplify_storage_s3_dart/test/amplify_storage_s3_dart_test.dart @@ -22,7 +22,7 @@ void main() { bucket: '123', region: 'west-2', defaultAccessLevel: testDefaultStorageAccessLevel, - ) + ), }, ), ); diff --git a/packages/storage/amplify_storage_s3_dart/test/prefix_resolver/pass_through_prefix_resolver_test.dart b/packages/storage/amplify_storage_s3_dart/test/prefix_resolver/pass_through_prefix_resolver_test.dart index 8aaf6db63a..d850c7bcab 100644 --- a/packages/storage/amplify_storage_s3_dart/test/prefix_resolver/pass_through_prefix_resolver_test.dart +++ b/packages/storage/amplify_storage_s3_dart/test/prefix_resolver/pass_through_prefix_resolver_test.dart @@ -11,7 +11,7 @@ void main() { for (final accessLevel in [ StorageAccessLevel.guest, StorageAccessLevel.private, - StorageAccessLevel.protected + StorageAccessLevel.protected, ]) { test('should resolve as empty string for $accessLevel', () async { final result = await prefixResolver.resolvePrefix( diff --git a/packages/worker_bee/worker_bee/lib/src/js/impl.dart b/packages/worker_bee/worker_bee/lib/src/js/impl.dart index 5eb0ff0b68..b690d9054e 100644 --- a/packages/worker_bee/worker_bee/lib/src/js/impl.dart +++ b/packages/worker_bee/worker_bee/lib/src/js/impl.dart @@ -148,7 +148,7 @@ mixin WorkerBeeImpl for (final entrypoint in [ if (jsEntrypoint != null) jsEntrypoint, this.jsEntrypoint, - ...fallbackUrls + ...fallbackUrls, ]) { logger.debug('Spawning worker at $entrypoint'); diff --git a/packages/worker_bee/worker_bee/lib/src/logging/log_serializers.dart b/packages/worker_bee/worker_bee/lib/src/logging/log_serializers.dart index 416f43f7fe..0f25be82a7 100644 --- a/packages/worker_bee/worker_bee/lib/src/logging/log_serializers.dart +++ b/packages/worker_bee/worker_bee/lib/src/logging/log_serializers.dart @@ -109,7 +109,7 @@ class LogEntrySerializer implements StructuredSerializer { if (object is WorkerLogEntry) ...[ 'local', object.local, - ] + ], ]; } } diff --git a/packages/worker_bee/worker_bee_builder/lib/src/copy_builder.dart b/packages/worker_bee/worker_bee_builder/lib/src/copy_builder.dart index da6d40117b..b4e8003a0d 100644 --- a/packages/worker_bee/worker_bee_builder/lib/src/copy_builder.dart +++ b/packages/worker_bee/worker_bee_builder/lib/src/copy_builder.dart @@ -14,7 +14,7 @@ class WorkerCopyBuilder extends Builder { '.debug.dart.js': ['.js'], '.release.dart.js': ['.min.js'], '.debug.dart.js.map': ['.js.map'], - '.release.dart.js.map': ['.min.js.map'] + '.release.dart.js.map': ['.min.js.map'], }; static final _sourceMapUrl = RegExp(r'sourceMappingURL=[\w\.]*'); diff --git a/packages/worker_bee/worker_bee_builder/lib/src/hive_generator.dart b/packages/worker_bee/worker_bee_builder/lib/src/hive_generator.dart index c5245d7070..334e63d758 100644 --- a/packages/worker_bee/worker_bee_builder/lib/src/hive_generator.dart +++ b/packages/worker_bee/worker_bee_builder/lib/src/hive_generator.dart @@ -40,9 +40,13 @@ class WorkerHiveGenerator extends GeneratorForAnnotation { { for (final workerType in workers) workerType.getDisplayString(withNullability: false): - (workerType.accept(_symbolVisitor) as TypeReference) - .rebuild((t) => t.isNullable = false) - .property('create') + Block.of([ + (workerType.accept(_symbolVisitor) as TypeReference) + .rebuild((t) => t.isNullable = false) + .property('create') + .code, + if (workers.length == 1) const Code(','), + ]), }, refer('String'), DartTypes.workerBee.workerBeeBuilder, @@ -54,7 +58,7 @@ class WorkerHiveGenerator extends GeneratorForAnnotation { ..body = DartTypes.workerBee.runHive.call([ refer('_workers'), ]).code, - ) + ), ]); });