From a84633d2c219399a1cddfd2f956a55cdc4f81da4 Mon Sep 17 00:00:00 2001 From: nicolantean <49296136+nicolantean@users.noreply.github.com> Date: Mon, 23 Oct 2023 19:37:18 -0300 Subject: [PATCH] feat: app readme (#25) --- mobile/README.md | 64 ++++++------------------------------------------ 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/mobile/README.md b/mobile/README.md index 66bfaaf..9c21c02 100644 --- a/mobile/README.md +++ b/mobile/README.md @@ -1,4 +1,4 @@ -# Xmartlabs' Flutter template +# Xmartchat ## Arch Overview @@ -21,10 +21,10 @@ Another important plugin related to the UI is [flutter_screenutil][flutter_scree ### Core section -The models are defined in the [models folder][models]. If you need to use different models for database or networking, you can create them in `db` and `service` folders respectively. +The models are defined in the [models folder][models]. If you need to use different models for networking, you can create them in `service` folder. The repository pattern is used to manage the data layer. -A [repository][repository_folder] uses different [data sources][data_source_folder] (for example a local cache or a REST API). +A [repository][repository_folder] uses different [data sources][data_source_folder] (for example a local cache or the Supabase SDK). These components are injected in the Cubits using [get_it][get_it]. ## Project Overview @@ -37,54 +37,6 @@ The [`/assets/`](./assets) folder contains the assets used by the application, s The environment variables are defined in the `default.env` file located in [`/environments/`](./environments) folder. You can read more information about the environment variables in the [README.md](./environments/README.md) file. -## Project Setup - -The project setup is based on some plugins which generate the required native code. - -You can use [project_setup.sh](scripts/project_setup.sh) to reload all project setups. - -### Flavor setup: Project name, properties BundleId & Application id -This information is set using [flavorizr], a flutter utility to easily create flavors in your flutter application. -To change it go to `flavorizr` section in the [pubspec] file. - -For example, to add a new flavour, you can do something like: -```yaml -flavorizr: - flavors: - qa: - app: - name: 'My Project - QA' - android: - applicationId: 'com.xmartlabs.myproject.qa' - ios: - bundleId: 'com.xmartlabs.myproject.qa' -``` - -After a change is made, you need to regenerate your native files. -You can do that by executing `flutter pub run flutter_flavorizr`. - -More information in [flavorizr] page. - -### App icons - -Icons are generated using [flutter_launcher_icons] plugin. -To change it go to `flutter_icons` section in the [pubspec] file. - -After a change is made, you need to regenerate your native files. -You can do that by executing `flutter pub run flutter_launcher_icons:main`. - - -### Splash screen - -Splash screen is generated using [flutter_native_splash]. -To change it go to `flutter_native_splash` section in the [pubspec] file. - -After a change is made, you need to regenerate your native files. -You can do that by executing `flutter pub run flutter_native_splash:create`. - -Although you can setup a bunch of features in this library, it doesn't provide a way to display animations. -If you need a more personalized splash screen, you can edit the native code or just remove this library. - ### Pre Push config In order to setup pre-push hook you need to go to the root of the project and run `git config core.hooksPath .github/hooks` @@ -93,12 +45,12 @@ In order to setup pre-push hook you need to go to the root of the project and ru [flutter_launcher_icons]: https://pub.dev/packages/flutter_launcher_icons [flutter_native_splash]: https://pub.dev/packages/flutter_native_splash [pubspec]: ./pubspec.yaml -[app_router]: https://github.com/xmartlabs/flutter-template/blob/main/lib/ui/app_router.dart +[app_router]: lib/ui/router/app_router.dart [bloc]: https://bloclibrary.dev [auto_route]: https://pub.dev/packages/auto_route -[theme]: https://github.com/xmartlabs/flutter-template/tree/main/lib/ui/theme +[theme]: lib/ui/theme [flutter_screenutil]: https://pub.dev/packages/flutter_screenutil -[models]: https://github.com/xmartlabs/flutter-template/tree/main/lib/core/model -[repository_folder]: https://github.com/xmartlabs/flutter-template/tree/main/lib/core/repository -[data_source_folder]: https://github.com/xmartlabs/flutter-template/tree/main/lib/core/source +[models]: lib/core/model +[repository_folder]: lib/core/repository +[data_source_folder]: lib/core/source [get_it]: https://pub.dev/packages/get_it