Skip to content

Commit

Permalink
chore(core,datastore,authenticator,common): fixed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Jan 13, 2025
1 parent e74b6ae commit a413ab2
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NativeGraphQLResponse graphQLResponseToNativeResponse(
/// from a [GraphQLResponse]
String _buildPayloadJson(GraphQLResponse<String> 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ class StateMachineBloc
}
}
yield* _checkUserVerification();
default:
break;
}
} on AuthNotAuthorizedException {
/// The .failAuthentication flag available in the DefineAuthChallenge Lambda trigger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ class _SignInTextFieldState extends _SignInFormFieldState<String>
return (v) => state.username = v;
case SignInField.password:
return (v) => state.password = v;
default:
return super.onChanged;
}
}

Expand Down
3 changes: 1 addition & 2 deletions packages/aws_common/lib/src/http/aws_http_client_js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ class AWSHttpClientImpl extends AWSHttpClient {
requestProgressController.close();
},
).takeUntil(cancelTrigger.future);
Object body;
body = Uint8List.fromList(await collectBytes(stream));
Object body = Uint8List.fromList(await collectBytes(stream));

if (completer.isCanceled) return;
final resp = await fetch(
Expand Down

0 comments on commit a413ab2

Please sign in to comment.