Dependency update for null safety (#333)

This commit is contained in:
Brett Morgan
2021-02-08 22:24:57 +11:00
committed by GitHub
parent f7e5a8cb3a
commit 699d3b6784
5 changed files with 112 additions and 82 deletions

View File

@ -1,3 +1,7 @@
## 0.6.0-nullsafety.2
* Dependencies updated for null safety
## 0.6.0-nullsafety.1
* Fix null safety on web

View File

@ -68,7 +68,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.6.0-nullsafety.0"
version: "0.6.0-nullsafety.2"
flutter_test:
dependency: "direct dev"
description: flutter

View File

@ -42,7 +42,7 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.1"
version: "1.6.2"
built_collection:
dependency: transitive
description:
@ -171,14 +171,14 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.4"
version: "1.0.0"
markdown:
dependency: "direct main"
description:
@ -206,7 +206,7 @@ packages:
name: mockito
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0-nullsafety.5"
version: "5.0.0-nullsafety.7"
node_interop:
dependency: transitive
description:
@ -241,7 +241,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.2"
version: "1.10.0"
pub_semver:
dependency: transitive
description:

View File

@ -3,19 +3,19 @@ description: A Markdown renderer for Flutter. Create rich text output,
including text styles, tables, links, and more, from plain text data
formatted with simple Markdown tags.
homepage: https://github.com/flutter/flutter_markdown
version: 0.6.0-nullsafety.1
version: 0.6.0-nullsafety.2
dependencies:
flutter:
sdk: flutter
markdown: ^4.0.0-nullsafety.0
meta: ^1.1.7
path: ^1.6.4
meta: ^1.3.0-nullsafety.6
path: ^1.8.0-nullsafety.3
dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^5.0.0-nullsafety.5
mockito: ^5.0.0-nullsafety.7
environment:
sdk: ">=2.12.0-0 <3.0.0"

View File

@ -118,16 +118,17 @@ class MockHttpClient extends Mock implements HttpClient {
@override
Duration get idleTimeout =>
(super.noSuchMethod(Invocation.getter(#idleTimeout), _FakeDuration())
as Duration);
(super.noSuchMethod(Invocation.getter(#idleTimeout),
returnValue: _FakeDuration()) as Duration);
@override
set idleTimeout(Duration? _idleTimeout) =>
super.noSuchMethod(Invocation.setter(#idleTimeout, _idleTimeout));
@override
bool get autoUncompress =>
(super.noSuchMethod(Invocation.getter(#autoUncompress), false) as bool);
bool get autoUncompress => (super
.noSuchMethod(Invocation.getter(#autoUncompress), returnValue: false)
as bool);
@override
set autoUncompress(bool? _autoUncompress) =>
@ -137,72 +138,86 @@ class MockHttpClient extends Mock implements HttpClient {
Future<HttpClientRequest> open(
String? method, String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#open, [method, host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> openUrl(String? method, Uri? url) =>
(super.noSuchMethod(Invocation.method(#openUrl, [method, url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> get(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#get, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> getUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#getUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> getUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#getUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> post(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#post, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> postUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#postUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> postUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#postUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> put(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#put, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> putUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#putUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> putUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#putUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> delete(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#delete, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> deleteUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#deleteUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> deleteUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#deleteUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> patch(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#patch, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> patchUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#patchUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> patchUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#patchUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> head(String? host, int? port, String? path) =>
(super.noSuchMethod(Invocation.method(#head, [host, port, path]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
Future<HttpClientRequest> headUrl(Uri? url) => (super.noSuchMethod(
Invocation.method(#headUrl, [url]),
Future.value(_FakeHttpClientRequest())) as Future<HttpClientRequest>);
Future<HttpClientRequest> headUrl(Uri? url) =>
(super.noSuchMethod(Invocation.method(#headUrl, [url]),
returnValue: Future.value(_FakeHttpClientRequest()))
as Future<HttpClientRequest>);
@override
void addCredentials(
@ -231,16 +246,17 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {
@override
bool get persistentConnection =>
(super.noSuchMethod(Invocation.getter(#persistentConnection), false)
as bool);
(super.noSuchMethod(Invocation.getter(#persistentConnection),
returnValue: false) as bool);
@override
set persistentConnection(bool? _persistentConnection) => super.noSuchMethod(
Invocation.setter(#persistentConnection, _persistentConnection));
@override
bool get followRedirects =>
(super.noSuchMethod(Invocation.getter(#followRedirects), false) as bool);
bool get followRedirects => (super
.noSuchMethod(Invocation.getter(#followRedirects), returnValue: false)
as bool);
@override
set followRedirects(bool? _followRedirects) =>
@ -248,7 +264,8 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {
@override
int get maxRedirects =>
(super.noSuchMethod(Invocation.getter(#maxRedirects), 0) as int);
(super.noSuchMethod(Invocation.getter(#maxRedirects), returnValue: 0)
as int);
@override
set maxRedirects(int? _maxRedirects) =>
@ -256,7 +273,8 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {
@override
int get contentLength =>
(super.noSuchMethod(Invocation.getter(#contentLength), 0) as int);
(super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)
as int);
@override
set contentLength(int? _contentLength) =>
@ -264,7 +282,8 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {
@override
bool get bufferOutput =>
(super.noSuchMethod(Invocation.getter(#bufferOutput), false) as bool);
(super.noSuchMethod(Invocation.getter(#bufferOutput), returnValue: false)
as bool);
@override
set bufferOutput(bool? _bufferOutput) =>
@ -272,31 +291,34 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {
@override
String get method =>
(super.noSuchMethod(Invocation.getter(#method), '') as String);
(super.noSuchMethod(Invocation.getter(#method), returnValue: '')
as String);
@override
Uri get uri =>
(super.noSuchMethod(Invocation.getter(#uri), _FakeUri()) as Uri);
(super.noSuchMethod(Invocation.getter(#uri), returnValue: _FakeUri())
as Uri);
@override
HttpHeaders get headers =>
(super.noSuchMethod(Invocation.getter(#headers), _FakeHttpHeaders())
as HttpHeaders);
HttpHeaders get headers => (super.noSuchMethod(Invocation.getter(#headers),
returnValue: _FakeHttpHeaders()) as HttpHeaders);
@override
List<Cookie> get cookies =>
(super.noSuchMethod(Invocation.getter(#cookies), <Cookie>[])
(super.noSuchMethod(Invocation.getter(#cookies), returnValue: <Cookie>[])
as List<Cookie>);
@override
Future<HttpClientResponse> get done => (super.noSuchMethod(
Invocation.getter(#done), Future.value(_FakeHttpClientResponse()))
as Future<HttpClientResponse>);
Future<HttpClientResponse> get done =>
(super.noSuchMethod(Invocation.getter(#done),
returnValue: Future.value(_FakeHttpClientResponse()))
as Future<HttpClientResponse>);
@override
Future<HttpClientResponse> close() => (super.noSuchMethod(
Invocation.method(#close, []),
Future.value(_FakeHttpClientResponse())) as Future<HttpClientResponse>);
Future<HttpClientResponse> close() =>
(super.noSuchMethod(Invocation.method(#close, []),
returnValue: Future.value(_FakeHttpClientResponse()))
as Future<HttpClientResponse>);
}
/// A class which mocks [HttpClientResponse].
@ -318,48 +340,51 @@ class MockHttpClientResponse extends Mock implements HttpClientResponse {
[onData],
{#onError: onError, #onDone: onDone, #cancelOnError: cancelOnError},
),
_FakeStreamSubscription<List<int>>()));
returnValue: _FakeStreamSubscription<List<int>>()));
@override
int get statusCode =>
(super.noSuchMethod(Invocation.getter(#statusCode), 0) as int);
(super.noSuchMethod(Invocation.getter(#statusCode), returnValue: 0)
as int);
@override
String get reasonPhrase =>
(super.noSuchMethod(Invocation.getter(#reasonPhrase), '') as String);
(super.noSuchMethod(Invocation.getter(#reasonPhrase), returnValue: '')
as String);
@override
int get contentLength =>
(super.noSuchMethod(Invocation.getter(#contentLength), 0) as int);
(super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)
as int);
@override
HttpClientResponseCompressionState get compressionState =>
(super.noSuchMethod(Invocation.getter(#compressionState),
HttpClientResponseCompressionState.notCompressed)
returnValue: HttpClientResponseCompressionState.notCompressed)
as HttpClientResponseCompressionState);
@override
bool get persistentConnection =>
(super.noSuchMethod(Invocation.getter(#persistentConnection), false)
as bool);
(super.noSuchMethod(Invocation.getter(#persistentConnection),
returnValue: false) as bool);
@override
bool get isRedirect =>
(super.noSuchMethod(Invocation.getter(#isRedirect), false) as bool);
(super.noSuchMethod(Invocation.getter(#isRedirect), returnValue: false)
as bool);
@override
List<RedirectInfo> get redirects =>
(super.noSuchMethod(Invocation.getter(#redirects), <RedirectInfo>[])
as List<RedirectInfo>);
(super.noSuchMethod(Invocation.getter(#redirects),
returnValue: <RedirectInfo>[]) as List<RedirectInfo>);
@override
HttpHeaders get headers =>
(super.noSuchMethod(Invocation.getter(#headers), _FakeHttpHeaders())
as HttpHeaders);
HttpHeaders get headers => (super.noSuchMethod(Invocation.getter(#headers),
returnValue: _FakeHttpHeaders()) as HttpHeaders);
@override
List<Cookie> get cookies =>
(super.noSuchMethod(Invocation.getter(#cookies), <Cookie>[])
(super.noSuchMethod(Invocation.getter(#cookies), returnValue: <Cookie>[])
as List<Cookie>);
@override
@ -367,13 +392,13 @@ class MockHttpClientResponse extends Mock implements HttpClientResponse {
[String? method, Uri? url, bool? followLoops]) =>
(super.noSuchMethod(
Invocation.method(#redirect, [method, url, followLoops]),
Future.value(_FakeHttpClientResponse()))
returnValue: Future.value(_FakeHttpClientResponse()))
as Future<HttpClientResponse>);
@override
Future<Socket> detachSocket() => (super.noSuchMethod(
Invocation.method(#detachSocket, []), Future.value(_FakeSocket()))
as Future<Socket>);
Future<Socket> detachSocket() =>
(super.noSuchMethod(Invocation.method(#detachSocket, []),
returnValue: Future.value(_FakeSocket())) as Future<Socket>);
}
/// A class which mocks [HttpHeaders].
@ -386,7 +411,8 @@ class MockHttpHeaders extends Mock implements HttpHeaders {
@override
int get contentLength =>
(super.noSuchMethod(Invocation.getter(#contentLength), 0) as int);
(super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0)
as int);
@override
set contentLength(int? _contentLength) =>
@ -394,8 +420,8 @@ class MockHttpHeaders extends Mock implements HttpHeaders {
@override
bool get persistentConnection =>
(super.noSuchMethod(Invocation.getter(#persistentConnection), false)
as bool);
(super.noSuchMethod(Invocation.getter(#persistentConnection),
returnValue: false) as bool);
@override
set persistentConnection(bool? _persistentConnection) => super.noSuchMethod(
@ -403,8 +429,8 @@ class MockHttpHeaders extends Mock implements HttpHeaders {
@override
bool get chunkedTransferEncoding =>
(super.noSuchMethod(Invocation.getter(#chunkedTransferEncoding), false)
as bool);
(super.noSuchMethod(Invocation.getter(#chunkedTransferEncoding),
returnValue: false) as bool);
@override
set chunkedTransferEncoding(bool? _chunkedTransferEncoding) =>