From 9ef7e0a047cda650cbd5a9e4482b476932d16797 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 10:15:37 +0800 Subject: [PATCH 1/6] full migrate to sound null safety. --- example/pubspec.lock | 2 +- lib/src/builders/dio_error_builder.dart | 12 +-- lib/src/builders/dio_responses_builder.dart | 8 +- lib/src/data/logger_data.dart | 6 +- lib/src/parser/dio_parser/dio_parser.dart | 10 +-- lib/src/parser/unfocus_parser.dart | 2 +- lib/src/power_logger.dart | 4 +- lib/src/power_logger_view.dart | 6 +- lib/src/view/box_view.dart | 8 +- lib/src/view/dio_error_view.dart | 4 +- lib/src/view/dio_response_view.dart | 31 ++++--- lib/src/view/table_view.dart | 4 +- lib/src/view/title_view.dart | 2 +- lib/src/views/info_view.dart | 98 ++++++++++----------- lib/src/views/logger_view.dart | 2 +- lib/src/views/settings_view.dart | 2 +- lib/src/widgets/logger_fab.dart | 14 +-- pubspec.yaml | 4 +- 18 files changed, 105 insertions(+), 114 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 299279a..88db764 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -164,7 +164,7 @@ packages: path: ".." relative: true source: path - version: "0.1.3" + version: "1.0.0-nullsafety.0" sky_engine: dependency: transitive description: flutter diff --git a/lib/src/builders/dio_error_builder.dart b/lib/src/builders/dio_error_builder.dart index 31aac61..5ceddce 100644 --- a/lib/src/builders/dio_error_builder.dart +++ b/lib/src/builders/dio_error_builder.dart @@ -5,42 +5,34 @@ import 'package:power_logger/src/view/dio_error_view.dart'; ///Dio Error builder class DioErrorBuilder extends StatefulWidget { final DioError data; - DioErrorBuilder({Key key, @required this.data}) : super(key: key); + DioErrorBuilder({Key? key, required this.data}) : super(key: key); @override _DioErrorBuilderState createState() => _DioErrorBuilderState(); } class _DioErrorBuilderState extends State { - RequestOptions get _request => widget?.data?.requestOptions; + RequestOptions get _request => widget.data.requestOptions; String renderErrText(DioErrorType type) { switch (type) { case DioErrorType.connectTimeout: return '连接超时'; - break; case DioErrorType.sendTimeout: return '发送超时'; - break; case DioErrorType.receiveTimeout: return '接收超时'; - break; case DioErrorType.response: return 'Serve Side Error'; - break; case DioErrorType.cancel: return '取消连接'; - break; case DioErrorType.other: return '未知错误'; - break; } - return ''; } @override Widget build(BuildContext context) { - if (widget.data == null) return ListTile(title: Text('NULL Dio Error')); return Material( color: Colors.red[100], child: Column( diff --git a/lib/src/builders/dio_responses_builder.dart b/lib/src/builders/dio_responses_builder.dart index 26cc94e..61b2280 100644 --- a/lib/src/builders/dio_responses_builder.dart +++ b/lib/src/builders/dio_responses_builder.dart @@ -5,14 +5,14 @@ import 'package:power_logger/src/view/dio_response_view.dart'; /// Dio Response Builder class DioResponseBuilder extends StatefulWidget { final Response data; - DioResponseBuilder({Key key, this.data}) : super(key: key); + DioResponseBuilder({Key? key,required this.data}) : super(key: key); @override _DioResponseBuilderState createState() => _DioResponseBuilderState(); } class _DioResponseBuilderState extends State { - RequestOptions get _request => widget?.data?.requestOptions; + RequestOptions? get _request => widget.data.requestOptions; @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ class _DioResponseBuilderState extends State { ), ), title: Text( - _request.path, + _request!.path, style: TextStyle( color: Colors.black87, ), @@ -37,7 +37,7 @@ class _DioResponseBuilderState extends State { children: [ Chip( backgroundColor: Colors.green.withOpacity(0.8), - label: Text(_request.method), + label: Text(_request!.method), ), ], ), diff --git a/lib/src/data/logger_data.dart b/lib/src/data/logger_data.dart index a92f9c9..c6bc464 100644 --- a/lib/src/data/logger_data.dart +++ b/lib/src/data/logger_data.dart @@ -13,7 +13,7 @@ class LoggerData { /// set the logger max number. static setMax(int max) { - _maxLength = max ?? 100; + _maxLength = max; } /// add data to logger @@ -35,12 +35,12 @@ class LoggerData { /// add data listener static addListener(Function listener) { - _listenableData.addListener(listener); + _listenableData.addListener(listener as void Function()); } /// remove data listener static removeListener(Function listener) { - _listenableData.removeListener(listener); + _listenableData.removeListener(listener as void Function()); } } diff --git a/lib/src/parser/dio_parser/dio_parser.dart b/lib/src/parser/dio_parser/dio_parser.dart index 6739c03..69db2ff 100644 --- a/lib/src/parser/dio_parser/dio_parser.dart +++ b/lib/src/parser/dio_parser/dio_parser.dart @@ -15,20 +15,20 @@ enum ContentType { /// Dio parse class DioParser { - Response _response; - DioParser(Response response) { + Response? _response; + DioParser(Response? response) { _response = response; } /// get dio request - RequestOptions get request => _response.requestOptions; + RequestOptions get request => _response!.requestOptions; /// get dio response - Response get response => _response; + Response? get response => _response; /// get dio contentType ContentType get type { - String _ctype = response.headers.map['content-type'].first; + String _ctype = response!.headers.map['content-type']!.first; switch (_ctype) { case 'text/plain': return ContentType.TEXT_PLAIN; diff --git a/lib/src/parser/unfocus_parser.dart b/lib/src/parser/unfocus_parser.dart index 12f2f8b..70ddbc2 100644 --- a/lib/src/parser/unfocus_parser.dart +++ b/lib/src/parser/unfocus_parser.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; /// UnfocusParser class UnfocusParser extends StatelessWidget { final dynamic data; - const UnfocusParser({Key key, @required this.data}) : super(key: key); + const UnfocusParser({Key? key, required this.data}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/src/power_logger.dart b/lib/src/power_logger.dart index 00306ba..0f18b15 100644 --- a/lib/src/power_logger.dart +++ b/lib/src/power_logger.dart @@ -26,14 +26,14 @@ class PowerLogger { ///PowerLogger.start(context,debug:true); ///``` static start(BuildContext context, {bool debug = true}) { - WidgetsBinding.instance.addPostFrameCallback((_) { + WidgetsBinding.instance!.addPostFrameCallback((_) { PowerLogger.debug = debug; if (debug) _insertToOverlay(context); }); } static _insertToOverlay(BuildContext context) { - Overlay.of(context).insert(OverlayEntry( + Overlay.of(context)!.insert(OverlayEntry( builder: (context) { return LoggerFab(); }, diff --git a/lib/src/power_logger_view.dart b/lib/src/power_logger_view.dart index f505e04..eb76785 100644 --- a/lib/src/power_logger_view.dart +++ b/lib/src/power_logger_view.dart @@ -6,7 +6,7 @@ import 'package:power_logger/src/views/settings_view.dart'; ///Logger view class PowerLoggerView extends StatefulWidget { - PowerLoggerView({Key key}) : super(key: key); + PowerLoggerView({Key? key}) : super(key: key); @override _PowerLoggerViewState createState() => _PowerLoggerViewState(); @@ -15,7 +15,7 @@ class PowerLoggerView extends StatefulWidget { class _PowerLoggerViewState extends State { PageController _pageController = PageController(); int _currentIndex = 0; - void Function(void Function()) _setState; + void Function(void Function())? _setState; @override Widget build(BuildContext context) { return Theme( @@ -37,7 +37,7 @@ class _PowerLoggerViewState extends State { controller: _pageController, onPageChanged: (index) { _currentIndex = index; - if (_setState != null) _setState(() {}); + if (_setState != null) _setState!(() {}); }, children: [ LoggerView(), diff --git a/lib/src/view/box_view.dart b/lib/src/view/box_view.dart index 07a23ca..1363e22 100644 --- a/lib/src/view/box_view.dart +++ b/lib/src/view/box_view.dart @@ -3,12 +3,12 @@ import 'package:flutter/material.dart'; ///BoxView class BoxView extends StatelessWidget { final Widget title; - final Widget child; - final List children; + final Widget? child; + final List? children; const BoxView({ - Key key, + Key? key, this.child, - @required this.title, + required this.title, this.children, }) : assert(child != null || children != null), super(key: key); diff --git a/lib/src/view/dio_error_view.dart b/lib/src/view/dio_error_view.dart index db8e520..a4ea5ea 100644 --- a/lib/src/view/dio_error_view.dart +++ b/lib/src/view/dio_error_view.dart @@ -6,7 +6,7 @@ import 'package:power_logger/src/view/title_view.dart'; class DioErrorView extends StatefulWidget { final DioError data; - DioErrorView({Key key, @required this.data}) : super(key: key); + DioErrorView({Key? key, required this.data}) : super(key: key); @override _DioErrorViewState createState() => _DioErrorViewState(); @@ -15,7 +15,7 @@ class DioErrorView extends StatefulWidget { class _DioErrorViewState extends State { RequestOptions get _request => widget.data.requestOptions; _buildBaseURL() { - return _request.baseUrl == null || _request.baseUrl.length == 0 + return _request.baseUrl.length == 0 ? const SizedBox() : BoxView( title: Text('BaseURL'), diff --git a/lib/src/view/dio_response_view.dart b/lib/src/view/dio_response_view.dart index 543e8c1..9cac7da 100644 --- a/lib/src/view/dio_response_view.dart +++ b/lib/src/view/dio_response_view.dart @@ -14,8 +14,8 @@ import 'package:power_logger/src/view/title_view.dart'; // enum class DioResponseView extends StatefulWidget { - final Response data; - DioResponseView({Key key, @required this.data}) : super(key: key); + final Response? data; + DioResponseView({Key? key, required this.data}) : super(key: key); @override _DioResponseViewState createState() => _DioResponseViewState(); @@ -24,9 +24,9 @@ class DioResponseView extends StatefulWidget { class _DioResponseViewState extends State { bool _showRawData = false; RequestOptions get _request => _dioParser.request; - DioParser _dioParser; + late DioParser _dioParser; _buildBaseURL() { - return _request.baseUrl == null || _request.baseUrl.length == 0 + return _request.baseUrl.length == 0 ? const SizedBox() : BoxView( title: Text('BaseURL'), @@ -46,9 +46,9 @@ class _DioResponseViewState extends State { title: const Text('Status'), children: [ Chip( - label: Text(widget.data.statusCode.toString()), + label: Text(widget.data!.statusCode.toString()), ), - Text(widget.data.statusMessage), + Text(widget.data!.statusMessage!), ], ); } @@ -77,7 +77,7 @@ class _DioResponseViewState extends State { return BoxView( title: Text('Data'), child: HighlightView( - widget.data.data, + widget.data!.data, language: _dioParser.highlight, theme: atomOneLightTheme, ), @@ -85,9 +85,9 @@ class _DioResponseViewState extends State { case ContentType.JSON: //解析字符串类型的JSON. //parse json of String type. - if (widget.data.data is String) { + if (widget.data!.data is String) { String json = ''; - json = prettyJson(jsonDecode(widget.data.data)); + json = prettyJson(jsonDecode(widget.data!.data)); return BoxView( title: Text('Data'), child: HighlightView( @@ -100,12 +100,11 @@ class _DioResponseViewState extends State { return BoxView( title: Text('Data'), child: HighlightView( - prettyJson(widget.data.data), + prettyJson(widget.data!.data), language: 'json', theme: atomOneLightTheme, ), ); - break; case ContentType.IMAGE: return Text("IMAGE"); case ContentType.AUDIO: @@ -118,7 +117,7 @@ class _DioResponseViewState extends State { return BoxView( title: Text('Data'), child: HighlightView( - prettyJson(widget.data.data), + prettyJson(widget.data!.data), language: 'json', theme: atomOneLightTheme, ), @@ -128,7 +127,7 @@ class _DioResponseViewState extends State { _buildRawData() { return BoxView( title: Text('Raw Data'), - child: SelectableText(widget.data.data.toString()), + child: SelectableText(widget.data!.data.toString()), ); } @@ -152,10 +151,10 @@ class _DioResponseViewState extends State { return Scaffold( appBar: AppBar( backgroundColor: Colors.green[600], - title: Text(widget.data.requestOptions.path), + title: Text(widget.data!.requestOptions.path), actions: [ Chip( - label: Text(widget.data.requestOptions.method), + label: Text(widget.data!.requestOptions.method), backgroundColor: Colors.lightGreen, ), SizedBox(width: 8), @@ -171,7 +170,7 @@ class _DioResponseViewState extends State { _buildMap(_request.queryParameters), _buildMap(_request.data), TitleView(title: Text('Response')), - _buildMap(widget.data.headers.map), + _buildMap(widget.data!.headers.map), _buildStatus(), SwitchListTile( value: _showRawData, diff --git a/lib/src/view/table_view.dart b/lib/src/view/table_view.dart index b537811..2055bac 100644 --- a/lib/src/view/table_view.dart +++ b/lib/src/view/table_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; class TableView extends StatelessWidget { - final Map map; - const TableView({Key key, @required this.map}) : super(key: key); + final Map? map; + const TableView({Key? key, required this.map}) : super(key: key); Widget _buildTableTitle(String title) { return Padding( padding: EdgeInsets.all(5), diff --git a/lib/src/view/title_view.dart b/lib/src/view/title_view.dart index a19b230..f70bc37 100644 --- a/lib/src/view/title_view.dart +++ b/lib/src/view/title_view.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; class TitleView extends StatelessWidget { final Widget title; - const TitleView({Key key, @required this.title}) : super(key: key); + const TitleView({Key? key, required this.title}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/src/views/info_view.dart b/lib/src/views/info_view.dart index bb388af..f8ca8c7 100644 --- a/lib/src/views/info_view.dart +++ b/lib/src/views/info_view.dart @@ -8,7 +8,7 @@ import 'package:flutter/services.dart'; import 'package:package_info/package_info.dart'; class InfoView extends StatefulWidget { - InfoView({Key key}) : super(key: key); + InfoView({Key? key}) : super(key: key); @override _InfoViewState createState() => _InfoViewState(); @@ -16,9 +16,9 @@ class InfoView extends StatefulWidget { class _InfoViewState extends State with AutomaticKeepAliveClientMixin { - PackageInfo packageInfo; - AndroidDeviceInfo androidInfo; - IosDeviceInfo iosInfo; + PackageInfo? packageInfo; + AndroidDeviceInfo? androidInfo; + IosDeviceInfo? iosInfo; Future getAllInfo() async { DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); @@ -58,7 +58,7 @@ class _InfoViewState extends State children: [ Text(title), AutoSizeText( - subTitle ?? '', + subTitle, style: TextStyle(fontSize: 26), maxLines: 2, ), @@ -68,7 +68,7 @@ class _InfoViewState extends State ); } - _buildTile(String title, String subTitle) { + _buildTile(String title, String? subTitle) { return DefaultTextStyle( style: TextStyle(color: Colors.black), child: ListTile( @@ -93,53 +93,53 @@ class _InfoViewState extends State _buildAndroidList() { return SliverList( delegate: SliverChildListDelegate([ - _buildTile('androidId', androidInfo.androidId), - _buildTile('board', androidInfo.board), - _buildTile('bootloader', androidInfo.bootloader), - _buildTile('brand', androidInfo.brand), - _buildTile('device', androidInfo.device), - _buildTile('display', androidInfo.display), - _buildTile('fingerprint', androidInfo.fingerprint), - _buildTile('hardware', androidInfo.hardware), - _buildTile('host', androidInfo.host), - _buildTile('id', androidInfo.id), - _buildTile('manufacturer', androidInfo.manufacturer), - _buildTile('model', androidInfo.model), - _buildTile('product', androidInfo.product), - _buildTile('tags', androidInfo.tags), - _buildTile('type', androidInfo.type), - _buildTile('isPhysicalDevice', androidInfo.isPhysicalDevice.toString()), + _buildTile('androidId', androidInfo!.androidId), + _buildTile('board', androidInfo!.board), + _buildTile('bootloader', androidInfo!.bootloader), + _buildTile('brand', androidInfo!.brand), + _buildTile('device', androidInfo!.device), + _buildTile('display', androidInfo!.display), + _buildTile('fingerprint', androidInfo!.fingerprint), + _buildTile('hardware', androidInfo!.hardware), + _buildTile('host', androidInfo!.host), + _buildTile('id', androidInfo!.id), + _buildTile('manufacturer', androidInfo!.manufacturer), + _buildTile('model', androidInfo!.model), + _buildTile('product', androidInfo!.product), + _buildTile('tags', androidInfo!.tags), + _buildTile('type', androidInfo!.type), + _buildTile('isPhysicalDevice', androidInfo!.isPhysicalDevice.toString()), _buildTile( - 'supported32BitAbis', androidInfo.supported32BitAbis.join(',')), + 'supported32BitAbis', androidInfo!.supported32BitAbis.join(',')), _buildTile( - 'supported64BitAbis', androidInfo.supported64BitAbis.join(',')), - _buildTile('supportedAbis', androidInfo.supportedAbis.join(',')), - _buildTile('baseOS', androidInfo.version.baseOS), - _buildTile('codename', androidInfo.version.codename), - _buildTile('incremental', androidInfo.version.incremental), - _buildTile('release', androidInfo.version.release), - _buildTile('securityPatch', androidInfo.version.securityPatch), - _buildTile('previewSdkInt', androidInfo.version.previewSdkInt.toString()), - _buildTile('sdkInt', androidInfo.version.sdkInt.toString()), - _buildTile('systemFeatures', androidInfo.systemFeatures.join('\n')), + 'supported64BitAbis', androidInfo!.supported64BitAbis.join(',')), + _buildTile('supportedAbis', androidInfo!.supportedAbis.join(',')), + _buildTile('baseOS', androidInfo!.version.baseOS), + _buildTile('codename', androidInfo!.version.codename), + _buildTile('incremental', androidInfo!.version.incremental), + _buildTile('release', androidInfo!.version.release), + _buildTile('securityPatch', androidInfo!.version.securityPatch), + _buildTile('previewSdkInt', androidInfo!.version.previewSdkInt.toString()), + _buildTile('sdkInt', androidInfo!.version.sdkInt.toString()), + _buildTile('systemFeatures', androidInfo!.systemFeatures.join('\n')), ])); } _buildIOSList() { return SliverList( delegate: SliverChildListDelegate([ - _buildTile('identifierForVendor', iosInfo.identifierForVendor), - _buildTile('localizedModel', iosInfo.localizedModel), - _buildTile('model', iosInfo.model), - _buildTile('name', iosInfo.name), - _buildTile('systemName', iosInfo.systemName), - _buildTile('systemVersion', iosInfo.systemVersion), - _buildTile('isPhysicalDevice', iosInfo.isPhysicalDevice.toString()), - _buildTile('machine', iosInfo.utsname.machine), - _buildTile('nodename', iosInfo.utsname.nodename), - _buildTile('release', iosInfo.utsname.release), - _buildTile('sysname', iosInfo.utsname.sysname), - _buildTile('version', iosInfo.utsname.version), + _buildTile('identifierForVendor', iosInfo!.identifierForVendor), + _buildTile('localizedModel', iosInfo!.localizedModel), + _buildTile('model', iosInfo!.model), + _buildTile('name', iosInfo!.name), + _buildTile('systemName', iosInfo!.systemName), + _buildTile('systemVersion', iosInfo!.systemVersion), + _buildTile('isPhysicalDevice', iosInfo!.isPhysicalDevice.toString()), + _buildTile('machine', iosInfo!.utsname.machine), + _buildTile('nodename', iosInfo!.utsname.nodename), + _buildTile('release', iosInfo!.utsname.release), + _buildTile('sysname', iosInfo!.utsname.sysname), + _buildTile('version', iosInfo!.utsname.version), ])); } @@ -171,10 +171,10 @@ class _InfoViewState extends State mainAxisSpacing: 10, crossAxisSpacing: 10, children: [ - _buildGridItem('appName', packageInfo.appName), - _buildGridItem('buildNumber', packageInfo.buildNumber), - _buildGridItem('packageName', packageInfo.packageName), - _buildGridItem('version', packageInfo.version), + _buildGridItem('appName', packageInfo!.appName), + _buildGridItem('buildNumber', packageInfo!.buildNumber), + _buildGridItem('packageName', packageInfo!.packageName), + _buildGridItem('version', packageInfo!.version), ], ), ), diff --git a/lib/src/views/logger_view.dart b/lib/src/views/logger_view.dart index f6a63c5..221d5a6 100644 --- a/lib/src/views/logger_view.dart +++ b/lib/src/views/logger_view.dart @@ -3,7 +3,7 @@ import 'package:power_logger/src/data/logger_data.dart'; import 'package:power_logger/src/parser/data_parser.dart'; class LoggerView extends StatefulWidget { - LoggerView({Key key}) : super(key: key); + LoggerView({Key? key}) : super(key: key); @override _LoggerViewState createState() => _LoggerViewState(); diff --git a/lib/src/views/settings_view.dart b/lib/src/views/settings_view.dart index 00dbff0..22c1feb 100644 --- a/lib/src/views/settings_view.dart +++ b/lib/src/views/settings_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; class SettingsView extends StatefulWidget { - SettingsView({Key key}) : super(key: key); + SettingsView({Key? key}) : super(key: key); @override _SettingsViewState createState() => _SettingsViewState(); diff --git a/lib/src/widgets/logger_fab.dart b/lib/src/widgets/logger_fab.dart index bd50fcf..5fd3ca9 100644 --- a/lib/src/widgets/logger_fab.dart +++ b/lib/src/widgets/logger_fab.dart @@ -3,7 +3,7 @@ import 'package:flutter/physics.dart'; import 'package:power_logger/src/power_logger_view.dart'; class LoggerFab extends StatefulWidget { - LoggerFab({Key key}) : super(key: key); + LoggerFab({Key? key}) : super(key: key); @override _LoggerFabState createState() => _LoggerFabState(); @@ -12,9 +12,9 @@ class LoggerFab extends StatefulWidget { class _LoggerFabState extends State with SingleTickerProviderStateMixin { bool showSubPage = false; - AnimationController _animationController; + AnimationController? _animationController; var _dragAlignment = Alignment.center; - Animation _animation; + late Animation _animation; final _spring = const SpringDescription(mass: 15, stiffness: 1000, damping: 0.7); @@ -34,7 +34,7 @@ class _LoggerFabState extends State calcAlignment = Alignment(calcAlignment.x, 0.9); if (_dragAlignment.y <= -0.9) calcAlignment = Alignment(calcAlignment.x, -0.9); - _animation = _animationController.drive( + _animation = _animationController!.drive( AlignmentTween( begin: _dragAlignment, end: calcAlignment, @@ -44,7 +44,7 @@ class _LoggerFabState extends State final simulation = SpringSimulation(_spring, 0, 1, _normalizeVelocity(velocity, size)); - _animationController.animateWith(simulation); + _animationController!.animateWith(simulation); } @override @@ -69,7 +69,7 @@ class _LoggerFabState extends State duration: Duration(milliseconds: 300), opacity: showSubPage ? 0 : 1, child: GestureDetector( - onPanStart: (details) => _animationController.stop(canceled: true), + onPanStart: (details) => _animationController!.stop(canceled: true), onPanUpdate: (details) => setState(() => _dragAlignment += Alignment( details.delta.dx / (size.width / 2), details.delta.dy / (size.height / 2), @@ -94,7 +94,7 @@ class _LoggerFabState extends State } class _FabButton extends StatelessWidget { - const _FabButton({Key key}) : super(key: key); + const _FabButton({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/pubspec.yaml b/pubspec.yaml index 3ad6247..7bbb22c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: power_logger description: A well log tool on flutter, support Dio and custom type data. -version: 0.1.3 +version: 1.0.0-nullsafety.0 homepage: https://github.com/laiiihz/power_logger environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' flutter: ">=1.17.0" dependencies: From ec791f3f3413e3f6d005cd7fcaebb4a7c704f466 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 10:17:25 +0800 Subject: [PATCH 2/6] auto_size_text dep update --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7bbb22c..7a94a7c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: flutter_highlight: ^0.7.0 device_info: ^2.0.0 package_info: ^2.0.0 - auto_size_text: 3.0.0-nullsafety.0 + auto_size_text: ^3.0.0-nullsafety.0 dev_dependencies: flutter_test: From 0eb0339132411f0429355af082f667c3065ab13d Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 10:18:40 +0800 Subject: [PATCH 3/6] update changelog and pubspec --- CHANGELOG.md | 4 +++ example/pubspec.lock | 62 ++++++++++++++++++++++---------------------- pubspec.lock | 54 +++++++++++++++++++------------------- 3 files changed, 62 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eac26e6..c88d6f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## [1.0.0-nullsafety.0] + +* migrate to sound null safety. + ## [0.1.3] * listenable value. diff --git a/example/pubspec.lock b/example/pubspec.lock index 88db764..11018f7 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,84 +5,84 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.0" auto_size_text: dependency: transitive description: name: auto_size_text - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0-nullsafety.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" device_info: dependency: transitive description: name: device_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0-prev3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -94,7 +94,7 @@ packages: dependency: transitive description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" flutter_test: @@ -106,56 +106,56 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.24.0" + version: "3.26.0" highlight: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" package_info: dependency: transitive description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" power_logger: @@ -174,56 +174,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.19" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: diff --git a/pubspec.lock b/pubspec.lock index 249c799..b178bf8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,77 +5,77 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.0" auto_size_text: dependency: "direct main" description: name: auto_size_text - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0-nullsafety.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" device_info: dependency: "direct main" description: name: device_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0-prev3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -87,7 +87,7 @@ packages: dependency: "direct main" description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" flutter_test: @@ -99,49 +99,49 @@ packages: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" sky_engine: @@ -153,56 +153,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.19" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: From 46d6110f1fdf8fdbb45bd333f4c6eb7333732c87 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 10:31:05 +0800 Subject: [PATCH 4/6] update readme file & update example --- README.md | 2 +- example/lib/main.dart | 8 +++--- example/pubspec.lock | 58 +++++++++++++++++++++---------------------- example/pubspec.yaml | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 722febd..ae287c6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ LoggerData.addData(data); ## WARNING -*only tested on flutter `1.22.5`,`1.22.6` +* flutter SDK >= 2.0.0 ## author diff --git a/example/lib/main.dart b/example/lib/main.dart index ab72cf0..c9f6c5e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -17,7 +17,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); + MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override @@ -58,15 +58,15 @@ class NetTool { static init() { dio.interceptors.add(InterceptorsWrapper( onRequest: (options, handler) async { - return options; + return handler.next(options); }, onResponse: (response, handler) async { LoggerData.addData(response); - return response; + return handler.next(response); }, onError: (DioError e, handler) async { LoggerData.addData(e); - return e; + return handler.next(e); }, )); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 11018f7..91c85b1 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,84 +5,84 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.5.0" auto_size_text: dependency: transitive description: name: auto_size_text - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0-nullsafety.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" device_info: dependency: transitive description: name: device_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0-prev3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" flutter: @@ -94,7 +94,7 @@ packages: dependency: transitive description: name: flutter_highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.0" flutter_test: @@ -106,56 +106,56 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.26.0" highlight: dependency: transitive description: name: highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" package_info: dependency: transitive description: name: package_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" power_logger: @@ -174,56 +174,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.19" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" sdks: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 99dad96..3101df8 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: From 50f8e8b9ec9bc1fe5560243c17cd246500849eda Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 16:25:57 +0800 Subject: [PATCH 5/6] update error page --- .gitignore | 1 + .vscode/settings.json | 3 ++ example/pubspec.lock | 64 ++++++++++++++--------------- lib/src/view/box_view.dart | 52 ++++++++++------------- lib/src/view/dio_error_view.dart | 10 ++++- lib/src/view/dio_response_view.dart | 2 +- pubspec.lock | 56 ++++++++++++------------- 7 files changed, 96 insertions(+), 92 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 1985397..b76ade6 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ build/ !**/ios/**/default.mode2v3 !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 +flutter_sdk diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d8b2ffb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": "/Users/akufe/fvm/versions/1.22.6" +} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 3940350..fd335e9 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,84 +5,84 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.0-nullsafety.1" auto_size_text: dependency: transitive description: name: auto_size_text - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0-nullsafety.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" device_info: dependency: transitive description: name: device_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.10" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" flutter: @@ -94,7 +94,7 @@ packages: dependency: transitive description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" flutter_test: @@ -106,56 +106,56 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.24.0" + version: "3.26.0" highlight: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0-nullsafety.3" package_info: dependency: transitive description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.3+4" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0-nullsafety.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" power_logger: @@ -169,7 +169,7 @@ packages: dependency: transitive description: name: pretty_json - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" sky_engine: @@ -181,58 +181,58 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.3" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.10.0-110 <2.11.0" flutter: ">=1.17.0 <2.0.0" diff --git a/lib/src/view/box_view.dart b/lib/src/view/box_view.dart index 07a23ca..d1ab155 100644 --- a/lib/src/view/box_view.dart +++ b/lib/src/view/box_view.dart @@ -17,37 +17,29 @@ class BoxView extends StatelessWidget { Widget build(BuildContext context) { return Padding( padding: EdgeInsets.all(5), - child: Material( - color: Colors.white, - borderRadius: BorderRadius.circular(5), - elevation: 4, - child: Padding( - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - DefaultTextStyle( - style: TextStyle( - fontSize: 20, - color: Colors.black87, - fontWeight: FontWeight.w600, - ), - child: title, - ), - child == null ? SizedBox() : SizedBox(height: 10), - DefaultTextStyle( - style: TextStyle( - fontSize: 16, - color: Colors.black87, - fontWeight: FontWeight.w400, - ), - child: child ?? SizedBox(), - ), - children == null ? SizedBox() : SizedBox(height: 10), - ...children ?? [], - ], + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DefaultTextStyle( + style: TextStyle( + fontSize: 20, + color: Colors.black87, + fontWeight: FontWeight.w600, + ), + child: title, ), - ), + child == null ? SizedBox() : SizedBox(height: 10), + DefaultTextStyle( + style: TextStyle( + fontSize: 16, + color: Colors.black87, + fontWeight: FontWeight.w400, + ), + child: child ?? SizedBox(), + ), + children == null ? SizedBox() : SizedBox(height: 10), + ...children ?? [], + ], ), ); } diff --git a/lib/src/view/dio_error_view.dart b/lib/src/view/dio_error_view.dart index d27b7a7..d992ba3 100644 --- a/lib/src/view/dio_error_view.dart +++ b/lib/src/view/dio_error_view.dart @@ -26,7 +26,7 @@ class _DioErrorViewState extends State { _buildPath() { return BoxView( title: const Text('Path'), - child: Text(_request.path), + child: SelectableText(_request.path), ); } @@ -39,6 +39,13 @@ class _DioErrorViewState extends State { ); } + _buildMessage() { + return BoxView( + title: const Text('Message'), + child: Text(widget.data.message ?? ''), + ); + } + _buildMap(dynamic params) { if (params is FormData) { Map formData = {}; @@ -76,6 +83,7 @@ class _DioErrorViewState extends State { TitleView(title: Text('Request')), _buildBaseURL(), _buildPath(), + _buildMessage(), _buildMap(_request.headers), _buildMap(_request.queryParameters), _buildMap(_request.data), diff --git a/lib/src/view/dio_response_view.dart b/lib/src/view/dio_response_view.dart index a0f8e82..5ac3757 100644 --- a/lib/src/view/dio_response_view.dart +++ b/lib/src/view/dio_response_view.dart @@ -107,7 +107,7 @@ class _DioResponseViewState extends State { ); break; case ContentType.IMAGE: - return Text("IMAGE"); + return Image.network(_request.baseUrl + _request.path); case ContentType.AUDIO: return Text("AUDIO"); case ContentType.VIDEO: diff --git a/pubspec.lock b/pubspec.lock index 8bef622..2abcbec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,77 +5,77 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.0-nullsafety.1" auto_size_text: dependency: "direct main" description: name: auto_size_text - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0-nullsafety.3" device_info: dependency: "direct main" description: name: device_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.10" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" flutter: @@ -87,7 +87,7 @@ packages: dependency: "direct main" description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" flutter_test: @@ -99,56 +99,56 @@ packages: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0-nullsafety.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.3+4" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0-nullsafety.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" pretty_json: dependency: "direct main" description: name: pretty_json - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" sky_engine: @@ -160,56 +160,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0-nullsafety.3" sdks: From f717611a456c784b3fe4fa8471cebbd3dc107fa5 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 16:49:33 +0800 Subject: [PATCH 6/6] add logger tool --- CHANGELOG.md | 5 +++ example/lib/main.dart | 5 +++ example/pubspec.lock | 69 ++++++++++++++++++-------------- lib/src/data/logger_data.dart | 11 +++++ lib/src/views/settings_view.dart | 8 +++- pubspec.lock | 63 ++++++++++++++++------------- pubspec.yaml | 5 ++- 7 files changed, 103 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eac26e6..2b57543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## [0.1.4] + +* add logger. +* update example app. + ## [0.1.3] * listenable value. diff --git a/example/lib/main.dart b/example/lib/main.dart index 6dcf050..2274a4b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -49,6 +49,11 @@ class _MyHomePageState extends State { appBar: AppBar( title: Text(widget.title), ), + floatingActionButton: FloatingActionButton( + onPressed: () { + NetTool.dio.get("https://www.baidu.com"); + }, + ), ); } } diff --git a/example/pubspec.lock b/example/pubspec.lock index fd335e9..e80712d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,84 +5,84 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.5.0-nullsafety.1" auto_size_text: dependency: transitive description: name: auto_size_text - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0-nullsafety.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" device_info: dependency: transitive description: name: device_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" flutter: @@ -94,7 +94,7 @@ packages: dependency: transitive description: name: flutter_highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" flutter_test: @@ -106,56 +106,63 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.26.0" highlight: dependency: transitive description: name: highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" + logger: + dependency: transitive + description: + name: logger + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.9.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0-nullsafety.3" package_info: dependency: transitive description: name: package_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.3+4" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0-nullsafety.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.3" power_logger: @@ -164,12 +171,12 @@ packages: path: ".." relative: true source: path - version: "0.1.3" + version: "0.1.4" pretty_json: dependency: transitive description: name: pretty_json - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" sky_engine: @@ -181,56 +188,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.3" sdks: diff --git a/lib/src/data/logger_data.dart b/lib/src/data/logger_data.dart index a92f9c9..60493c2 100644 --- a/lib/src/data/logger_data.dart +++ b/lib/src/data/logger_data.dart @@ -1,10 +1,19 @@ import 'package:flutter/foundation.dart'; +import 'package:logger/logger.dart'; import 'package:power_logger/power_logger.dart'; /// logger data storage class LoggerData { static int _maxLength = 100; + static bool _markLogger = false; + static bool get markLogger => _markLogger; + static setLogger(bool state) { + _markLogger = state; + } + + static Logger _logger = Logger(); + /// the real logger data. static List get data => _listenableData.value; @@ -28,6 +37,8 @@ class LoggerData { _listenableData.notify(); } } + + if (_markLogger) _logger.i(data); } /// clear all logger diff --git a/lib/src/views/settings_view.dart b/lib/src/views/settings_view.dart index 00dbff0..ae3e439 100644 --- a/lib/src/views/settings_view.dart +++ b/lib/src/views/settings_view.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:power_logger/power_logger.dart'; class SettingsView extends StatefulWidget { SettingsView({Key key}) : super(key: key); @@ -15,8 +16,11 @@ class _SettingsViewState extends State { SwitchListTile( title: Text('终端日志'), subtitle: Text(''), - value: false, - onChanged: (state) {}, + value: LoggerData.markLogger, + onChanged: (state) { + LoggerData.setLogger(state); + setState(() {}); + }, ), ], ); diff --git a/pubspec.lock b/pubspec.lock index 2abcbec..5748c6e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,77 +5,77 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.5.0-nullsafety.1" auto_size_text: dependency: "direct main" description: name: auto_size_text - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0-nullsafety.3" device_info: dependency: "direct main" description: name: device_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" flutter: @@ -87,7 +87,7 @@ packages: dependency: "direct main" description: name: flutter_highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" flutter_test: @@ -99,56 +99,63 @@ packages: dependency: transitive description: name: highlight - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" + logger: + dependency: "direct main" + description: + name: logger + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.9.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0-nullsafety.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.3+4" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0-nullsafety.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.3" pretty_json: dependency: "direct main" description: name: pretty_json - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" sky_engine: @@ -160,56 +167,56 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0-nullsafety.3" sdks: diff --git a/pubspec.yaml b/pubspec.yaml index 73d81cc..e80e8af 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: power_logger description: A well log tool on flutter, support Dio and custom type data. -version: 0.1.3 +version: 0.1.4 homepage: https://github.com/laiiihz/power_logger environment: @@ -16,9 +16,10 @@ dependencies: device_info: ^1.0.0 package_info: ^0.4.3+4 auto_size_text: ^2.1.0 + logger: ^0.9.4 dev_dependencies: flutter_test: sdk: flutter -flutter: \ No newline at end of file +flutter: