A Deep Dive Into PageView In Flutter
final PageController _controller = PageController(initialPage: 0);
PageView(
scrollDirection: Axis.horizontal,
controller: _controller,
children: const <Widget>[
Center(
child: Text('First Page'),
),
Center(
child: Text('Second Page'),
),
Center(
child: Text('Third Page'),
)
],
),