├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_getx_base_project
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── assets_readme
│ ├── get_init_with_template.png
│ ├── helperwidget_search_api.png
│ ├── helperwidget_search_ui.gif
│ ├── printt_color.png
│ ├── printt_log_api.png
│ └── test_get_command.png
├── import_response.json
├── svg
│ ├── facebook.svg
│ ├── github.svg
│ ├── google-plus.svg
│ ├── search_2.svg
│ └── twitter.svg
└── translations
│ ├── en_US.json
│ ├── ja_JP.json
│ └── vi_VN.json
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── RunnerTests
│ └── RunnerTests.swift
└── firebase_app_id_file.json
├── lib
├── app
│ ├── core
│ │ ├── base
│ │ │ ├── base_connect.dart
│ │ │ ├── base_controller.dart
│ │ │ ├── base_model.dart
│ │ │ └── base_project.dart
│ │ ├── config
│ │ │ ├── api_url.dart
│ │ │ └── theme_config.dart
│ │ ├── constants
│ │ │ ├── app_constant.dart
│ │ │ ├── color_constant.dart
│ │ │ ├── global_constant.dart
│ │ │ └── storage_constant.dart
│ │ ├── services
│ │ │ ├── notification_service.dart
│ │ │ └── translation_service.dart
│ │ └── utils
│ │ │ ├── all_flutter_icon.dart
│ │ │ ├── extension
│ │ │ ├── app_extension.dart
│ │ │ ├── datetime_extension.dart
│ │ │ ├── iterable_extension.dart
│ │ │ ├── list_extension.dart
│ │ │ ├── map_extension.dart
│ │ │ ├── num_extension.dart
│ │ │ ├── string_extension.dart
│ │ │ └── text_editing_controller_extension.dart
│ │ │ ├── helper.dart
│ │ │ ├── helper_reflect.dart
│ │ │ ├── helper_widget.dart
│ │ │ ├── limit_range_text_input.dart
│ │ │ ├── print.dart
│ │ │ └── utils.dart
│ ├── custom
│ │ ├── other
│ │ │ ├── more_dropdown_search_custom.dart
│ │ │ └── search_controller_custom.dart
│ │ └── widget
│ │ │ └── loadding_widget.dart
│ ├── models
│ │ └── users_model.dart
│ ├── modules
│ │ ├── authentication
│ │ │ ├── bindings
│ │ │ │ └── authentication_binding.dart
│ │ │ ├── controllers
│ │ │ │ └── authentication_controller.dart
│ │ │ ├── views
│ │ │ │ └── authentication_view.dart
│ │ │ └── widget
│ │ │ │ ├── custom_prefix_icon_widget.dart
│ │ │ │ ├── forgot_password_tab_widget.dart
│ │ │ │ ├── sign_in_tab_widget.dart
│ │ │ │ ├── sign_up_tab_widget.dart
│ │ │ │ ├── social_icon_widget.dart
│ │ │ │ ├── wave_clipper.dart
│ │ │ │ └── wave_draw_clippath_widget.dart
│ │ └── home
│ │ │ ├── controllers
│ │ │ └── home_controller.dart
│ │ │ └── views
│ │ │ └── home_view.dart
│ └── routes
│ │ ├── app_pages.dart
│ │ └── app_routes.dart
├── firebase_options.dart
├── generated
│ └── locales.g.dart
├── main.dart
└── package
│ └── cupertino_datetime_picker
│ └── cupertino_datetime_picker.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ ├── Base.lproj
│ │ └── MainMenu.xib
│ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
├── RunnerTests
│ └── RunnerTests.swift
└── firebase_app_id_file.json
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── index.html
└── manifest.json
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.gitignore:
--------------------------------------------------------------------------------
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 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
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.
5 |
6 | version:
7 | revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
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: 84a1e904f44f9b0e9c4510138010edcc653163f8
17 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
18 | - platform: android
19 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
20 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
21 | - platform: ios
22 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
23 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
24 | - platform: linux
25 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
26 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
27 | - platform: macos
28 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
29 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
30 | - platform: web
31 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
32 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
33 | - platform: windows
34 | create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
35 | base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
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'
46 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
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
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
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/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | //upload firebase can` cai nay`
25 | // def keystoreProperties = new Properties()
26 | // def keystorePropertiesFile = rootProject.file('key.properties')
27 | // if (keystorePropertiesFile.exists()) {
28 | // keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
29 | // }
30 |
31 | apply plugin: 'com.android.application'
32 | // START: FlutterFire Configuration
33 | apply plugin: 'com.google.gms.google-services'
34 | // END: FlutterFire Configuration
35 | apply plugin: 'kotlin-android'
36 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
37 |
38 | android {
39 | namespace "com.example.flutter_getx_base_project"
40 | compileSdkVersion flutter.compileSdkVersion
41 | ndkVersion flutter.ndkVersion
42 |
43 | compileOptions {
44 | // Flag to enable support for the new language APIs
45 | coreLibraryDesugaringEnabled true
46 | // Sets Java compatibility to Java 8
47 | sourceCompatibility JavaVersion.VERSION_1_8
48 | targetCompatibility JavaVersion.VERSION_1_8
49 | }
50 |
51 | kotlinOptions {
52 | jvmTarget = '1.8'
53 | }
54 |
55 | sourceSets {
56 | main.java.srcDirs += 'src/main/kotlin'
57 | }
58 |
59 | defaultConfig {
60 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
61 | applicationId "com.example.flutter_getx_base_project"
62 | // You can update the following values to match your application needs.
63 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
64 | minSdkVersion 19 //flutter.minSdkVersion
65 | targetSdkVersion 33 //flutter.targetSdkVersion
66 | versionCode flutterVersionCode.toInteger()
67 | versionName flutterVersionName
68 | multiDexEnabled true
69 | }
70 |
71 |
72 | //upload firebase can` cai nay`
73 | // signingConfigs {
74 | // release {
75 | // keyAlias keystoreProperties['keyAlias']
76 | // keyPassword keystoreProperties['keyPassword']
77 | // storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
78 | // storePassword keystoreProperties['storePassword']
79 | // }
80 | // }
81 |
82 |
83 | buildTypes {
84 | release {
85 | // TODO: Add your own signing config for the release build.
86 | // Signing with the debug keys for now, so `flutter run --release` works.
87 | signingConfig signingConfigs.debug
88 |
89 | // Enables code shrinking, obfuscation, and optimization for only
90 | // your project's release build type.
91 | // minifyEnabled true
92 | // Enables resource shrinking, which is performed by the
93 | // Android Gradle plugin.
94 | // shrinkResources true
95 |
96 | // signingConfig signingConfigs.release
97 | }
98 | }
99 |
100 | //FIX: [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
101 | splits {
102 | abi {
103 | enable true
104 | reset()
105 | include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64', 'armeabi', 'mips', 'mips64'
106 | universalApk true
107 | }
108 | }
109 | }
110 |
111 | flutter {
112 | source '../..'
113 | }
114 |
115 | dependencies {
116 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
117 | // Import the BoM for the Firebase platform
118 | implementation platform('com.google.firebase:firebase-bom:31.2.3')
119 | implementation 'com.google.android.material:material:1.9.0-alpha02'
120 | // Add the dependency for the Firebase Authentication library
121 | // When using the BoM, you don't specify versions in Firebase library dependencies
122 | implementation 'com.google.firebase:firebase-auth-ktx'
123 | implementation 'androidx.window:window:1.0.0'
124 | implementation 'androidx.window:window-java:1.0.0'
125 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
126 | implementation "androidx.work:work-runtime-ktx:2.8.0"
127 |
128 | }
129 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "754653310732",
4 | "project_id": "flutter-getx-base-project",
5 | "storage_bucket": "flutter-getx-base-project.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:754653310732:android:4aa8db9afd4cb26763a329",
11 | "android_client_info": {
12 | "package_name": "com.example.flutter_getx_base_project"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "754653310732-98hdjads98bo6uls10ebiksd85nunsum.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyBd67LXICMeNxCDe3BAnmioWkckIRZ3k1Y"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "754653310732-98hdjads98bo6uls10ebiksd85nunsum.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_getx_base_project/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_getx_base_project
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.4.2'
10 | // START: FlutterFire Configuration
11 | classpath 'com.google.gms:google-services:4.3.15'
12 | // END: FlutterFire Configuration
13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | mavenCentral()
21 | }
22 | }
23 |
24 | rootProject.buildDir = '../build'
25 | subprojects {
26 | project.buildDir = "${rootProject.buildDir}/${project.name}"
27 | }
28 | subprojects {
29 | project.evaluationDependsOn(':app')
30 | }
31 |
32 | tasks.register("clean", Delete) {
33 | delete rootProject.buildDir
34 | }
35 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/assets_readme/get_init_with_template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/get_init_with_template.png
--------------------------------------------------------------------------------
/assets/assets_readme/helperwidget_search_api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/helperwidget_search_api.png
--------------------------------------------------------------------------------
/assets/assets_readme/helperwidget_search_ui.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/helperwidget_search_ui.gif
--------------------------------------------------------------------------------
/assets/assets_readme/printt_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/printt_color.png
--------------------------------------------------------------------------------
/assets/assets_readme/printt_log_api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/printt_log_api.png
--------------------------------------------------------------------------------
/assets/assets_readme/test_get_command.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/assets_readme/test_get_command.png
--------------------------------------------------------------------------------
/assets/import_response.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/assets/import_response.json
--------------------------------------------------------------------------------
/assets/svg/facebook.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/google-plus.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
48 |
--------------------------------------------------------------------------------
/assets/svg/twitter.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
48 |
--------------------------------------------------------------------------------
/assets/translations/en_US.json:
--------------------------------------------------------------------------------
1 | {
2 | "en_US": "English",
3 | "vi_VN": "Vietnamese",
4 | "ja_JP": "Japanese",
5 | "Language": "Language",
6 | "SignIn": "Sign In",
7 | "SignUp": "Sign Up",
8 | "LogOut": "Log Out",
9 | "UserName": "User Name",
10 | "Email": "Email",
11 | "Phone": "Phone",
12 | "Password": "Password",
13 | "ConfirmPassword": "Confirm Password",
14 | "ForgotPassword": "Forgot Password",
15 | "Add": "Add",
16 | "PleaseWait": "Please wait...",
17 | "Confirm": "Confirm",
18 | "MustNotBeEmpty": "Must not be empty",
19 | "Cancel": "Cancel",
20 | "DoYouWantToTryIt": "Do you want to try it?",
21 | "TryNow": "Try now !",
22 | "RankingTable": "Ranking Table",
23 | "Classify": "Classify",
24 | "Favorite": "Favorite",
25 | "Another": "Another",
26 | "Home": "Home",
27 | "Setting": "Setting",
28 | "Views": "Views",
29 | "Episode": "Episode",
30 | "Episodes": "Episodes",
31 | "Infomation": "Infomation",
32 | "Comment": "Comment",
33 | "Genres": "Genres",
34 | "RememberPassword": "Remember Password"
35 | }
36 |
--------------------------------------------------------------------------------
/assets/translations/ja_JP.json:
--------------------------------------------------------------------------------
1 | {
2 | "en_US": "英語",
3 | "vi_VN": "ベトナム語",
4 | "ja_JP": "日本語",
5 | "Language": "言語",
6 | "SignIn": "サインイン",
7 | "SignUp": "サインアップ",
8 | "LogOut": "ログアウト",
9 | "UserName": "ユーザー名",
10 | "Email": "メールアドレス",
11 | "Phone": "電話番号",
12 | "Password": "パスワード",
13 | "ConfirmPassword": "パスワードの確認",
14 | "ForgotPassword": "パスワードをお忘れですか",
15 | "Add": "追加",
16 | "PleaseWait": "お待ちください...",
17 | "Confirm": "確認",
18 | "MustNotBeEmpty": "空にすることはできません",
19 | "Cancel": "キャンセル",
20 | "DoYouWantToTryIt": "試してみますか",
21 | "TryNow": "今すぐ試す!",
22 | "RankingTable": "ランキングテーブル",
23 | "Classify": "分類",
24 | "Favorite": "お気に入り",
25 | "Another": "別の",
26 | "Home": "ホーム",
27 | "Setting": "設定",
28 | "Views": "ビュー",
29 | "Episode": "エピソード",
30 | "Episodes": "エピソード",
31 | "Infomation": "情報",
32 | "Comment": "コメント",
33 | "Genres": "ジャンル",
34 | "RememberPassword":"パスワードを覚えていますか"
35 | }
36 |
--------------------------------------------------------------------------------
/assets/translations/vi_VN.json:
--------------------------------------------------------------------------------
1 | {
2 | "en_US": "Tiếng Anh",
3 | "vi_VN": "Tiếng Việt",
4 | "ja_JP": "Tiếng Nhật",
5 | "Language": "Ngôn ngữ",
6 | "SignIn": "Đăng nhập",
7 | "SignUp": "Đăng ký",
8 | "LogOut": "Đăng xuất",
9 | "UserName": "Tên đăng nhập",
10 | "Email": "Email",
11 | "Phone": "Số điện thoại",
12 | "Password": "Mật khẩu",
13 | "ConfirmPassword": "Xác nhận mật khẩu",
14 | "ForgotPassword": "Quên mật khẩu",
15 | "Add": "Thêm",
16 | "PleaseWait": "Vui lòng đợi ...",
17 | "Confirm": "Xác nhận",
18 | "MustNotBeEmpty": "không được để trống!",
19 | "Cancel": "Huỷ",
20 | "DoYouWantToTryIt": "Bạn muốn dùng thử ?",
21 | "TryNow": "Thử ngay !",
22 | "RankingTable": "Bảng xếp hạng",
23 | "Classify": "Phân loại",
24 | "Favorite": "Yêu thích",
25 | "Another": "Khác",
26 | "Home": "Trang chủ",
27 | "Setting": "Cài đặt",
28 | "Views": "Lượt xem",
29 | "Episode": "Tập",
30 | "Episodes": "Danh sách tập",
31 | "Infomation": "Thông tin",
32 | "Comment": "Bình luận",
33 | "Genres": "Thể loại",
34 | "RememberPassword":"Ghi nhớ mật khẩu"
35 | }
36 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phatdat-dev/flutter_getx_base_project/2cfc63661a118c93d7c2f9694f098d012724703d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 754653310732-8c9mmaebb5ovme4ooarl93d1uakfcqiu.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.754653310732-8c9mmaebb5ovme4ooarl93d1uakfcqiu
9 | API_KEY
10 | AIzaSyDppyMn5WF93R0bDmqcU5BfkGyoq8teRlU
11 | GCM_SENDER_ID
12 | 754653310732
13 | PLIST_VERSION
14 | 1
15 | BUNDLE_ID
16 | com.example.flutterGetxBaseProject
17 | PROJECT_ID
18 | flutter-getx-base-project
19 | STORAGE_BUCKET
20 | flutter-getx-base-project.appspot.com
21 | IS_ADS_ENABLED
22 |
23 | IS_ANALYTICS_ENABLED
24 |
25 | IS_APPINVITE_ENABLED
26 |
27 | IS_GCM_ENABLED
28 |
29 | IS_SIGNIN_ENABLED
30 |
31 | GOOGLE_APP_ID
32 | 1:754653310732:ios:becae31c543c040b63a329
33 |
34 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Flutter Getx Base Project
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | flutter_getx_base_project
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/ios/firebase_app_id_file.json:
--------------------------------------------------------------------------------
1 | {
2 | "file_generated_by": "FlutterFire CLI",
3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4 | "GOOGLE_APP_ID": "1:754653310732:ios:becae31c543c040b63a329",
5 | "FIREBASE_PROJECT_ID": "flutter-getx-base-project",
6 | "GCM_SENDER_ID": "754653310732"
7 | }
--------------------------------------------------------------------------------
/lib/app/core/base/base_connect.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 |
4 | import 'package:get/get.dart';
5 | import 'package:get/get_connect/http/src/request/request.dart';
6 |
7 | import '/app/core/base/base_model.dart';
8 | import '/app/core/config/api_url.dart';
9 | import '/app/core/utils/utils.dart';
10 | import '/app/custom/widget/loadding_widget.dart';
11 | import '/app/modules/authentication/controllers/authentication_controller.dart';
12 | import '../constants/app_constant.dart';
13 |
14 | // ignore: constant_identifier_names
15 | enum RequestMethod { GET, POST, PUT, DELETE }
16 |
17 | class BaseConnect extends GetConnect {
18 | int get requestAgainSecond => 10; //neu request loi~ thi` se tu dong goi call api sau khoang thoi gian nao` do'
19 | int get timeOutSecond => 60;
20 | bool isShowLoading = true;
21 |
22 | @override
23 | void onInit() {
24 | super.onInit();
25 | httpClient.baseUrl = ApiUrl.base_url;
26 | httpClient.timeout = Duration(seconds: timeOutSecond);
27 | // httpClient.addAuthenticator(authInterceptor);
28 | httpClient.addRequestModifier(requestInterceptor);
29 | httpClient.addResponseModifier(responseInterceptor);
30 | }
31 |
32 | FutureOr requestInterceptor(Request request) async {
33 | request.headers['Authorization'] = 'Bearer ${AuthenticationController.userAccount?.token}';
34 |
35 | request.headers['Accept'] = 'application/json, text/plain, */*';
36 | request.headers['Charset'] = 'utf-8';
37 | // request.headers['Content-Type'] = 'application/json;charset=UTF-8';
38 |
39 | // tự động mở loadding khi Request
40 | if (isShowLoading) Loadding.show();
41 | Printt.yellow("${request.method}: ${request.url.toString()} ------------request");
42 | return request;
43 | }
44 |
45 | FutureOr responseInterceptor(Request request, Response response) async {
46 | // tự động tắt loadding khi có response
47 | Loadding.dismiss();
48 |
49 | if (response.hasError) {
50 | handleErrorStatus(response);
51 | return;
52 | }
53 |
54 | return response;
55 | }
56 |
57 | FutureOr onTimeout() {
58 | throw TimeoutException(
59 | 'Không có phản hồi từ máy chủ trong ${httpClient.timeout.inSeconds} giây, yêu cầu có thể đã được gửi đi, xin hãy kiểm tra lại');
60 | }
61 |
62 | void handleErrorStatus(Response response) {
63 | switch (response.statusCode) {
64 | case 400:
65 | case 404:
66 | case 500:
67 | //
68 | final Map errorMessage = jsonDecode(response.bodyString!);
69 |
70 | String message = '';
71 | if (errorMessage.containsKey('error') || errorMessage.containsKey('message')) {
72 | if (errorMessage['error'] is Map) {
73 | //cho nay` bat' loi~ OpenAI
74 | message = errorMessage['error']['message'];
75 | } else {
76 | message = (errorMessage['message'] ?? errorMessage['error']).toString();
77 | }
78 | } else {
79 | errorMessage.forEach((key, value) {
80 | if (value is List) {
81 | message += '${value.join('\n')}\n';
82 | } else {
83 | message += value.toString();
84 | }
85 | });
86 | }
87 | HelperWidget.showToast('CODE (${response.statusCode}):\n$message');
88 | Printt.red(message);
89 | break;
90 | case 401:
91 | //401: Print token expired
92 | String message = 'CODE (${response.statusCode}):\n${response.statusText}';
93 | HelperWidget.showToast(message);
94 | Printt.red(message);
95 | AuthenticationController.userAccount = null;
96 | //Remove token
97 | Global.sharedPreferences.remove(StorageConstants.userAccount);
98 | Get.toNamed('/authentication');
99 | break;
100 | default:
101 | break;
102 | }
103 | }
104 |
105 | // -------------------------
106 |
107 | /// [body] gửi request cho các phương thức POST, PUT, PATCH
108 | ///
109 | /// [queryParam] gửi request dạng queryParam cho các phương thức GET
110 | ///
111 | /// [baseModel] dùng để parse dữ liệu mong muốn trả về
112 | Future onRequest(
113 | String url,
114 | RequestMethod method, {
115 | dynamic body,
116 | BaseModel? baseModel, //muon tra ve kieu du lieu nao` ?, neu null thi` tra? ve` Response
117 | Map? queryParam,
118 | bool? isShowLoading,
119 | }) async {
120 | try {
121 | this.isShowLoading = isShowLoading ??= true;
122 |
123 | if (body is List) {
124 | //cho no' theo kieu? nhu vay` [{},{},{}...]
125 | body = body.map((e) => e.toJson()).toList();
126 | } else if (body != null && body is BaseModel) {
127 | body = body.toJson();
128 | }
129 |
130 | if (body is FormData) {
131 | Printt.green(jsonEncode(Map.fromEntries(body.fields)));
132 | } else {
133 | Printt.green(jsonEncode(body));
134 | }
135 |
136 | final res = await request(
137 | url,
138 | method.name,
139 | body: body,
140 | query: queryParam?.map((key, value) => MapEntry(key, value.toString())),
141 | decoder: (data) {
142 | if (baseModel == null) return data; //return Response
143 | if (data is List) return data.map((e) => baseModel.fromJson(e)).toList();
144 | if (data is Map) return baseModel.fromJson(data);
145 | return null;
146 | },
147 | ).timeout(httpClient.timeout, onTimeout: onTimeout).then((value) {
148 | Printt.magenta(value.bodyString.toString());
149 | return value;
150 | });
151 | //
152 | return res.body;
153 | } on TimeoutException catch (_) {
154 | HelperWidget.showToast(_.message!);
155 | // catch timeout here..
156 | } catch (e) {
157 | //? tự động gọi lại api
158 | // return await Future.delayed(
159 | // Duration(seconds: requestAgainSecond),
160 | // () => onRequest(
161 | // url,
162 | // method,
163 | // body: body,
164 | // baseModel: baseModel,
165 | // queryParam: queryParam,
166 | // isShowLoading: isShowLoading,
167 | // ));
168 | }
169 | return null;
170 | }
171 | }
172 |
--------------------------------------------------------------------------------
/lib/app/core/base/base_controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:get/get.dart';
2 |
3 | import '/app/core/base/base_project.dart';
4 |
5 | export '../config/api_url.dart';
6 |
7 | abstract class BaseController extends GetxController {
8 | BaseConnect get apiCall => Get.find();
9 | }
10 |
--------------------------------------------------------------------------------
/lib/app/core/base/base_model.dart:
--------------------------------------------------------------------------------
1 | // get generate model on response with assets/import_response.json
2 | //get generate model with assets/import_response.json
3 | abstract class BaseModel {
4 | R fromJson(Map json);
5 |
6 | Map toJson();
7 | }
8 |
9 | // abstract class SearchDelegateQueryName {
10 | // String get queryName;
11 | // set queryName(String value) => queryName = value;
12 | // Object? objectt;
13 | // String? description;
14 | // }
15 |
16 | mixin BaseSelectedModel {
17 | bool isSelected = false;
18 | }
19 |
--------------------------------------------------------------------------------
/lib/app/core/base/base_project.dart:
--------------------------------------------------------------------------------
1 | export 'base_connect.dart';
2 | export 'base_controller.dart';
3 | export 'base_model.dart';
4 |
--------------------------------------------------------------------------------
/lib/app/core/config/api_url.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: non_constant_identifier_names
2 |
3 | class ApiUrl {
4 | static String get base_url => 'https://127.0.0.1'; //baseUrl
5 |
6 | //
7 | static String post_auth_login() => '/api/auth/login';
8 | static String post_auth_register() => '/api/auth/register';
9 | }
10 |
--------------------------------------------------------------------------------
/lib/app/core/config/theme_config.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../constants/color_constant.dart';
4 |
5 | // https://flutter.github.io/samples/web/material_3_demo/#/
6 | class ThemeConfig with ColorConstants {
7 | ThemeData get lightTheme => ThemeData.light().copyWith(
8 | // useMaterial3: true,
9 | brightness: Brightness.light,
10 | primaryColor: ColorConstants.pink800,
11 | colorScheme: ColorScheme.fromSwatch().copyWith(
12 | secondary: ColorConstants.pink500,
13 | ),
14 |
15 | popupMenuTheme: const PopupMenuThemeData(
16 | shape: RoundedRectangleBorder(
17 | borderRadius: BorderRadius.all(Radius.circular(10.0)),
18 | //side: const BorderSide(color: Colors.pink)
19 | ),
20 | ),
21 | outlinedButtonTheme: OutlinedButtonThemeData(
22 | style: OutlinedButton.styleFrom(
23 | shape: const StadiumBorder(),
24 | ),
25 | ),
26 |
27 | elevatedButtonTheme: ElevatedButtonThemeData(
28 | style: ElevatedButton.styleFrom(
29 | shape: const RoundedRectangleBorder(
30 | borderRadius: BorderRadius.all(Radius.circular(10.0)),
31 | //side: const BorderSide(color: Colors.pink)
32 | ),
33 | //shadowColor: MaterialStateProperty.all(Colors.red),
34 | //elevation: MaterialStateProperty.all(0),
35 | // backgroundColor: ColorConstants.pink800, //background
36 | )),
37 | );
38 |
39 | ThemeData get dartTheme => ThemeData.dark(
40 | // useMaterial3: true,
41 | );
42 | }
43 |
--------------------------------------------------------------------------------
/lib/app/core/constants/app_constant.dart:
--------------------------------------------------------------------------------
1 | export 'color_constant.dart';
2 | export 'global_constant.dart';
3 | export 'storage_constant.dart';
4 |
--------------------------------------------------------------------------------
/lib/app/core/constants/color_constant.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '/app/core/utils/extension/app_extension.dart';
4 |
5 | mixin class ColorConstants {
6 | //0xFF vao` hex
7 | // static final MaterialColor blue100 = MaterialColor(0xFFE1EDF9, getSwatch(const Color(0xFFE1EDF9)));
8 | static final MaterialColor pink500 = MaterialColor(0xFFFFE6E6, getSwatch(const Color(0xFFFFE6E6)));
9 | static final MaterialColor pink800 = MaterialColor(0xFFF76969, getSwatch(const Color(0xFFF76969)));
10 |
11 | static Map getSwatch(Color color) {
12 | final hslColor = HSLColor.fromColor(color);
13 | final lightness = hslColor.lightness;
14 |
15 | /// if [500] is the default color, there are at LEAST five
16 | /// steps below [500]. (i.e. 400, 300, 200, 100, 50.) A
17 | /// divisor of 5 would mean [50] is a lightness of 1.0 or
18 | /// a color of #ffffff. A value of six would be near white
19 | /// but not quite.
20 | const lowDivisor = 6;
21 |
22 | /// if [500] is the default color, there are at LEAST four
23 | /// steps above [500]. A divisor of 4 would mean [900] is
24 | /// a lightness of 0.0 or color of #000000
25 | const highDivisor = 5;
26 |
27 | final lowStep = (1.0 - lightness) / lowDivisor;
28 | final highStep = lightness / highDivisor;
29 |
30 | return {
31 | 50: (hslColor.withLightness(lightness + (lowStep * 5))).toColor(),
32 | 100: (hslColor.withLightness(lightness + (lowStep * 4))).toColor(),
33 | 200: (hslColor.withLightness(lightness + (lowStep * 3))).toColor(),
34 | 300: (hslColor.withLightness(lightness + (lowStep * 2))).toColor(),
35 | 400: (hslColor.withLightness(lightness + lowStep)).toColor(),
36 | 500: (hslColor.withLightness(lightness)).toColor(),
37 | 600: (hslColor.withLightness(lightness - highStep)).toColor(),
38 | 700: (hslColor.withLightness(lightness - (highStep * 2))).toColor(),
39 | 800: (hslColor.withLightness(lightness - (highStep * 3))).toColor(),
40 | 900: (hslColor.withLightness(lightness - (highStep * 4))).toColor(),
41 | };
42 | }
43 |
44 | static Color hexToColor(String hex) {
45 | assert(hex.isHexColor, 'hex color must be #rrggbb or #rrggbbaa');
46 |
47 | return Color(
48 | int.parse(hex.substring(1), radix: 16) + (hex.length == 7 ? 0xff000000 : 0x00000000),
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/app/core/constants/global_constant.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 |
3 | abstract class Global {
4 | static late final SharedPreferences sharedPreferences;
5 | }
6 |
--------------------------------------------------------------------------------
/lib/app/core/constants/storage_constant.dart:
--------------------------------------------------------------------------------
1 | // storage key (shared preferences)
2 | abstract class StorageConstants {
3 | static const String langCode = 'langCode';
4 | static const String userAccount = 'userAccount';
5 | }
6 |
--------------------------------------------------------------------------------
/lib/app/core/services/notification_service.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 |
4 | import 'package:firebase_core/firebase_core.dart';
5 | import 'package:firebase_messaging/firebase_messaging.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:flutter_local_notifications/flutter_local_notifications.dart';
8 | import 'package:get/get.dart';
9 |
10 | import '../../../firebase_options.dart';
11 | import '../utils/utils.dart';
12 |
13 | /// flutter_local_notifications: ^14.0.0+1
14 | class NotificationService extends GetxService {
15 | final localNotification = FlutterLocalNotificationsPlugin();
16 | AndroidNotificationChannel get androidNotifiChannel => const AndroidNotificationChannel(
17 | 'notify_app',
18 | 'my_default_notification_channel_id',
19 | description: 'Cái này là channel mặc định cho app',
20 | enableLights: true,
21 | importance: Importance.max,
22 | enableVibration: true,
23 | playSound: true,
24 | //sound: RawResourceAndroidNotificationSound('social_app_notification_sound'),
25 | // sound: UriAndroidNotificationSound('assets/sound/gmc_notification_sound.mp3')
26 | );
27 |
28 | Future notificationServiceInitialize() async {
29 | await _initLocalNotification();
30 |
31 | await _requestPermissionApp();
32 |
33 | // getDeviceFirebaseToken();
34 |
35 | firebaseMessagingForegroundHandler();
36 | }
37 |
38 | Future _initLocalNotification() async {
39 | // ở android, tạo channel cho notification
40 | await localNotification
41 | .resolvePlatformSpecificImplementation()
42 | ?.createNotificationChannel(androidNotifiChannel);
43 | //
44 |
45 | //setting notification
46 | const settings = InitializationSettings(
47 | android: AndroidInitializationSettings('@mipmap/ic_launcher'),
48 | // iOS: DarwinInitializationSettings(),
49 | );
50 |
51 | //add setting
52 | localNotification.initialize(
53 | settings,
54 | onDidReceiveNotificationResponse: (details) async {
55 | //bắt sự kiện click vào notification đẩy nó vào stream
56 | Printt.white('onDidReceiveNotificationResponse ${details.payload}');
57 | },
58 | onDidReceiveBackgroundNotificationResponse: onDidReceiveBackgroundNotificationResponse,
59 | );
60 | }
61 |
62 | // gửi yêu cầu đến người dùng cấp quyền cho app
63 | Future _requestPermissionApp() async {
64 | await FirebaseMessaging.instance.requestPermission(
65 | alert: true,
66 | announcement: true,
67 | badge: true,
68 | carPlay: true,
69 | criticalAlert: true,
70 | provisional: true,
71 | sound: true,
72 | );
73 | }
74 |
75 | Future getDeviceFirebaseToken() async {
76 | final token = await FirebaseMessaging.instance.getToken();
77 | Printt.cyan('TOKEN DEVICE: $token');
78 | return token;
79 | }
80 |
81 | Future showNotification(RemoteMessage message) async {
82 | ByteArrayAndroidBitmap? imageBitMap;
83 | if (message.data['image'] != null) {
84 | Uint8List bodyBytes = (await NetworkAssetBundle(Uri.parse(message.data['image'])).load(message.data['image'])).buffer.asUint8List();
85 |
86 | imageBitMap = ByteArrayAndroidBitmap.fromBase64String(base64Encode(bodyBytes));
87 | }
88 |
89 | return localNotification.show(
90 | message.messageId.hashCode,
91 | message.notification?.title,
92 | message.notification?.body,
93 | NotificationDetails(
94 | android: AndroidNotificationDetails(
95 | androidNotifiChannel.id,
96 | androidNotifiChannel.name,
97 | channelDescription: androidNotifiChannel.description,
98 | enableLights: androidNotifiChannel.enableLights,
99 | importance: androidNotifiChannel.importance,
100 | enableVibration: androidNotifiChannel.enableVibration,
101 | playSound: androidNotifiChannel.playSound,
102 | priority: Priority.max,
103 | sound: androidNotifiChannel.sound,
104 | icon: '@mipmap/ic_launcher',
105 | // largeIcon: const DrawableResourceAndroidBitmap('@mipmap/ic_launcher'),
106 | largeIcon: imageBitMap,
107 | styleInformation: imageBitMap != null ? BigPictureStyleInformation(imageBitMap) : null,
108 | ),
109 | // iOS: const DarwinNotificationDetails(),
110 | ),
111 | payload: message.data['payload'],
112 | );
113 | }
114 |
115 | void firebaseMessagingForegroundHandler() {
116 | FirebaseMessaging.onMessage.listen((RemoteMessage message) {
117 | if (message.notification != null) {
118 | Printt.white('show notification from ${message.from}}');
119 | showNotification(message);
120 | }
121 | });
122 | }
123 |
124 | @pragma('vm:entry-point')
125 | static Future firebaseMessagingBackgroundHandler(RemoteMessage message) async {
126 | // If you're going to use other Firebase services in the background, such as Firestore,
127 | // make sure you call `initializeApp` before using other Firebase services.
128 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
129 |
130 | Printt.white('Handling a background messagee: ${message.messageId}');
131 | }
132 |
133 | static void onDidReceiveBackgroundNotificationResponse(NotificationResponse details) {
134 | Printt.white('onDidReceiveBackgroundNotificationResponse ${details.payload}');
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/lib/app/core/services/translation_service.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:get/get.dart';
3 |
4 | import '../../../generated/locales.g.dart';
5 | import '../constants/app_constant.dart';
6 |
7 | // get generate locales assets/translations
8 | //nguồn: https://viblo.asia/p/getx-flutter-multiple-language-support-with-getx-part-3-GrLZDDqBZk0
9 | class TranslationService extends Translations {
10 | // locale sẽ được get mỗi khi mới mở app (phụ thuộc vào locale hệ thống hoặc bạn có thể cache lại locale mà người dùng đã setting và set nó ở đây)
11 | static Locale? locale = Get.deviceLocale;
12 | // fallbackLocale là locale default nếu locale được set không nằm trong những Locale support
13 | static const fallbackLocale = Locale('en', 'US');
14 | // các Locale được support
15 | static const locales = [
16 | Locale('en', 'US'),
17 | Locale('vi', 'VN'),
18 | Locale('ja', 'JP'),
19 | ];
20 |
21 | // function change language
22 | static void changeLocale(Locale localeee) {
23 | Get.updateLocale(localeee);
24 | locale = localeee;
25 | Global.sharedPreferences.setString(StorageConstants.langCode, localeee.languageCode);
26 | }
27 |
28 | static Future getLocaleFromLanguage() async {
29 | final langCode = Global.sharedPreferences.getString(StorageConstants.langCode);
30 |
31 | if (langCode == null) return Get.deviceLocale;
32 |
33 | for (int i = 0; i < locales.length; i++) {
34 | if (langCode == locales[i].languageCode) return locales[i];
35 | }
36 |
37 | return Get.deviceLocale;
38 | }
39 |
40 | @override
41 | Map> get keys => AppTranslation.translations;
42 | }
43 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/app_extension.dart:
--------------------------------------------------------------------------------
1 | export 'datetime_extension.dart';
2 | export 'iterable_extension.dart';
3 | export 'list_extension.dart';
4 | export 'map_extension.dart';
5 | export 'num_extension.dart';
6 | export 'string_extension.dart';
7 | export 'text_editing_controller_extension.dart';
8 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/datetime_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:intl/intl.dart';
2 |
3 | extension DateTimeExtension on DateTime {
4 | String toDateFormat() => DateFormat('yyyy-MM-dd').format(this);
5 |
6 | String timeAgoSinceDate({bool numericDates = true}) {
7 | final date2 = DateTime.now();
8 | final difference = date2.difference(this);
9 |
10 | if (difference.inDays > 8) {
11 | return toDateFormat();
12 | } else if ((difference.inDays / 7).floor() >= 1) {
13 | return (numericDates) ? '1 week ago' : 'Last week';
14 | } else if (difference.inDays >= 2) {
15 | return '${difference.inDays} days ago';
16 | } else if (difference.inDays >= 1) {
17 | return (numericDates) ? '1 day ago' : 'Yesterday';
18 | } else if (difference.inHours >= 2) {
19 | return '${difference.inHours} hours ago';
20 | } else if (difference.inHours >= 1) {
21 | return (numericDates) ? '1 hour ago' : 'An hour ago';
22 | } else if (difference.inMinutes >= 2) {
23 | return '${difference.inMinutes} minutes ago';
24 | } else if (difference.inMinutes >= 1) {
25 | return (numericDates) ? '1 minute ago' : 'A minute ago';
26 | } else if (difference.inSeconds >= 3) {
27 | return '${difference.inSeconds} seconds ago';
28 | } else {
29 | return 'Just now';
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/iterable_extension.dart:
--------------------------------------------------------------------------------
1 | //Searching List> in Dart
2 | extension FlattenFind on Iterable> {
3 | bool containsElement(T value) {
4 | for (final arr in this) {
5 | if (arr.contains(value)) return true;
6 | }
7 | return false;
8 | }
9 | }
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/list_extension.dart:
--------------------------------------------------------------------------------
1 | typedef Condition = bool Function();
2 |
3 | extension ListExtension on List {
4 | /// Provide access to the generic type at runtime.
5 | Type get subType => E;
6 | // Type typeOfElementsInList(List e) => T;
7 |
8 | //[100,5,2].reduce(plus); //=107
9 | T plus(T first, T second) => (first + second) as T;
10 | //[100,5,2].reduce(minus); //=97
11 | T minus(T first, T second) => (first - second) as T;
12 | //[100,5,2].reduce(multiphy); //=1000
13 | T multiphy(T first, T second) => (first * second) as T;
14 | //[100,5,2].reduce(divide); //=10
15 | T divide(T first, T second) {
16 | // ignore: unnecessary_type_check
17 | return ((first ~/ second) is int) ? (first ~/ second) as T : (first / second) as T;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/map_extension.dart:
--------------------------------------------------------------------------------
1 | import 'list_extension.dart';
2 |
3 | extension MapExtension on Map {
4 | Iterable> _filterr(bool Function(MapEntry entry) f) sync* {
5 | for (final entry in entries) {
6 | if (f(entry)) yield entry;
7 | }
8 | }
9 |
10 | //get list value with key
11 | List getValues(List keys) => keys.map((key) => this[key]!).toList();
12 | //get map value with key
13 | Map getMap(List keys) => Map.fromEntries(_filterr((entry) => keys.contains(entry.key)));
14 |
15 | //filter
16 | Map filter(bool Function(K key, V value) test) {
17 | final result = {};
18 | for (final entry in entries) {
19 | if (test(entry.key, entry.value)) result[entry.key] = entry.value;
20 | }
21 | return result;
22 | }
23 |
24 | //insert index
25 | void insert({required int index, required K key, required V value}) {
26 | final result = {};
27 | var i = 0;
28 | for (final entry in entries) {
29 | if (i == index) result[key] = value;
30 | result[entry.key] = entry.value;
31 | i++;
32 | }
33 | clear();
34 | addAll(result);
35 | }
36 |
37 | /// * if [addNew] is true, add new key
38 | ///
39 | /// * if [noCopyIfIsEmpty] is true, not copy if value is empty
40 | ///
41 | /// example:
42 | /// ```dart
43 | /// final map = {"1": "key1", "2": "key2"};
44 | /// final copy = {"1": "newKey1", "3": "addNewKey","empty":""};
45 | /// final result1 = map.copyWith(copy, addNew: true, noCopyIfIsEmpty: true);
46 | /// // {"1": "newKey1", "2": "key2", "3": "addNewKey"}
47 | /// final result2 = map.copyWith(copy, addNew: false, noCopyIfIsEmpty: true);
48 | /// // {"1": "newKey1", "2": "key2"}
49 | /// final result3 = map.copyWith(copy, addNew: true, noCopyIfIsEmpty: false);
50 | /// // {"1": "newKey1", "2": "key2", "3": "addNewKey", "empty": ""}
51 | /// final result4 = map.copyWith(copy, addNew: false, noCopyIfIsEmpty: false);
52 | /// // {"1": "newKey1", "2": "key2"}
53 | /// ```
54 | ///
55 | Map copyWith(Map copy, {bool addNew = false, bool noCopyIfIsEmpty = false}) {
56 | final result = Map.from(this);
57 | for (final entry in copy.entries) {
58 | if (!(noCopyIfIsEmpty && (entry.value == null || entry.value == '')) && (containsKey(entry.key) || addNew)) {
59 | result[entry.key] = entry.value;
60 | }
61 | }
62 | return result;
63 | }
64 |
65 | /// return key of element index
66 | /// ```dart
67 | /// final mapData = {
68 | /// "index1": "value1",
69 | /// "index2": "value2",
70 | /// "index3": "value3",
71 | /// "index4": "value4",
72 | /// "index5": "value5",
73 | /// };
74 | /// // swap data
75 | /// final keyOfIndex = mapData.keyOfIndex(3); //"index4"
76 | /// final removeIndex = mapData.remove(keyOfIndex!); //"value4"
77 | /// final newInsert = mapData.insert(index: 0, key: keyOfIndex, value: removeIndex!); //
78 | /// print(newInsert);// {"index4": "value4", "index1": "value1", "index2": "value2", "index3": "value3", "index5": "value5"}
79 | /// ```
80 | K? keyOfIndex(int index) {
81 | if (index < 0 || index >= length) return null;
82 | return keys.elementAt(index);
83 | }
84 |
85 | // from GetX
86 |
87 | void addIf(dynamic condition, K key, V value) {
88 | if (condition is Condition) condition = condition();
89 | if (condition is bool && condition) {
90 | this[key] = value;
91 | }
92 | }
93 |
94 | void addAllIf(dynamic condition, Map values) {
95 | if (condition is Condition) condition = condition();
96 | if (condition is bool && condition) addAll(values);
97 | }
98 |
99 | void assign(K key, V val) {
100 | clear();
101 | this[key] = val;
102 | }
103 |
104 | void assignAll(Map val) {
105 | if (this == val) return;
106 | clear();
107 | addAll(val);
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/num_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:intl/intl.dart';
2 |
3 | extension NumExtension on num {
4 | // Vietnam
5 | // NumberFormat.simpleCurrency(locale: 'vi-VN', decimalDigits: 2).format(10000) //10.000,00 ₫
6 | // NumberFormat.simpleCurrency(name: 'VND', decimalDigits: 2).format(10000) //₫10,000.00
7 |
8 | // String formatNumberMoney([String? symbol]) => NumberFormat.currency(customPattern: '#,### \u00a4', symbol: symbol, decimalDigits: 5).format(this);
9 | String formatNumber() => NumberFormat('#,###', 'en_US').format(this);
10 | String formatNumberCompact() => NumberFormat.compact(locale: 'en_US').format(this);
11 | }
12 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/string_extension.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:math';
3 |
4 | extension StringExtension on String {
5 | bool get isHexColor => RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(this);
6 |
7 | int toInt() => int.tryParse(replaceAll(',', '')) ?? 0;
8 |
9 | double toDouble() => double.tryParse(replaceAll(',', '')) ?? 0;
10 |
11 | num? toNumber() => num.tryParse(replaceAll(',', ''));
12 | //random String
13 | static String randomString(int length) {
14 | var random = Random();
15 | var values = List.generate(length, (i) => random.nextInt(256));
16 | return base64UrlEncode(values);
17 | }
18 |
19 | String toCapitalized() => length > 0 ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';
20 | String toTitleCase() => replaceAll(RegExp(' +'), ' ').split(' ').map((str) => str.toCapitalized()).join(' ');
21 | }
22 |
--------------------------------------------------------------------------------
/lib/app/core/utils/extension/text_editing_controller_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 |
4 | extension TextEditingControllerExtension on TextEditingController {
5 | void selectionAll() {
6 | if (selection.extentOffset != text.length) selection = TextSelection(baseOffset: 0, extentOffset: text.length);
7 | }
8 | }
--------------------------------------------------------------------------------
/lib/app/core/utils/helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:math';
3 |
4 | // import 'package:collection/collection.dart'; //sort AZ
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:intl/intl.dart';
8 |
9 | class Helper {
10 | static String tryFormatDateTime(String dateString) {
11 | if (dateString.isEmpty) {
12 | return '';
13 | }
14 | var inputDate = DateTime.tryParse(dateString);
15 | if (inputDate == null) return dateString;
16 | String output = DateFormat('dd-MM-yyyy').format(inputDate);
17 | return output;
18 | }
19 |
20 | //limitShowList
21 | static void limitShowList(List list, [int limit = 5]) => (list.length > limit) ? list.removeRange(limit, list.length) : null;
22 |
23 | static Color get randomColor => Colors.primaries[Random().nextInt(Colors.primaries.length)];
24 | // static Color get randomColorAccents => Colors.accents[Random().nextInt(Colors.accents.length)];
25 | static num randomNumber({num min = 0, required num max}) {
26 | if (max is double || min is double) {
27 | return min.toDouble() + Random().nextDouble() * (max.toDouble() - min.toDouble());
28 | }
29 | return min.toInt() + Random().nextInt(max.toInt() - min.toInt());
30 | }
31 |
32 | //List.separated count,generator,separator
33 | //input: cout=> 7, generator=> 1 , separator=> 0
34 | //output: [1,0,1,0,1,0,1]
35 | static List listGenerateSeparated(int count, {required T Function(int index) generator, required T Function(int index) separator}) {
36 | final List list = [];
37 | for (int i = 0; i < count; i++) {
38 | list.add(generator(i));
39 | if (i < count - 1) {
40 | list.add(separator(i));
41 | }
42 | }
43 | return list;
44 | }
45 |
46 | static Future readFileJson(String assets) async => jsonDecode(await rootBundle.loadString(assets));
47 |
48 | static bool containsToLowerCase(String? source, String? target) {
49 | if (source == null || target == null) return false;
50 | return source.toLowerCase().contains(target.toLowerCase());
51 | }
52 |
53 | static String generateIdFromDateTimeNow() => DateFormat('yyyyMMddHHmmssSSS').format(DateTime.now());
54 |
55 | static List