mod: 页面样式调整&组件拆分
This commit is contained in:
30
lib/pages/dynamics/widgets/content_panel.dart
Normal file
30
lib/pages/dynamics/widgets/content_panel.dart
Normal file
@ -0,0 +1,30 @@
|
||||
// 内容
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'rich_node_panel.dart';
|
||||
|
||||
Widget content(item, context) {
|
||||
TextStyle authorStyle =
|
||||
TextStyle(color: Theme.of(context).colorScheme.primary);
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.fromLTRB(12, 0, 12, 6),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (item.modules.moduleDynamic.topic != null) ...[
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'#${item.modules.moduleDynamic.topic.name}',
|
||||
style: authorStyle,
|
||||
),
|
||||
),
|
||||
],
|
||||
Text.rich(
|
||||
richNode(item, context),
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
Reference in New Issue
Block a user