From 821b95e442d2e94a7546ab1824c23741aeb56d8a Mon Sep 17 00:00:00 2001 From: Daniel Borges Date: Tue, 6 Aug 2019 10:29:41 -0300 Subject: [PATCH] service listview v2 finished --- lib/src/widgets/service_listview_v2.dart | 33 +++++++++++------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/src/widgets/service_listview_v2.dart b/lib/src/widgets/service_listview_v2.dart index c12a628..80d992a 100644 --- a/lib/src/widgets/service_listview_v2.dart +++ b/lib/src/widgets/service_listview_v2.dart @@ -49,34 +49,31 @@ class _ServiceListViewV2State extends State { ), ); } - return ListView.separated( + return ListView.builder( padding: EdgeInsets.only(bottom: 35), - separatorBuilder: (context, i) { - return Divider(); - }, itemCount: serviceItems.length, itemBuilder: (context, i) { ServiceItem item = serviceItems[i]; return ListTile( contentPadding: EdgeInsets.all(10), selected: item.selected, - leading: Container( - // color: Colors.black12, - height: 50, - width: 50, - child: item.plugin.id == 'images' - ? FittedBox( - child: Image.network('https://picsum.photos/500'), - fit: BoxFit.cover, - ) - : Icon(item.plugin.icon()), + leading: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(7)), + child: Container( + height: 50, + width: 50, + child: item.plugin.id == 'images' + ? FittedBox( + child: Image.network('https://picsum.photos/500'), + fit: BoxFit.cover, + ) + : Icon(item.plugin.icon()), + ), ), title: Text(item.title), + subtitle: Text(item.plugin.id), trailing: IconButton( - icon: Icon( - Icons.delete, - // color: Colors.red, - ), + icon: Icon(Icons.delete), onPressed: () {}, ), onTap: () {},