diff --git a/packages/amplify_core/lib/src/types/auth/attribute/auth_user_attribute_key.dart b/packages/amplify_core/lib/src/types/auth/attribute/auth_user_attribute_key.dart index a17900049e..04064286cf 100644 --- a/packages/amplify_core/lib/src/types/auth/attribute/auth_user_attribute_key.dart +++ b/packages/amplify_core/lib/src/types/auth/attribute/auth_user_attribute_key.dart @@ -9,7 +9,6 @@ import 'package:meta/meta.dart'; /// {@template amplify_core.auth_user_attribute_key} /// A user attribute identifier. /// {@endtemplate} -/// {@hideConstantImplementations} @immutable abstract class AuthUserAttributeKey with 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 21e4867dae..ebda0d423c 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 @@ -12,7 +12,6 @@ import 'package:amplify_core/amplify_core.dart'; /// [here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html). /// /// Use [CognitoUserAttributeKey.custom] to create a custom Cognito attribute. -/// {@hideConstantImplementations} class CognitoUserAttributeKey extends AuthUserAttributeKey { const CognitoUserAttributeKey._(this._key, {this.readOnly = false}) : isCustom = false; diff --git a/packages/amplify_datastore/lib/src/utils/native_api_helpers.dart b/packages/amplify_datastore/lib/src/utils/native_api_helpers.dart index b59aceb856..cfdaf14fc3 100644 --- a/packages/amplify_datastore/lib/src/utils/native_api_helpers.dart +++ b/packages/amplify_datastore/lib/src/utils/native_api_helpers.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'package:amplify_core/amplify_core.dart'; import 'package:amplify_datastore/src/native_plugin.g.dart'; -import 'package:collection/collection.dart'; /// Convert a [NativeGraphQLResponse] to a [GraphQLResponse] GraphQLRequest nativeRequestToGraphQLRequest( @@ -85,7 +84,7 @@ NativeGraphQLResponse graphQLResponseToNativeResponse( /// from a [GraphQLResponse] String _buildPayloadJson(GraphQLResponse response) { final data = jsonDecode(response.data ?? '{}'); - final errors = response.errors.whereNotNull().map((e) => e.toJson()).toList(); + final errors = response.errors.nonNulls.map((e) => e.toJson()).toList(); return jsonEncode({ 'data': data, 'errors': errors, 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 36ac085546..e5ce1b6ba2 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 @@ -176,11 +176,6 @@ class GraphQLRequestFactory { upperOutput = '(\$filter: ModelSubscription${modelName}FilterInput)'; lowerOutput = r'(filter: $filter)'; } - default: - throw const ApiOperationException( - 'GraphQL Request Operation is currently unsupported', - recoverySuggestion: 'please use a supported GraphQL operation', - ); } return DocumentInputs(upperOutput, lowerOutput); diff --git a/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart b/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart index 5604f7bd21..518957e292 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart @@ -261,8 +261,6 @@ class StateMachineBloc } } yield* _checkUserVerification(); - default: - break; } } on AuthNotAuthorizedException { /// The .failAuthentication flag available in the DefineAuthChallenge Lambda trigger 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 2524d2cb35..58f6e4a3db 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/screens/authenticator_screen.dart @@ -192,7 +192,6 @@ class _FormWrapperView extends StatelessAuthenticatorComponent { form, ], ); - break; } return Padding(padding: padding, child: layout); diff --git a/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart b/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart index d65618fa04..f7f941dbcf 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/widgets/form_fields/sign_in_form_field.dart @@ -159,8 +159,6 @@ class _SignInTextFieldState extends _SignInFormFieldState return (v) => state.username = v; case SignInField.password: return (v) => state.password = v; - default: - return super.onChanged; } } diff --git a/packages/aws_common/lib/src/http/aws_http_client_js.dart b/packages/aws_common/lib/src/http/aws_http_client_js.dart index c764995b6c..1cc642e70b 100644 --- a/packages/aws_common/lib/src/http/aws_http_client_js.dart +++ b/packages/aws_common/lib/src/http/aws_http_client_js.dart @@ -71,13 +71,7 @@ class AWSHttpClientImpl extends AWSHttpClient { requestProgressController.close(); }, ).takeUntil(cancelTrigger.future); - Object body; - if (request.scheme == 'http' || - supportedProtocols.supports(AlpnProtocol.http1_1)) { - body = Uint8List.fromList(await collectBytes(stream)); - } else { - body = stream; - } + final body = Uint8List.fromList(await collectBytes(stream)); if (completer.isCanceled) return; final resp = await fetch(