From 82aeb01ba9934bd0ea40ab17c59f8ff41cf80a36 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 31 Jan 2020 23:07:17 +0100 Subject: [PATCH] JournalList: Replace ListView.seperated with ListView.builder I wanted to stop using .seperated as it shows some ugly artifacts when used with IconDismissable when removing an item, and it makes it more difficult to replace it with an AnimatedListView --- lib/widgets/journal_list.dart | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/widgets/journal_list.dart b/lib/widgets/journal_list.dart index 6f7f4fbc..64dc250a 100644 --- a/lib/widgets/journal_list.dart +++ b/lib/widgets/journal_list.dart @@ -36,10 +36,7 @@ class JournalList extends StatelessWidget { ); } - return ListView.separated( - separatorBuilder: (context, index) { - return const Divider(); - }, + return ListView.builder( itemBuilder: (context, i) { if (i >= notes.length) { return null; @@ -123,9 +120,21 @@ class JournalList extends StatelessWidget { onTap: () => noteSelectedFunction(noteIndex), ); - return Padding( - padding: const EdgeInsets.only(top: 8.0, bottom: 8.0), - child: tile, + var dc = Theme.of(context).dividerColor; + var divider = Container( + height: 1.0, + child: Divider(color: dc.withOpacity(dc.opacity / 3)), + ); + + return Column( + children: [ + divider, + Padding( + padding: const EdgeInsets.only(top: 16.0, bottom: 16.0), + child: tile, + ), + divider, + ], ); }