To disable swiping by Gesture, add following property to your PageView:

PageView(physics:new NeverScrollableScrollPhysics())

To navigate to next page/widget in PageView, add following code to your button’s onPressed attribute:

duration: Duration(milliseconds: 1000),
curve: Curves.easeIn

Hope it helps. ;)



Error: module ‘path_provider’ not found (solved)

Guide to Fix Error:

  1. Update CocoaPod if it is not updated (if not installed, run command: sudo gem install cocoapods)
  2. Make flutter channel to master (cmd: flutter channel master)
  3. Upgrade flutter (cmd: flutter upgrade)
  4. Switch to flutter project directory (cmd: cd <project-folder>)
  5. Clean flutter project (cmd: flutter clean) then get dependencies (cmd: flutter pub get)
  6. Change to ios folder in project directory (cmd: cd ios)
  7. Deintegrate pod (cmd: pod deintegrate)
  8. Install pod (cmd: pod install)

That’s all. Hope it helps.

PS: If the above method doesn’t work, just create a new flutter project and copy your “lib”, “assets” and “pubspec.yaml” folders/files to your new project and run it.