From 1cf9314b6c7dfc4b831f8a8d0b5e29728ed70da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 14:26:49 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E9=80=82=E5=BA=94=E7=91=9E=E5=BA=93?= =?UTF-8?q?=E5=85=8B=E4=B8=BB=E9=A2=98=E5=81=9A=E4=BA=86=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/main.dart | 2 +- lib/src/parser/unfocus_parser.dart | 4 +--- lib/src/view/box_view.dart | 4 ++-- lib/src/view/title_view.dart | 2 +- lib/src/views/info_view.dart | 4 ++-- lib/src/widgets/logger_fab.dart | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index dad4868..ecee1fc 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -17,7 +17,7 @@ class MyApp extends StatelessWidget { return MaterialApp( title: 'PowerLogger\nDemo', home: MyHomePage(title: 'PowerLogger Demo'), - theme: ThemeData.dark(), + //theme: ThemeData.dark(), ); } } diff --git a/lib/src/parser/unfocus_parser.dart b/lib/src/parser/unfocus_parser.dart index 5c89233..4e85a7a 100644 --- a/lib/src/parser/unfocus_parser.dart +++ b/lib/src/parser/unfocus_parser.dart @@ -10,9 +10,7 @@ class UnfocusParser extends StatelessWidget { @override Widget build(BuildContext context) { return Material( - color: Theme.of(context).brightness == Brightness.light - ? Colors.black12 - : Colors.white10, + color: Colors.white10, child: ListTile( onTap: () => Navigator.push( context, diff --git a/lib/src/view/box_view.dart b/lib/src/view/box_view.dart index 6e0b7d9..64a4af2 100644 --- a/lib/src/view/box_view.dart +++ b/lib/src/view/box_view.dart @@ -21,12 +21,12 @@ class BoxView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ DefaultTextStyle( - style: Theme.of(context).textTheme.caption!, + style: TextStyle(fontSize: 16,color: Colors.red), child: title, ), child == null ? SizedBox() : SizedBox(height: 10), DefaultTextStyle( - style: Theme.of(context).textTheme.bodyText2!, + style: TextStyle(fontSize: 15,color: Color(0xFF333333)), child: child ?? SizedBox(), ), children == null ? SizedBox() : SizedBox(height: 10), diff --git a/lib/src/view/title_view.dart b/lib/src/view/title_view.dart index e57f591..8797ad1 100644 --- a/lib/src/view/title_view.dart +++ b/lib/src/view/title_view.dart @@ -9,7 +9,7 @@ class TitleView extends StatelessWidget { return Padding( padding: EdgeInsets.symmetric(horizontal: 5, vertical: 10), child: DefaultTextStyle( - style: Theme.of(context).textTheme.headline4!, + style: TextStyle(fontSize: 26,color: Color(0xFF666666)), child: title, ), ); diff --git a/lib/src/views/info_view.dart b/lib/src/views/info_view.dart index e6b2aff..ecf3a8a 100644 --- a/lib/src/views/info_view.dart +++ b/lib/src/views/info_view.dart @@ -72,7 +72,7 @@ class _InfoViewState extends State delegate: SliverChildListDelegate([ ListTile( title: Text('Package Info'), - tileColor: Theme.of(context).accentColor.withOpacity(0.2), + tileColor: Colors.blue.withOpacity(0.2), ), InfoTile(title: 'appName', subTitle: packageInfo!.appName), InfoTile( @@ -82,7 +82,7 @@ class _InfoViewState extends State InfoTile(title: 'version', subTitle: packageInfo!.version), ListTile( title: Text('Device Info'), - tileColor: Theme.of(context).accentColor.withOpacity(0.1), + tileColor: Colors.blue.withOpacity(0.1), ), ])), _buildView(), diff --git a/lib/src/widgets/logger_fab.dart b/lib/src/widgets/logger_fab.dart index 9f52f95..1d54eab 100644 --- a/lib/src/widgets/logger_fab.dart +++ b/lib/src/widgets/logger_fab.dart @@ -105,7 +105,7 @@ class _FabButton extends StatelessWidget { Widget build(BuildContext context) { return Container( decoration: BoxDecoration( - color: Theme.of(context).accentColor, + color: Colors.blue, borderRadius: BorderRadius.circular(25), boxShadow: [ BoxShadow( From 17c2662eb1c26499b6f58faf98979d62b271ae9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 14:51:42 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=85=A8=E6=94=B9=E6=88=90=E6=B7=B1?= =?UTF-8?q?=E8=89=B2=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/view/dio_response_view.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/view/dio_response_view.dart b/lib/src/view/dio_response_view.dart index 874a810..7ba451a 100644 --- a/lib/src/view/dio_response_view.dart +++ b/lib/src/view/dio_response_view.dart @@ -95,7 +95,7 @@ class _DioResponseViewState extends State { child: HighlightView( json, language: 'json', - theme: atomOneLightTheme, + theme: atomOneDarkTheme, ), ); } @@ -104,7 +104,7 @@ class _DioResponseViewState extends State { child: HighlightView( prettyJson(widget.data!.data), language: 'json', - theme: atomOneLightTheme, + theme: atomOneDarkTheme, ), ); case ContentType.IMAGE: @@ -121,7 +121,7 @@ class _DioResponseViewState extends State { child: HighlightView( prettyJson(widget.data!.data), language: 'json', - theme: atomOneLightTheme, + theme: atomOneDarkTheme, ), ); } From 36b8013275f317b31336abe34268dfc39c46af22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 14:53:35 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=94=B9=E6=88=90light?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/view/dio_response_view.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/src/view/dio_response_view.dart b/lib/src/view/dio_response_view.dart index 7ba451a..4f9515f 100644 --- a/lib/src/view/dio_response_view.dart +++ b/lib/src/view/dio_response_view.dart @@ -79,9 +79,8 @@ class _DioResponseViewState extends State { child: HighlightView( widget.data!.data, language: _dioParser.highlight, - theme: Theme.of(context).brightness == Brightness.light - ? atomOneLightTheme - : atomOneDarkTheme, + theme: atomOneLightTheme + , ), ); case ContentType.JSON: @@ -95,7 +94,7 @@ class _DioResponseViewState extends State { child: HighlightView( json, language: 'json', - theme: atomOneDarkTheme, + theme: atomOneLightTheme, ), ); } @@ -104,7 +103,7 @@ class _DioResponseViewState extends State { child: HighlightView( prettyJson(widget.data!.data), language: 'json', - theme: atomOneDarkTheme, + theme: atomOneLightTheme, ), ); case ContentType.IMAGE: @@ -121,7 +120,7 @@ class _DioResponseViewState extends State { child: HighlightView( prettyJson(widget.data!.data), language: 'json', - theme: atomOneDarkTheme, + theme: atomOneLightTheme, ), ); } From 72ce5742be49c57e476943e6fe935586ed42e194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 15:25:09 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=9D=A2=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=A2=9C=E8=89=B2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/builders/dio_error_builder.dart | 6 +++--- lib/src/builders/dio_responses_builder.dart | 6 +++--- lib/src/builders/flutter_error_builder.dart | 4 ++-- lib/src/parser/unfocus_parser.dart | 6 +++--- lib/src/views/info_view.dart | 4 ++-- lib/src/views/platform_specific/info_tile.dart | 4 ++-- lib/src/views/settings_view.dart | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/src/builders/dio_error_builder.dart b/lib/src/builders/dio_error_builder.dart index 63ec106..b59827b 100644 --- a/lib/src/builders/dio_error_builder.dart +++ b/lib/src/builders/dio_error_builder.dart @@ -21,14 +21,14 @@ class DioErrorBuilder extends StatelessWidget { ), ); }, - title: Text(data.requestOptions.path), - subtitle: Text('${data.message}\n$date'), + title: Text(data.requestOptions.path,style: TextStyle(fontSize: 16,color: Color(0xFF333333)),), + subtitle: Text('${data.message}\n$date',style: TextStyle(fontSize: 14,color: Color(0xFF666666)),), trailing: Row( mainAxisSize: MainAxisSize.min, children: [ Chip( backgroundColor: Colors.blue.withOpacity(0.4), - label: Text(data.requestOptions.method), + label: Text(data.requestOptions.method,style: TextStyle(fontSize: 14,color: Colors.black),), ), ], ), diff --git a/lib/src/builders/dio_responses_builder.dart b/lib/src/builders/dio_responses_builder.dart index e3988d2..4850d26 100644 --- a/lib/src/builders/dio_responses_builder.dart +++ b/lib/src/builders/dio_responses_builder.dart @@ -18,14 +18,14 @@ class DioResponseBuilder extends StatelessWidget { builder: (context) => DioResponseView(data: data), ), ), - title: Text(data.requestOptions.path), - subtitle: Text(date.toString()), + title: Text(data.requestOptions.path,style: TextStyle(fontSize: 16,color: Color(0xFF333333)),), + subtitle: Text(date.toString(),style: TextStyle(fontSize: 14,color: Color(0xFF666666)),), trailing: Row( mainAxisSize: MainAxisSize.min, children: [ Chip( backgroundColor: Colors.blue.withOpacity(0.8), - label: Text(data.requestOptions.method), + label: Text(data.requestOptions.method,style: TextStyle(fontSize: 14,color: Colors.black),), ), ], ), diff --git a/lib/src/builders/flutter_error_builder.dart b/lib/src/builders/flutter_error_builder.dart index fe77d00..ef89e3a 100644 --- a/lib/src/builders/flutter_error_builder.dart +++ b/lib/src/builders/flutter_error_builder.dart @@ -9,8 +9,8 @@ class FlutterErrorBuilder extends StatelessWidget { Widget build(BuildContext context) { return ListTile( tileColor: Colors.red.withOpacity(0.4), - title: Text(details.exception.toString()), - trailing: Chip(label: Text('EXCEPTION'), backgroundColor: Colors.red), + title: Text(details.exception.toString(),style: TextStyle(fontSize: 14,color: Colors.black),), + trailing: Chip(label: Text('EXCEPTION',style: TextStyle(fontSize: 14,color: Colors.black),), backgroundColor: Colors.red), onTap: () { Navigator.push( context, diff --git a/lib/src/parser/unfocus_parser.dart b/lib/src/parser/unfocus_parser.dart index 4e85a7a..62b5710 100644 --- a/lib/src/parser/unfocus_parser.dart +++ b/lib/src/parser/unfocus_parser.dart @@ -17,16 +17,16 @@ class UnfocusParser extends StatelessWidget { MaterialPageRoute( builder: (context) => Scaffold( appBar: AppBar(title: Text(data.runtimeType.toString())), - body: Text(data.toString()), + body: Text(data.toString(),style: TextStyle(fontSize: 16,color: Colors.black),), ), ), ), title: Text( data.toString(), - maxLines: 1, + maxLines: 1, style: TextStyle(fontSize: 16,color: Colors.black), ), trailing: Chip( - label: Text(tag ?? data.runtimeType.toString()), + label: Text(tag ?? data.runtimeType.toString(),style: TextStyle(fontSize: 16,color: Colors.black),), ), ), ); diff --git a/lib/src/views/info_view.dart b/lib/src/views/info_view.dart index ecf3a8a..b52528d 100644 --- a/lib/src/views/info_view.dart +++ b/lib/src/views/info_view.dart @@ -71,7 +71,7 @@ class _InfoViewState extends State SliverList( delegate: SliverChildListDelegate([ ListTile( - title: Text('Package Info'), + title: Text('Package Info',style: TextStyle(fontSize: 18,color: Color(0xff333333))), tileColor: Colors.blue.withOpacity(0.2), ), InfoTile(title: 'appName', subTitle: packageInfo!.appName), @@ -81,7 +81,7 @@ class _InfoViewState extends State title: 'packageName', subTitle: packageInfo!.packageName), InfoTile(title: 'version', subTitle: packageInfo!.version), ListTile( - title: Text('Device Info'), + title: Text('Device Info',style: TextStyle(fontSize: 18,color: Color(0xff333333))), tileColor: Colors.blue.withOpacity(0.1), ), ])), diff --git a/lib/src/views/platform_specific/info_tile.dart b/lib/src/views/platform_specific/info_tile.dart index c1d1251..03df336 100644 --- a/lib/src/views/platform_specific/info_tile.dart +++ b/lib/src/views/platform_specific/info_tile.dart @@ -15,8 +15,8 @@ class InfoTile extends StatelessWidget { @override Widget build(BuildContext context) { return ListTile( - title: Text(title), - subtitle: Text(subTitle), + title: Text(title,style: TextStyle(fontSize: 14,color: Color(0xff333333)),), + subtitle: Text(subTitle,style: TextStyle(fontSize: 14,color: Color(0xff666666))), onLongPress: () async { ScaffoldMessenger.of(context).hideCurrentSnackBar(); Clipboard.setData(ClipboardData(text: subTitle)); diff --git a/lib/src/views/settings_view.dart b/lib/src/views/settings_view.dart index 0e60455..eb0c58c 100644 --- a/lib/src/views/settings_view.dart +++ b/lib/src/views/settings_view.dart @@ -14,7 +14,7 @@ class _SettingsViewState extends State { return ListView( children: [ SwitchListTile( - title: Text('终端日志'), + title: Text('终端日志',style: TextStyle(fontSize: 16,color: Colors.black),), subtitle: Text(''), value: LoggerData.markLogger, onChanged: (state) { From deecd844f39dd9adf14d71957a58a88d9c4e2546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 15:38:28 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=95=E9=83=A8tab?= =?UTF-8?q?=E5=92=8C=E5=A4=B4=E9=83=A8=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/power_logger_view.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/src/power_logger_view.dart b/lib/src/power_logger_view.dart index 20c1540..5dbaf41 100644 --- a/lib/src/power_logger_view.dart +++ b/lib/src/power_logger_view.dart @@ -21,6 +21,7 @@ class _PowerLoggerViewState extends State { return Scaffold( appBar: AppBar( title: Text('Logger View'), + backgroundColor: Colors.blue, actions: [ IconButton( icon: Icon(Icons.clear_all_rounded), @@ -47,6 +48,7 @@ class _PowerLoggerViewState extends State { builder: (context, kSetState) { _setState = kSetState; return BottomNavigationBar( + backgroundColor: Colors.white, currentIndex: _currentIndex, onTap: (index) { _currentIndex = index; @@ -59,14 +61,14 @@ class _PowerLoggerViewState extends State { }, items: [ BottomNavigationBarItem( - icon: Icon(Icons.assessment), label: 'Log'), + icon: Icon(Icons.assessment,color: Color(0xFF666666),),activeIcon: Icon(Icons.assessment,color: Colors.blue,), label: '日志'), BottomNavigationBarItem( - icon: Icon(Icons.perm_device_information), - label: 'Info', + icon: Icon(Icons.perm_device_information,color: Color(0xFF666666),),activeIcon: Icon(Icons.perm_device_information,color: Colors.blue,), + label: '信息', ), BottomNavigationBarItem( - icon: Icon(Icons.settings), - label: 'Settings', + icon: Icon(Icons.settings,color: Color(0xFF666666),),activeIcon: Icon(Icons.settings,color: Colors.blue,), + label: '设置', ), ], ); From ee17631e4e2424c82586f09cac85822bb8db6ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 15:57:56 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=BA=95=E9=83=A8bottom=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/power_logger_view.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/power_logger_view.dart b/lib/src/power_logger_view.dart index 5dbaf41..fb06abb 100644 --- a/lib/src/power_logger_view.dart +++ b/lib/src/power_logger_view.dart @@ -50,6 +50,8 @@ class _PowerLoggerViewState extends State { return BottomNavigationBar( backgroundColor: Colors.white, currentIndex: _currentIndex, + selectedLabelStyle: TextStyle(color: Colors.blue,fontSize: 14), + unselectedLabelStyle: TextStyle(color: Color(0xFF666666),fontSize: 12), onTap: (index) { _currentIndex = index; kSetState(() {}); From b19bf1eda4e038cd07fdac937882a42e6d08d8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 16:12:41 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=BA=95=E9=83=A8=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/power_logger_view.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/power_logger_view.dart b/lib/src/power_logger_view.dart index fb06abb..bfb1575 100644 --- a/lib/src/power_logger_view.dart +++ b/lib/src/power_logger_view.dart @@ -50,8 +50,10 @@ class _PowerLoggerViewState extends State { return BottomNavigationBar( backgroundColor: Colors.white, currentIndex: _currentIndex, - selectedLabelStyle: TextStyle(color: Colors.blue,fontSize: 14), - unselectedLabelStyle: TextStyle(color: Color(0xFF666666),fontSize: 12), + selectedLabelStyle: TextStyle(fontSize: 14), + selectedItemColor: Colors.blue, + unselectedItemColor: Color(0xFF666666), + unselectedLabelStyle: TextStyle(fontSize: 12), onTap: (index) { _currentIndex = index; kSetState(() {}); From ebd663f782cfc10499186234659cc0088cd1e60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=96=87=E8=BD=A9?= <12812285557@qq.com> Date: Tue, 7 Sep 2021 16:17:27 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=BC=80=E5=85=B3=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/views/settings_view.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/views/settings_view.dart b/lib/src/views/settings_view.dart index eb0c58c..9936706 100644 --- a/lib/src/views/settings_view.dart +++ b/lib/src/views/settings_view.dart @@ -14,6 +14,8 @@ class _SettingsViewState extends State { return ListView( children: [ SwitchListTile( + inactiveThumbColor: Colors.white, + inactiveTrackColor: Color(0xFF999999), title: Text('终端日志',style: TextStyle(fontSize: 16,color: Colors.black),), subtitle: Text(''), value: LoggerData.markLogger,