From e11550a706b85835b1dc4800bd3e5c044207982f Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Feb 2021 09:12:02 +0800 Subject: [PATCH] fix nav bar background color tile color --- lib/src/power_logger_view.dart | 1 + lib/src/views/info_view.dart | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/src/power_logger_view.dart b/lib/src/power_logger_view.dart index 87e57f7..dd1207f 100644 --- a/lib/src/power_logger_view.dart +++ b/lib/src/power_logger_view.dart @@ -48,6 +48,7 @@ class _PowerLoggerViewState extends State { _setState = kSetState; return BottomNavigationBar( currentIndex: _currentIndex, + backgroundColor: Colors.white, onTap: (index) { _currentIndex = index; kSetState(() {}); diff --git a/lib/src/views/info_view.dart b/lib/src/views/info_view.dart index 87fdc42..5a464f7 100644 --- a/lib/src/views/info_view.dart +++ b/lib/src/views/info_view.dart @@ -87,13 +87,16 @@ class _InfoViewState extends State } _buildTile(String title, String subTitle) { - return ListTile( - title: Text(title), - subtitle: Text(subTitle ?? ''), - onLongPress: () { - Clipboard.setData(ClipboardData(text: subTitle)); - Scaffold.of(context).showSnackBar(SnackBar(content: Text('已复制'))); - }, + return DefaultTextStyle( + style: TextStyle(color: Colors.black), + child: ListTile( + title: Text(title), + subtitle: Text(subTitle ?? ''), + onLongPress: () { + Clipboard.setData(ClipboardData(text: subTitle)); + Scaffold.of(context).showSnackBar(SnackBar(content: Text('已复制'))); + }, + ), ); } @@ -128,7 +131,7 @@ class _InfoViewState extends State _buildTile('securityPatch', androidInfo.version.securityPatch), _buildTile('previewSdkInt', androidInfo.version.previewSdkInt.toString()), _buildTile('sdkInt', androidInfo.version.sdkInt.toString()), - _buildTile('systemFeatures', androidInfo.systemFeatures.join(',')), + _buildTile('systemFeatures', androidInfo.systemFeatures.join('\n')), ])); }