diff --git a/lib/src/views/info_view.dart b/lib/src/views/info_view.dart index 4fb33be..87fdc42 100644 --- a/lib/src/views/info_view.dart +++ b/lib/src/views/info_view.dart @@ -74,7 +74,7 @@ class _InfoViewState extends State children: [ Text(title), Text( - subTitle, + subTitle ?? '', style: TextStyle(fontSize: 22), maxLines: 2, overflow: TextOverflow.ellipsis, @@ -89,7 +89,7 @@ class _InfoViewState extends State _buildTile(String title, String subTitle) { return ListTile( title: Text(title), - subtitle: Text(subTitle), + subtitle: Text(subTitle ?? ''), onLongPress: () { Clipboard.setData(ClipboardData(text: subTitle)); Scaffold.of(context).showSnackBar(SnackBar(content: Text('已复制'))); diff --git a/lib/src/views/settings_view.dart b/lib/src/views/settings_view.dart index c04b3e6..00dbff0 100644 --- a/lib/src/views/settings_view.dart +++ b/lib/src/views/settings_view.dart @@ -10,6 +10,15 @@ class SettingsView extends StatefulWidget { class _SettingsViewState extends State { @override Widget build(BuildContext context) { - return ListView(); + return ListView( + children: [ + SwitchListTile( + title: Text('终端日志'), + subtitle: Text(''), + value: false, + onChanged: (state) {}, + ), + ], + ); } }