mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-14 15:33:17 +08:00
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
This commit is contained in:
@ -36,10 +36,7 @@ class JournalList extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListView.separated(
|
return ListView.builder(
|
||||||
separatorBuilder: (context, index) {
|
|
||||||
return const Divider();
|
|
||||||
},
|
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
if (i >= notes.length) {
|
if (i >= notes.length) {
|
||||||
return null;
|
return null;
|
||||||
@ -123,9 +120,21 @@ class JournalList extends StatelessWidget {
|
|||||||
onTap: () => noteSelectedFunction(noteIndex),
|
onTap: () => noteSelectedFunction(noteIndex),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Padding(
|
var dc = Theme.of(context).dividerColor;
|
||||||
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
|
var divider = Container(
|
||||||
|
height: 1.0,
|
||||||
|
child: Divider(color: dc.withOpacity(dc.opacity / 3)),
|
||||||
|
);
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: <Widget>[
|
||||||
|
divider,
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 16.0, bottom: 16.0),
|
||||||
child: tile,
|
child: tile,
|
||||||
|
),
|
||||||
|
divider,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user