-
Notifications
You must be signed in to change notification settings - Fork 34
Technical task
Andrzej Chmielewski edited this page Oct 14, 2022
·
12 revisions
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
- please fork this repo to your own space and complete the task there on a separate, feature branch.
- 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)
- familiarize yourself with
README.mdfile and the architecture description briefly - inside
AppInitPresenteropen the login page usingAppInitNavigatorafterappInitUseCasefinishes successfully - enable login button when both fields are filled (use LoginViewModel and LoginPresentationModel to hold a bool
isLoginEnabledand reference this in view) - implement presentation model to disable login button if no text is provided in either username or password field
- 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)
- while login use case is working, show
CircularProgressIndicatorin place of login button. (see AppInitPage for reference) - if the user logged in successfully, show success dialog using
AlertDialogRoute - if login fails, show error dialog using
ErrorDialogRoute