blockbasti / just_another_workout_timer

A simple timer for your workouts, built with Flutter!
MIT License
132 stars 23 forks source link

Some refactorings, migrations and fixes #190

Open mschmidm opened 7 months ago

mschmidm commented 7 months ago

Hi, I did some refactoring, migrating, and fixing. I know it is a lot, but all changes are relatively simple and mostly copy and paste. I did multiple commits to make all changes clear but if you want, I can squash them together.

  1. I refactored the extracted-to-method widgets of WorkoutBuilder, WorkoutRunner, and HomePage into actual widgets and moved them into separate files. This is most of the code changes and largely copy and paste. Those changes improve the app's performance by eliminating unnecessary widget rebuilds.
  2. I migrated from deprecated WillPopScope to PopScope in WorkoutBuilder and WorkoutRunner
  3. I migrated from the imperative (deprecated) to declarative Gradle plugin application according to the flutter guide
  4. I fixed a small bug causing the "overwrite existing workout" dialog to not be shown (it was immediately closed). The bug only occurred to me in my development setup but also before my changes. I don't see the bug in the distributed version of JAWT. This may be due to changes in some dependencies, but from the code, I don't understand why the bug was not there before.

Let me know if you have any questions! Thank you for the nice app and thanks in advance for having a look over it! :)