diff --git a/lib/src/authentication/client.dart b/lib/src/authentication/client.dart index ffa7889cd..412e3f436 100644 --- a/lib/src/authentication/client.dart +++ b/lib/src/authentication/client.dart @@ -40,13 +40,13 @@ class _AuthenticatedClient extends http.BaseClient { // request. // // This check ensures that this client will only authenticate requests sent - // to given serverBaseUrl. Otherwise credential leaks might ocurr when + // to given serverBaseUrl. Otherwise credential leaks might occur when // archive_url hosted on 3rd party server that should not receive // credentials of the first party. if (_credential != null && - _credential!.canAuthenticate(request.url.toString())) { + _credential.canAuthenticate(request.url.toString())) { request.headers[HttpHeaders.authorizationHeader] = - await _credential!.getAuthorizationHeaderValue(); + await _credential.getAuthorizationHeaderValue(); } final response = await _inner.send(request); diff --git a/lib/src/command/outdated.dart b/lib/src/command/outdated.dart index 124a99a83..d60e49aa5 100644 --- a/lib/src/command/outdated.dart +++ b/lib/src/command/outdated.dart @@ -952,8 +952,8 @@ class _MarkedVersionDetails implements _Details { var jsonExplanation = _jsonExplanation; return jsonExplanation == null - ? _versionDetails!.toJson() - : (_versionDetails!.toJson()..addEntries([jsonExplanation])); + ? _versionDetails.toJson() + : (_versionDetails.toJson()..addEntries([jsonExplanation])); } } diff --git a/lib/src/solver/package_lister.dart b/lib/src/solver/package_lister.dart index 35c97f370..d67352685 100644 --- a/lib/src/solver/package_lister.dart +++ b/lib/src/solver/package_lister.dart @@ -131,7 +131,7 @@ class PackageLister { /// Returns the number of versions of this package that match [constraint]. Future countVersions(VersionConstraint constraint) async { - if (_locked != null && constraint.allows(_locked!.version)) return 1; + if (_locked != null && constraint.allows(_locked.version)) return 1; try { return (await _versions) .where((id) => constraint.allows(id.version)) @@ -226,7 +226,7 @@ class PackageLister { if (_cachedVersions == null && _locked != null && - id.version == _locked!.version) { + id.version == _locked.version) { if (_listedLockedVersion) return const []; var depender = id.toRange(); diff --git a/pubspec.yaml b/pubspec.yaml index c58a4aaa4..863422924 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: pub environment: - sdk: ^3.0.0 + sdk: ^3.2.0 dependencies: analyzer: ^6.2.0