Shorten note preview text
This commit is contained in:
parent
9b75d200fd
commit
543b302b54
1 changed files with 5 additions and 1 deletions
|
|
@ -204,6 +204,10 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||||
},
|
},
|
||||||
itemCount: widget.notes.length,
|
itemCount: widget.notes.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
String notePreview = widget.notes[index].note_text;
|
||||||
|
if (notePreview.length > 30) {
|
||||||
|
notePreview = "${notePreview.substring(0, 30)} ...";
|
||||||
|
}
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.notes[index].note_name,
|
widget.notes[index].note_name,
|
||||||
|
|
@ -213,7 +217,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
"${widget.notes[index].insert_date}:\n${widget.notes[index].note_text}",
|
"${widget.notes[index].insert_date}:\n$notePreview",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue