fix subTitle empty issue,添加设置页面

master
小赖 4 years ago
parent bb6f792bc0
commit 0cb4f256d7

@ -74,7 +74,7 @@ class _InfoViewState extends State<InfoView>
children: [ children: [
Text(title), Text(title),
Text( Text(
subTitle, subTitle ?? '',
style: TextStyle(fontSize: 22), style: TextStyle(fontSize: 22),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -89,7 +89,7 @@ class _InfoViewState extends State<InfoView>
_buildTile(String title, String subTitle) { _buildTile(String title, String subTitle) {
return ListTile( return ListTile(
title: Text(title), title: Text(title),
subtitle: Text(subTitle), subtitle: Text(subTitle ?? ''),
onLongPress: () { onLongPress: () {
Clipboard.setData(ClipboardData(text: subTitle)); Clipboard.setData(ClipboardData(text: subTitle));
Scaffold.of(context).showSnackBar(SnackBar(content: Text('已复制'))); Scaffold.of(context).showSnackBar(SnackBar(content: Text('已复制')));

@ -10,6 +10,15 @@ class SettingsView extends StatefulWidget {
class _SettingsViewState extends State<SettingsView> { class _SettingsViewState extends State<SettingsView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView(); return ListView(
children: [
SwitchListTile(
title: Text('终端日志'),
subtitle: Text(''),
value: false,
onChanged: (state) {},
),
],
);
} }
} }

Loading…
Cancel
Save