akshathjain / sliding_up_panel

A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!
https://pub.dartlang.org/packages/sliding_up_panel
Other
1.36k stars 378 forks source link

Hot reload causes controller attached = false #234

Closed astronaako closed 3 months ago

astronaako commented 3 years ago

When using controller with SlidingUpPanel in StatelessWidget Page, Hot reload causes isAttached Property to return false. Full app restart or Flutter Hot Restart gets it back to working however

willbryant commented 3 years ago

Make sure you're initializing the controller outside of the widget build so that it persists. Paste your code if you're still having trouble.

fxjordan commented 3 years ago

I had the same problem. Build a StatefulWidget wrapper around yourSlidingUpPanel and declare the controller as state.