flutter_page_slider icon indicating copy to clipboard operation
flutter_page_slider copied to clipboard

The getter 'currentPage' was called on null

Open ainulya16 opened this issue 5 years ago • 1 comments

ainulya16 avatar Dec 21 '19 07:12 ainulya16

when first time widget rendered the slider key states not yet set, so the currentState in sliderKey.currentState.currentPage is null. here's my solution: sliderKey.currentState != null ? sliderKey.currentState.currentPage : 0

correct me if I wrong 🙏

rizaldyaf avatar Feb 17 '20 07:02 rizaldyaf