Closed petteremil closed 2 years ago
Hi @petteremil, thanks for the question. As with standard PageView, you can set an initial index by creating a PageController and passing it to ExpandablePageView. Here is a small code example:
class _ExampleWidgetState extends State<ExampleWidget> {
late PageController _pageController;
@override
void initState() {
super.initState();
_pageController = PageController(initialPage: 3);
}
@override
Widget build(BuildContext context) {
return ExpandablePageView.builder(
itemCount: 5,
itemBuilder: (_, __) => const SizedBox(),
controller: _pageController,
);
}
}
I hope it helps. If you have any more question, please let me know. I'm going to close this ticket for now.
Hello! I was wondering if there is a way to set the starting index for the ExpandablePageView.builder; I couldn't see a way, but thought I'd check with you whether I was missing something?