Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. class SampleCardList extends StatelessWidget {
  2. final items = 20;
  3.  
  4. @override
  5. Widget build(BuildContext context) {
  6. return Scaffold(
  7. body: Column(
  8. children: [
  9. Expanded(
  10. flex: 2,
  11. child: Container(
  12. color: Colors.red,
  13. ),
  14. ),
  15. Expanded(
  16. flex: 3,
  17. child: Container(
  18. color: Colors.black,
  19. child: Container(
  20. margin: EdgeInsets.only(left: 20, right: 20, ),
  21. child: ListView.builder(
  22. padding: EdgeInsets.zero,
  23. itemCount: items,
  24. itemBuilder: (_, index) {
  25. return Container(
  26. decoration: BoxDecoration(
  27. color: Colors.white,
  28. borderRadius: index != items - 1
  29. ? BorderRadius.zero
  30. : BorderRadius.only(
  31. bottomLeft: Radius.circular(15),
  32. bottomRight: Radius.circular(15),
  33. )),
  34. child: ListTile(
  35. title: Text("Item : $index"),
  36. ),
  37. );
  38. },
  39. ),
  40. )),
  41. ),
  42. ],
  43. ),
  44. );
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement