Skip to content

Technical task

Andrzej Chmielewski edited this page Aug 4, 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 to do the following:

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. add very basic UI for login page consisting of username and password textfields as well as login button. (visuals are not important!)
  4. implement presentation model to disable login button if no text is provided in either username or password field
  5. enable login button when both fields are filled (use LoginViewModel and LoginPresentationModel to hold a bool isLoginEnabled and reference this in view)
  6. call login use case to perform login operation upon clicking login button (see AppInitPresenter for reference)
  7. while login use case is working, show CircularProgressIndicator in place of login button. (see AppInitPage for reference)
  8. if the user logged in successfully, show success dialog using AlertDialogRoute
  9. if login fails, show error dialog using ErrorDialogRoute

🔴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)

Clone this wiki locally