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 ## 0.6.0-nullsafety.1
* Fix null safety on web * Fix null safety on web

View File

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

View File

@ -42,7 +42,7 @@ packages:
name: build name: build
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.1" version: "1.6.2"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -171,14 +171,14 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3"
logging: logging:
dependency: transitive dependency: transitive
description: description:
name: logging name: logging
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.11.4" version: "1.0.0"
markdown: markdown:
dependency: "direct main" dependency: "direct main"
description: description:
@ -206,7 +206,7 @@ packages:
name: mockito name: mockito
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.0.0-nullsafety.5" version: "5.0.0-nullsafety.7"
node_interop: node_interop:
dependency: transitive dependency: transitive
description: description:
@ -241,7 +241,7 @@ packages:
name: pedantic name: pedantic
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.2" version: "1.10.0"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: 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 including text styles, tables, links, and more, from plain text data
formatted with simple Markdown tags. formatted with simple Markdown tags.
homepage: https://github.com/flutter/flutter_markdown homepage: https://github.com/flutter/flutter_markdown
version: 0.6.0-nullsafety.1 version: 0.6.0-nullsafety.2
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
markdown: ^4.0.0-nullsafety.0 markdown: ^4.0.0-nullsafety.0
meta: ^1.1.7 meta: ^1.3.0-nullsafety.6
path: ^1.6.4 path: ^1.8.0-nullsafety.3
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
mockito: ^5.0.0-nullsafety.5 mockito: ^5.0.0-nullsafety.7
environment: environment:
sdk: ">=2.12.0-0 <3.0.0" sdk: ">=2.12.0-0 <3.0.0"

View File

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