Skip to content

Commit

Permalink
feat: app readme (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolantean authored Oct 23, 2023
1 parent 8390f9a commit a84633d
Showing 1 changed file with 8 additions and 56 deletions.
64 changes: 8 additions & 56 deletions mobile/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Xmartlabs' Flutter template
# Xmartchat

## Arch Overview

Expand All @@ -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
Expand All @@ -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`
Expand All @@ -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

0 comments on commit a84633d

Please sign in to comment.