Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created December 1, 2022 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/bd33549c73908c9a38231b90861cd32c to your computer and use it in GitHub Desktop.
Save vijayinyoutube/bd33549c73908c9a38231b90861cd32c to your computer and use it in GitHub Desktop.
class SliverListBldr extends StatelessWidget {
const SliverListBldr({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return Padding(
padding: EdgeInsets.only(left: kSpacing, bottom: 20, right: 10),
child: Container(
decoration: BoxDecoration(
borderRadius: kBorderRadius,
color: secondaryColor.withOpacity(0.3),
),
height: 200,
width: MediaQuery.of(context).size.width,
),
);
},
childCount: 20,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment