mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
Calling _loadFullPlan() directly inside build() caused a new Future to be created on every rebuild (e.g. when opening the PopupMenuButton), which reset the FutureBuilder to ConnectionState.waiting and showed the loading spinner unnecessarily. Fix: convert to StatefulWidget and initialize the Future once in didChangeDependencies(), per Flutter's official FutureBuilder docs. Ref: https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html Took 45 minutes