更新空安全依赖

master
小赖 4 years ago
parent d2b977d049
commit aba917ade1

@ -0,0 +1,3 @@
{
"flutterSdkVersion": "2.0.0"
}

1
.gitignore vendored

@ -72,3 +72,4 @@ build/
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
flutter_sdk

@ -0,0 +1,3 @@
{
"dart.flutterSdkPath": "/Users/akufe/fvm/versions/2.0.0"
}

@ -57,14 +57,14 @@ class NetTool {
static Dio dio = Dio();
static init() {
dio.interceptors.add(InterceptorsWrapper(
onRequest: (options) async {
onRequest: (options, handler) async {
return options;
},
onResponse: (response) async {
onResponse: (response, handler) async {
LoggerData.addData(response);
return response;
},
onError: (DioError e) async {
onError: (DioError e, handler) async {
LoggerData.addData(e);
return e;
},

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
auto_size_text:
dependency: transitive
description:
@ -21,35 +21,35 @@ packages:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
@ -77,14 +77,14 @@ packages:
name: dio
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.10"
version: "4.0.0-prev3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
@ -122,21 +122,21 @@ packages:
name: http_parser
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.4"
version: "4.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
package_info:
dependency: transitive
description:
@ -150,7 +150,7 @@ packages:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
plugin_platform_interface:
dependency: transitive
description:
@ -183,56 +183,56 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
sdks:
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.17.0 <2.0.0"
dart: ">=2.12.0-29.10.beta <3.0.0"
flutter: ">=1.17.0"

@ -27,7 +27,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0
dio: ^3.0.10
dio: ^4.0.0-prev3
power_logger:
path: ../
get:

@ -12,26 +12,26 @@ class DioErrorBuilder extends StatefulWidget {
}
class _DioErrorBuilderState extends State<DioErrorBuilder> {
RequestOptions get _request => widget?.data?.request;
RequestOptions get _request => widget?.data?.requestOptions;
String renderErrText(DioErrorType type) {
switch (type) {
case DioErrorType.CONNECT_TIMEOUT:
case DioErrorType.connectTimeout:
return '连接超时';
break;
case DioErrorType.SEND_TIMEOUT:
case DioErrorType.sendTimeout:
return '发送超时';
break;
case DioErrorType.RECEIVE_TIMEOUT:
case DioErrorType.receiveTimeout:
return '接收超时';
break;
case DioErrorType.RESPONSE:
case DioErrorType.response:
return 'Serve Side Error';
break;
case DioErrorType.CANCEL:
case DioErrorType.cancel:
return '取消连接';
break;
case DioErrorType.DEFAULT:
case DioErrorType.other:
return '未知错误';
break;
}

@ -12,7 +12,7 @@ class DioResponseBuilder extends StatefulWidget {
}
class _DioResponseBuilderState extends State<DioResponseBuilder> {
RequestOptions get _request => widget?.data?.request;
RequestOptions get _request => widget?.data?.requestOptions;
@override
Widget build(BuildContext context) {

@ -21,7 +21,7 @@ class DioParser {
}
/// get dio request
RequestOptions get request => _response.request;
RequestOptions get request => _response.requestOptions;
/// get dio response
Response get response => _response;

@ -13,7 +13,7 @@ class DioErrorView extends StatefulWidget {
}
class _DioErrorViewState extends State<DioErrorView> {
RequestOptions get _request => widget.data.request;
RequestOptions get _request => widget.data.requestOptions;
_buildBaseURL() {
return _request.baseUrl == null || _request.baseUrl.length == 0
? const SizedBox()
@ -61,10 +61,10 @@ class _DioErrorViewState extends State<DioErrorView> {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.red[600],
title: Text(widget.data.request.path),
title: Text(widget.data.requestOptions.path),
actions: [
Chip(
label: Text(widget.data.request.method),
label: Text(widget.data.requestOptions.method),
backgroundColor: Colors.lightGreen,
),
SizedBox(width: 8),

@ -152,10 +152,10 @@ class _DioResponseViewState extends State<DioResponseView> {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.green[600],
title: Text(widget.data.request.path),
title: Text(widget.data.requestOptions.path),
actions: [
Chip(
label: Text(widget.data.request.method),
label: Text(widget.data.requestOptions.method),
backgroundColor: Colors.lightGreen,
),
SizedBox(width: 8),

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
auto_size_text:
dependency: "direct main"
description:
@ -21,35 +21,35 @@ packages:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
device_info:
dependency: "direct main"
description:
@ -70,14 +70,14 @@ packages:
name: dio
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.10"
version: "4.0.0-prev3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
@ -108,21 +108,21 @@ packages:
name: http_parser
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.4"
version: "4.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
package_info:
dependency: "direct main"
description:
@ -136,7 +136,7 @@ packages:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
plugin_platform_interface:
dependency: transitive
description:
@ -162,56 +162,56 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.17.0 <2.0.0"
dart: ">=2.12.0-29.10.beta <3.0.0"
flutter: ">=1.17.0"

Loading…
Cancel
Save