Skip to content

Commit d30a6da

Browse files
author
nambh
committed
Update
* add injectable * add flutter_flavorizr * auto config run for android studio
1 parent deb56ae commit d30a6da

File tree

283 files changed

+2442
-2099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+2442
-2099
lines changed

.config/firebase/beta/GoogleService-Info.plist

Whitespace-only changes.

.config/firebase/beta/google-services.json

Whitespace-only changes.

.config/firebase/prod/GoogleService-Info.plist

Whitespace-only changes.

.config/firebase/prod/google-services.json

Whitespace-only changes.

.config/firebase/qc/GoogleService-Info.plist

Whitespace-only changes.

.config/firebase/qc/google-services.json

Whitespace-only changes.

.config/ic_launcher/ic_launcher.png

1.41 KB
Loading
1.41 KB
Loading
1.41 KB
Loading

.run/main (beta).run.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="main (beta)" type="FlutterRunConfigurationType" factoryName="Flutter">
3+
<option name="additionalArgs" value="--flavor beta --dart-define=env=beta" />
4+
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
5+
<method v="2" />
6+
</configuration>
7+
</component>

.run/main (prod).run.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="main (prod)" type="FlutterRunConfigurationType" factoryName="Flutter">
3+
<option name="additionalArgs" value="--flavor prod --dart-define=env=prod" />
4+
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
5+
<method v="2" />
6+
</configuration>
7+
</component>

README.md

+15-26
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* We want to adhere to SOLID principles since we are using OOP for this project.
77
* We want to ensure that UI layers do not care what is going on at the data layer at all.
88
* We might want to separate each layer into different packages.
9-
##### 2. Presentation - Domain - Data.
9+
##### 2. Presentation - Domain - Data - models.
1010
##### 3. Presentation layer consist of
1111
* Widgets
1212
* Cubit
@@ -15,18 +15,21 @@
1515
##### 4. Domain layer (Business logic layer)
1616
* Entities (or models that UI needs)
1717
* Usecases (user stories)
18+
* Repositories interface
1819
* Typically one function, but can be more if functions are related.
1920
* Remember, one class has one responsibility only.
2021

21-
2222
##### 5. Data layer (Data access layer)
2323
* source
2424
* remotes (API)
2525
* locals (Database)
26-
* model
27-
* request
28-
* response
2926
* Repositories (Implementation from Domain layer)
27+
28+
##### 6. Models (The `data model` common for domain layer and data layer)
29+
* models
30+
* request
31+
* response
32+
3033
We build this class working separately and not following logics of `Domain layer`. However, `Repositories` will still implement from `Domain layer`, but the `Domain layer` will follow each function, and the `Data layer` will follow the cluster of data defined on the server.
3134
For example: `Domain layer` has defined 2 layers of Login and Register features, but these two features are related to the API User cluster on the server, so in the `Data layer`, there will only be one Repo which is user and that Repo will implement 2 layers Login and Register of the `Domain layer`.
3235

@@ -35,15 +38,7 @@ For example: `Domain layer` has defined 2 layers of Login and Register features,
3538

3639
### DI pattern
3740
`Dependency Injection` is a great design pattern that allows us to eliminate rigid dependencies between elements and it makes the application more flexible, easy to expand scales and maintain.
38-
In the project we use Plugin `get_it` to implement DI and we have also defined classes so you can easily implement `DI` in the `DI layer`.
39-
##### injection
40-
Inject modules
41-
##### module
42-
* Declare the modules used in the project.
43-
* All modules must extend "DIModule"
44-
* The registers must be set in the func provides.
45-
* When you want to call 1 DI just use the syntax. "getIt<My Component>()"
46-
* Learn more about "get_it"
41+
In the project we use Plugin `get_it` and `injectable` to implement DI and we have also defined classes so you can easily implement `DI` in the `DI layer`.
4742

4843
### Routes
4944
The project has predefined Named routes RouteDefine + manifest
@@ -68,11 +63,9 @@ The project has predefined Named routes RouteDefine + manifest
6863
You can run the app using the commands
6964

7065
```
71-
## development: flutter run -t lib/main.dart --debug --flavor development
66+
## development: flutter run -t lib/main.dart --debug --flavor beta
7267
73-
## staging: flutter run -t lib/main.dart --debug --flavor staging
74-
75-
## preprod: flutter run -t lib/main.dart --debug --flavor preprod
68+
## staging: flutter run -t lib/main.dart --debug --flavor prod
7669
```
7770

7871
##### Build App
@@ -81,21 +74,17 @@ You can build the app using the commands
8174
for Android
8275

8376
```
84-
## development: flutter build apk -t lib/main.dart --flavor development
85-
86-
## staging: flutter build apk -t lib/main.dart --flavor staging
77+
## development: flutter build apk -t lib/main.dart --flavor beta
8778
88-
## preprod: flutter build apk -t lib/main.dart --flavor preprod
79+
## staging: flutter build apk -t lib/main.dart --flavor prod
8980
```
9081

9182
for IOS
9283

9384
```
94-
## development flutter build ios -t lib/main.dart --flavor development
95-
96-
## staging: flutter build ios -t lib/main.dart --flavor staging
85+
## development flutter build ios -t lib/main.dart --flavor beta
9786
98-
## preprod: flutter build ios -t lib/main.dart --flavor preprod
87+
## staging: flutter build ios -t lib/main.dart --flavor prod
9988
```
10089

10190
### resources

android/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

android/.idea/.gitignore

-3
This file was deleted.

android/.idea/compiler.xml

-6
This file was deleted.

android/.idea/gradle.xml

-27
This file was deleted.

android/.idea/jarRepositories.xml

-35
This file was deleted.

android/.idea/libraries/Gradle_______build_app_intermediates_flutter_developmentDebug_libs_jar.xml

-9
This file was deleted.

android/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml

-14
This file was deleted.

android/.idea/libraries/Gradle__androidx_annotation_annotation_1_2_0.xml

-11
This file was deleted.

android/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_1_0_aar.xml

-13
This file was deleted.

android/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml

-11
This file was deleted.

android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml

-14
This file was deleted.

android/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml

-11
This file was deleted.

android/.idea/libraries/Gradle__androidx_core_core_1_6_0_aar.xml

-16
This file was deleted.

android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml

-14
This file was deleted.

android/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml

-17
This file was deleted.

android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_2_0.xml

-11
This file was deleted.

android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_java8_2_2_0.xml

-11
This file was deleted.

android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml

-14
This file was deleted.

0 commit comments

Comments
 (0)