setDisplayPageIndex method

Future<void> setDisplayPageIndex(
  1. int pageIndex, {
  2. bool animated = true,
})

Jump to the index page.

pageIndex The index of the page to jump. animated only for iOS, whether to use animation when jumping.

example:

_controller.setDisplayPageIndex(1, animated: true);

Implementation

Future<void> setDisplayPageIndex(int pageIndex,
    {bool animated = true}) async {
  await _channel.invokeMethod('set_display_page_index',
      {'pageIndex': pageIndex, 'animated': animated});
}