Skip to content

Technical task

Andrzej Chmielewski edited this page Oct 14, 2022 · 12 revisions

Short description

This repository holds a minimal example of the flutter app using model-view-presenter and clean-architecture principles. The app is divided by features, currently there are two:

  • app_init - used on app start to display splash and initialize app's state
  • auth - showing auth-related screens like login

The auth feature contains a login_page inside of it that is currently not being shown anywhere and is just a vanilla page/model/presenter structure without any implementation. Your job is described in the Task paragraph below

🔴NOTE: Make sure to install fvm and run fvm install to use the proper flutter version for this project! After everything is done make sure to run the make check command and commit any formatting or test image changes it adds

Criteria

  1. please fork this repo to your own space and complete the task there on a separate, feature branch.
  2. when done, issue a pull request to your own repo and send the link to the pull request in your own repo. NOTE: do not open pull request to the upstream repository (andrzejchm/flutter-app-showcase)

Task

  1. familiarize yourself with README.md file and the architecture description briefly
  2. inside AppInitPresenter open the login page using AppInitNavigator after appInitUseCase finishes successfully
  3. enable login button when both fields are filled (use LoginViewModel and LoginPresentationModel to hold a bool isLoginEnabled and reference this in view)
  4. implement presentation model to disable login button if no text is provided in either username or password field
  5. call login use case to perform login operation upon clicking login button (LoginUseCase is already created for you, you just need to inject it into presenter and use it, see AppInitPresenter for reference)
  6. while login use case is working, show CircularProgressIndicator in place of login button. (see AppInitPage for reference)
  7. if the user logged in successfully, show success dialog using AlertDialogRoute
  8. if login fails, show error dialog using ErrorDialogRoute
Clone this wiki locally