I need flutter snap effect. How to create?
2
Try PageView.builder
PageView.builder( itemCount: 10, itemBuilder: (context, i) { return Column( children: [ Card( backgroundColor: Colors.yellow ), SizedBox(height: 10), Card( backgroundColor: Colors.yellow ), ], ); } )
Try GridView with scrollDirection: Axis.horizontal to get a grid with horizontal scroll just like you need. Refer to the below example.
GridView
scrollDirection: Axis.horizontal
GridView.count( scrollDirection: Axis.horizontal, padding: const EdgeInsets.all(15), crossAxisCount: 5, crossAxisSpacing: 6, children: List.generate( 30, (index) => Text('I am text$index'), ), )
Hope it helps you.
Click here to cancel reply.
2
Answers
Try PageView.builder
Try
GridView
withscrollDirection: Axis.horizontal
to get a grid with horizontal scroll just like you need.Refer to the below example.
Hope it helps you.