Ben Tucker fe33f693a8 fix(core): make UI side effects and provider reads safe during build
Errors handled while the widget tree is building crashed or wedged the
app in three related ways:

- FlutterError.onError showed dialogs and snackbars synchronously.
  Pushing a route mid-build trips the navigator's !_debugLocked
  assertion, and because the one-dialog guard was set before showDialog
  threw, its release never attached: every later error dialog was then
  silently suppressed while nothing was on screen, leaving a blank,
  unresponsive app until restart. Snackbars crashed outright via the
  messenger's setState.
- The sync status and barcode dialogs did ref.read inside their route
  builders, which run during build. With the provider chain dirty (any
  token refresh dirties wgerBase -> auth), the read flushed it there and
  Riverpod scheduled a scope refresh mid-build. The barcode builder also
  created its search future inline, re-firing the search on every dialog
  rebuild.
- Provider create bodies that widgets watch during build read providers
  synchronously: the dashboard's routine hydration chain crashed on cold
  start right after a token refresh, and TrophyStateNotifier.build()
  has the same shape in the post-login window, where invalidation order
  left networkStatusProvider dirty while its dependents rebuilt.

lib/core/build_safety.dart adds the two idioms as helpers: runAfterFrame
defers UI side effects past the build phase, yieldPastBuild yields
provider create bodies past their synchronous phase (a microtask, not a
timer, since widget tests assert !timersPending at teardown). The error
dialog guard is released when the context is gone or the push fails, the
snackbar helpers re-resolve the messenger inside the callback, the
dialog builders snapshot their providers in the tap handler, and
post-login invalidation runs leaf-first. Regression tests cover each
shape.
2026-08-16 17:29:43 -05:00
2026-08-10 13:50:26 +02:00
2025-05-23 18:44:29 +02:00
2023-11-06 01:36:59 +01:00
2026-08-11 21:03:10 +02:00
2026-08-11 19:20:57 +00:00
2026-05-07 19:57:35 +02:00
2026-06-15 21:07:02 +02:00
2026-06-18 11:47:15 +02:00
2026-03-29 20:46:43 +02:00
2024-12-12 20:49:24 +01:00
2026-06-17 09:27:12 +02:00
2022-01-16 20:47:28 +01:00
2022-01-16 20:47:28 +01:00
2025-01-22 21:42:16 +01:00
2026-08-11 20:55:51 +02:00
2021-03-11 21:56:38 +01:00
2026-08-10 13:43:22 +02:00
2026-08-11 19:20:57 +00:00
2026-07-24 14:01:34 +02:00

Mobile app for wger

wger is a free, open-source flutter application that manages and tracks/logs your exercises and personal workouts, weight, and diet plans. This is the mobile app written with Flutter, it talks via REST with the main server.

If you want to contribute, hop on the Discord server and say hi!

Installation

Get it on Google Play Get it on F-Droid Download on the App Store Get it on Flathub

Developing and contributing

Our goal is to build an awesome and flexible fitness and nutrition manager, along with a comprehensive list of exercises and ingredients, all released under a free license.

For this, we’d love your help! Whether it’s code, translations, exercises or reporting issues and ideas, check out our contribution guide to get started.

A huge thank you to everyone who has contributed so far! ❤️ See the full list in AUTHORS.md.

TLDR

flutter run

This is a regular flutter application, so there's no magic. You will need a backend for this, so feel free to use the test server for this (the db is reset daily):

  • URL: https://dev.wger.de
  • username: user
  • password: flutteruser

Translation

Translate the app to your language on Weblate.

translation status

Contact

Feel free to get in touch if you found this useful or if something didn't behave as expected. We can't fix what we don't know about, so please report liberally. If you're not sure if something is a bug or not, feel free to file a bug anyway.

License

The application is licensed under the GNU Affero General Public License 3 or later (AGPL 3+) with an app store exception.

As additional permission under section 7, you are allowed to distribute the software through an app store, even if that store has restrictive terms and conditions that are incompatible with the AGPL, provided that the source is also available under the AGPL with or without this permission through a channel without those restrictive terms and conditions.

The initial exercise and ingredient data is licensed additionally under one of the Creative Commons licenses, see the individual exercises for more details.

Description
No description provided
Readme AGPL-3.0 435 MiB
Languages
Dart 98.6%
C++ 0.6%
CMake 0.4%
Swift 0.1%
Python 0.1%