EXERLOG / exer_log

exer_log - authored by @KalleHallden

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General improvements

jorre127 opened this issue · comments

Just some general improvements that I thing would future proof the app.

  • Add a central file with all the colours/textStyles, this has already been added in the form of the global.dart file, but a ton of places still don't use this file and redefine the color again and again. This could be problematic when adding extra themes/dark mode for example.
  • Use named routes. Storing the names of each route into a file and using these names navigate would give us a clear overview of all the paths and navigation options the app currently has, instead of them being scattered throughout the app as they are now.
  • Start separating the logic from the ui. Right now the login and ui are all implemented in the same file, but we could implement the MVVM model for example to seperate these 2 for cleaner code. If this is too much work a good start already would be to add all the functions of a widget at the bottom of the widget and then just calling them inside the widget when needed. This also gives us a clear overview of all the functionality that a widget has.
  • Currently all the text in the app is hardcoded, but this would be problematic when trying to translate the app into different languages (I don't know if this is planned), so I would recommend using keys instead of hardcoded string and then using these keys to get the translation of the current locale. An example package of this is https://pub.dev/packages/locale_gen.

I took a quick look at the project and couldn't help but notice that he doesn't seem to make full use of the Cubit/Bloc functionality.

A lot of the conditionals could be abstracted upon and a lot of the app flow can be reinvented to make use of, for example, state classes and bloc events. Mainly to circumvent any annoying bugs that are hard to pinpoint.
Currently, a lot of the code can be improved upon in order to conform to typical mobile app development practices and architecture, as you have already elaborated on.

Yeah this is a great idea and where my lack of knowledge in terms of software architecture comes into play. I have just done a haphazard job where I've sometimes followed some structure and then forgotten about that and done something different. So this is probably a big job but it definitely needs to be done.

Why is this issue is still open? Since it was merged, the issue should automatically close, shouldn't it?

Why is this issue is still open? Since it was merged, the issue should automatically close, shouldn't it?

@MhouneyLH I think only @jorre127 can confirm if all are done here

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.