Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SampleCardList extends StatelessWidget {
- final items = 20;
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Column(
- children: [
- Expanded(
- flex: 2,
- child: Container(
- color: Colors.red,
- ),
- ),
- Expanded(
- flex: 3,
- child: Container(
- color: Colors.black,
- child: Container(
- margin: EdgeInsets.only(left: 20, right: 20, ),
- child: ListView.builder(
- padding: EdgeInsets.zero,
- itemCount: items,
- itemBuilder: (_, index) {
- return Container(
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: index != items - 1
- ? BorderRadius.zero
- : BorderRadius.only(
- bottomLeft: Radius.circular(15),
- bottomRight: Radius.circular(15),
- )),
- child: ListTile(
- title: Text("Item : $index"),
- ),
- );
- },
- ),
- )),
- ),
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement