Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A basic auth using Flutter with Stacked state management and Appwrite.io as BackOffice

License

Notifications You must be signed in to change notification settings

BLKKKBVSIK/moody_diary

Repository files navigation

Summary

MoodyDiary

The project is made with Flutter a Google UI framework created in 2017. It uses the Google back-end language Dart created in 2011, Dart

The application is based on a MVVM architecture using Stacked by FilledStacks as a state management. The usage of Stacked is for maintainability and readability. Stacked uses implicitly the Provider package.

Current architecture

As previously said, MoodyDiary is relying on the Stacked package. The main idea is to use an MVVM pattern to remove any business logic from the UI layouts by putting this logic in a separated view model. This adds more clarity and maintainability.

We can decompose the project into 4 layers: the Models, The Views, and finally the ViewModels.

In the project, the views are for display only.
They can trigger interactions through Buttons/GestureDetector/Events that will call ViewModel methods.

The ViewModel class can extend different types of abstract ViewModels such as:

The ViewModel data-bind all the data from the services and models and create getters for the view and notify the view of any changes (using a ReactiveServiceMixin or a NotifyListeners)

Initialisation Requirement

  1. Install the Flutter SDK following the official documentation Then use the flutter doctor to verify your install
  2. Clone the project.
  3. Run the flutter pub get command to fetch the dependencies needed to build the project.
  4. Use the flutter pub run build_runner build --delete-conflicting-outputs to generate the GetIt config.
  5. Create a .env file containing the APPWRITE_ENDPOINT & APPWRITE_PROJECT_ID env variable.
  6. Finally, use the flutter run command to launch your app on your device.

Troubleshooting

  • (In case of later use of Firebase solution =>) using a M1/M1Pro/M1Max Apple Silicon chip, you may face a compiling error about the Class AMSupportURLConnectionDelegate or AMSupportURLSession Class being implemented twice:
    => Be sure you have the good apple profile in your XCode Proj.
    => Be sure that you are opening terminal using Rosetta and not with ARM/Native
    => Run this command: flutter clean && rm ios/Podfile ios/Podfile.lock pubspec.lock && rm -rf ios/Pods ios/Runner.xcworkspace && flutter run

About

A basic auth using Flutter with Stacked state management and Appwrite.io as BackOffice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published