Shorten note preview text
This commit is contained in:
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user