mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
CardView: Show the title
This commit is contained in:
@ -57,12 +57,26 @@ class CardView extends StatelessWidget {
|
|||||||
var textTheme = Theme.of(context).textTheme;
|
var textTheme = Theme.of(context).textTheme;
|
||||||
var tileContent = Padding(
|
var tileContent = Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
if (note.title != null && note.title.isNotEmpty)
|
||||||
|
Text(
|
||||||
|
note.title,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: textTheme.title,
|
||||||
|
),
|
||||||
|
if (note.title != null && note.title.isNotEmpty)
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text(
|
||||||
body,
|
body,
|
||||||
maxLines: 30,
|
maxLines: 30,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: textTheme.body1,
|
style: textTheme.body1,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const borderRadius = BorderRadius.all(Radius.circular(8));
|
const borderRadius = BorderRadius.all(Radius.circular(8));
|
||||||
|
Reference in New Issue
Block a user