Skip to content

Recommendations Part 2

Alexandre Quessy edited this page Jan 18, 2022 · 4 revisions

Recommendations - part 2

(Bug) If we cancel the login, we end up in an undefined state

If I cancel the google sign in:

MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lDY2traUg4aTJaQVJ3T3MxTEV6RktsZDE1YU9HOG96S28=) is already scheduled. Returning...
[  +22 ms] I/flutter (28268): NoSuchMethodError: The method 'isSignedIn' was called on null.
[        ] I/flutter (28268): Receiver: null
[        ] I/flutter (28268): Tried calling: isSignedIn()

we end up in an undefined state.

(cleanup) Remove web, windows, linux, etc.

Remove dependencies:

  • shared_preferences_linux 2.0.0 (2.0.4 available)
  • shared_preferences_macos 2.0.0 (2.0.2 available)
  • shared_preferences_web 2.0.0 (2.0.3 available)
  • shared_preferences_windows 2.0.0 (2.0.4 available) if you don't use them.

Like this:

flutter config --no-enable-web
flutter config --no-enable-linux-desktop
flutter config --no-enable-macos-desktop
flutter config --no-enable-windows-desktop
flutter config --no-enable-windows-uwp-desktop

Remove the web folder

Remove folders:

  • web

If you don't use it.

(bug) Add cached_network_image as a dependency

flutter pub add cached_network_image

cached_network_image: ^3.2.0

(UX) To change the date, we should be able to click on the actual date

When changing a date, I tried to click on the actual date. It would be best if this would work.

(improvement) Support multiple languages

It would be great to internationalize the app, so that we can use it in Spanish, French, etc.

(UX) Avoid to show a second trip creation dialog in a row

After creating a trip, there is another create dialog. Let's not.

(UX) Change the trip icon to a "list" icon

Change the trips icon from contacts to "list"

(git) Use Git submodules for the "path" packages

Consider using git submodules for the following packages:

  • packages/
    • flappy_search_bar
    • flutter_link_preview
    • gfsearchbar

That's relevant if you use them in some other projects, or if the upstream provides a git repository and no package on pub.dev.

(cleanup) Move the images at the root to a doc/ folder

Move the following images to a doc folder:

  • IMG_*.PNG

(UI) Consider a sans-serif font

Usually, apps look more modern with a sans-serif font rather than a serif font.

Maybe Cantata One could still be used for titles, but not for paragraphs?

To use Python, do that in a separate service

You've mentioned you might want to call the splitwise API with Python.

To do that, you could deploy a FastAPI service with GCP. https://cloud.google.com/run/docs/quickstarts/build-and-deploy/python

Cloud Functions are event cheaper to run: https://cloud.google.com/functions/docs/quickstart-python

Improve the way we use the BLoC pattern

  • It looks like the amount of blocs is right for an application this size.
  • Document each bloc. (what part of the application is this for? What are its events and states?)
  • Create a base class for all our events
abstract class BaseEvent extends Equatable {
  const BaseEvent();

  @override
  List<Object> get props => [];
}

Use some type for constants

In services/constants/constants.dart make sure that every variable has an explicit type.

Link every commit to a Github user

Make sure that every commit is linked to an email that is associated to a github user.