Skip to content

Commit e9a583b

Browse files
committed
🎯 flutter journey cleanarchitecture template
0 parents  commit e9a583b

File tree

178 files changed

+6686
-0
lines changed

Some content is hidden

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

178 files changed

+6686
-0
lines changed

.github/workflows/sync_labels.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ♻️ Sync Labels
2+
3+
on:
4+
push:
5+
paths:
6+
- .github/labels.yml
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
labels:
13+
name: ♻️ Sync labels
14+
runs-on: ubuntu-20.04
15+
permissions:
16+
issues: write
17+
contents: read
18+
steps:
19+
- name: ⤵️ Check out code from GitHub
20+
uses: actions/checkout@v4
21+
22+
- name: 🚀 Run Label Sync
23+
uses: srealmoreno/label-sync-action@v2
24+
with:
25+
config-file: https://raw.githubusercontent.com/Flutter-Journey/.github/main/.github/labels.yml
26+
27+
- name: 🚀 Run Label Sync (Local)
28+
if: ${{ hashFiles('.github/labels.yml') }}
29+
uses: srealmoreno/label-sync-action@v2
30+
with:
31+
config-file: .github/labels.yml

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Symbolication related
35+
app.*.symbols
36+
37+
# Obfuscation related
38+
app.*.map.json
39+
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release

.metadata

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
17+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
18+
- platform: android
19+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
20+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
21+
- platform: ios
22+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
23+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
24+
- platform: linux
25+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
26+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
27+
- platform: macos
28+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
29+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
30+
- platform: web
31+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
32+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
33+
- platform: windows
34+
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
35+
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dart.lineLength": 100,
3+
"editor.formatOnSave": true,
4+
"editor.formatOnType": true
5+
}

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# 🚀 Flutter Clean Architecture Template
2+
3+
A clean, scalable, and maintainable **Flutter project template** using Clean Architecture.
4+
5+
Starring ⭐ this repository if you find it useful!
6+
7+
###### Contact for work, email: [email protected]
8+
9+
<br>
10+
11+
<img src="https://raw.githubusercontent.com/Flutter-Journey/.github/refs/heads/main/media/logo-icon.png" alt="App Logo" width="150"/>
12+
13+
<br>
14+
15+
![GitHub stars](https://img.shields.io/github/stars/Flutter-Journey/Flutter-Clean-Template?style=social)
16+
![GitHub forks](https://img.shields.io/github/forks/Flutter-Journey/Flutter-Clean-Template?style=social)
17+
![GitHub watchers](https://img.shields.io/github/watchers/Flutter-Journey/Flutter-Clean-Template?style=social)
18+
19+
<a href="https://www.linkedin.com/in/chunhthanhde/">
20+
<img src="https://img.shields.io/badge/Support-Recommend%2FEndorse%20me%20on%20Linkedin-blue?style=for-the-badge&logo=linkedin" alt="Support me on LinkedIn" />
21+
</a>
22+
23+
<a href="https://www.buymeacoffee.com/chunhthanhde" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
24+
25+
## 🎯 Overview
26+
27+
**Flutter Clean Architecture Template** provides a solid base structure for your Flutter projects. It follows Clean Architecture principles, promoting separation of concerns and maintainability.
28+
29+
> Note: This template is designed for educational purposes and serves as a base for starting new Flutter projects.
30+
31+
<!-- ## 🖥️ Features (TODO)
32+
33+
- **Feature 1**:
34+
- **Feature 2**: -->
35+
36+
<!-- ## 🎨 Figma Design (Optional)
37+
38+
- [Design Reference](https://www.figma.com/community/file/example-link) -->
39+
40+
## 🛠️ Technologies Used
41+
42+
| **Library** | **Purpose** |
43+
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44+
| **flutter_bloc** | A library for implementing the BLoC (Business Logic Component) pattern in Flutter apps, helping manage app state efficiently. |
45+
| **hydrated_bloc** | An extension of `flutter_bloc` that allows persisting the BLoC state across app restarts, retaining data even after the app is closed. |
46+
| **path_provider** | A Flutter plugin used to find the correct paths for storing files on the device, helping identify directories for documents, temporary storage, and external storage. |
47+
| **get_it** | A service locator for Dart and Flutter, making dependency injection easy and simplifying object management across different parts of an app. |
48+
| **dartz** | A functional programming library for Dart that provides features like Option, Either, and Tuple to improve handling of nullable values and side effects in code. |
49+
50+
## 🔧 Setup and Installation
51+
52+
1. Clone the repository:
53+
54+
```bash
55+
git clone https://github.com/Flutter-Journey/Flutter-Clean-Template.git
56+
```
57+
58+
2. Navigate to the project directory:
59+
60+
```bash
61+
cd Flutter-Clean-Template
62+
```
63+
64+
3. Install dependencies:
65+
66+
```bash
67+
flutter pub get
68+
```
69+
70+
4. Run the app:
71+
72+
```bash
73+
flutter run
74+
```
75+
76+
## 📸 Screenshots
77+
78+
| Get Start Screen | Choose Mode (Light) Screen | Choose Mode (Dark) Screen |
79+
| -------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------- |
80+
| ![Get Start Screen](media/image/screen1.png) | ![Choose Mode Light Screen](media/image/screen2.png) | ![Choose Mode Dark Screen](media/image/screen3.png) |
81+
82+
| Sign In Screen | Sign Up Screen | Profile Screen |
83+
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
84+
| ![Sign In Screen](media/image/screen4.png) | ![Sign Up Screen](media/image/screen5.png) | ![Profile Screen](media/image/screen6.png) |
85+
86+
## ⭐ Star History
87+
88+
<div align="center">
89+
90+
<a href="https://star-history.com/#Flutter-Journey/Flutter-Clean-Template&Date">
91+
<picture>
92+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Flutter-Journey/Flutter-Clean-Template&type=Date&theme=dark" />
93+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Flutter-Journey/Flutter-Clean-Template&type=Date" />
94+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Flutter-Journey/Flutter-Clean-Template&type=Date" />
95+
</picture>
96+
</a>
97+
98+
#### Made by Flutter <img src="https://raw.githubusercontent.com/Flutter-Journey/.github/refs/heads/main/media/flutter_icon.png" height="15"> with Love ❤️ | Developed by [ChunhThanhDe](https://github.com/chunhthanhde)
99+
100+
</div>

analysis_options.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/to/reference-keystore
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
6+
}
7+
8+
android {
9+
namespace = "com.example.flutter_clean_architecture_template"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.flutter_clean_architecture_template"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.debug
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="flutter_clean_architecture_template"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:taskAffinity=""
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
<category android:name="android.intent.category.LAUNCHER"/>
26+
</intent-filter>
27+
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30+
<meta-data
31+
android:name="flutterEmbedding"
32+
android:value="2" />
33+
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
45+
</manifest>

0 commit comments

Comments
 (0)