├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── example
└── chat_app
│ ├── .fvm
│ └── fvm_config.json
│ ├── .gitignore
│ ├── .metadata
│ ├── .vscode
│ ├── extensions.json
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
│ ├── Makefile
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── dev
│ │ │ │ │ └── plugfox
│ │ │ │ │ └── chat
│ │ │ │ │ ├── chat_app
│ │ │ │ │ └── MainActivity.kt
│ │ │ │ │ └── chatapp
│ │ │ │ │ └── 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
│ ├── build.yaml
│ ├── config
│ └── development.json
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── 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
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── lib
│ ├── main.dart
│ └── src
│ │ ├── common
│ │ ├── constant
│ │ │ └── pubspec.yaml.g.dart
│ │ ├── controller
│ │ │ ├── controller.dart
│ │ │ ├── controller_observer.dart
│ │ │ ├── droppable_controller_concurrency.dart
│ │ │ ├── sequential_controller_concurrency.dart
│ │ │ ├── state_consumer.dart
│ │ │ └── state_controller.dart
│ │ ├── localization
│ │ │ ├── generated
│ │ │ │ ├── intl
│ │ │ │ │ ├── messages_all.dart
│ │ │ │ │ └── messages_en.dart
│ │ │ │ └── l10n.dart
│ │ │ ├── intl_en.arb
│ │ │ └── localization.dart
│ │ ├── util
│ │ │ ├── error_util.dart
│ │ │ ├── logger_util.dart
│ │ │ └── platform
│ │ │ │ ├── error_util_js.dart
│ │ │ │ └── error_util_vm.dart
│ │ └── widget
│ │ │ ├── app.dart
│ │ │ ├── radial_progress_indicator.dart
│ │ │ └── window_scope.dart
│ │ └── feature
│ │ └── dependencies
│ │ ├── initialization
│ │ ├── initialization.dart
│ │ ├── initialize_dependencies.dart
│ │ └── platform
│ │ │ ├── initialization_js.dart
│ │ │ └── initialization_vm.dart
│ │ ├── model
│ │ └── dependencies.dart
│ │ └── widget
│ │ ├── dependencies_scope.dart
│ │ └── initialization_splash_screen.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
│ ├── 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
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ ├── test
│ └── widget_test.dart
│ ├── tool
│ └── makefile
│ │ ├── pub.mk
│ │ ├── setup.mk
│ │ └── test.mk
│ ├── 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
├── lib
└── chat.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── test.dart
/.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 |
46 | # Databases
47 | .sqlite
48 | .db
49 | .lock
50 |
51 | # Logs
52 | log.txt
53 |
54 | # Emulator
55 | emulator/
56 |
57 | # Temporary files
58 | temp/
59 | .temp/
60 |
61 | # Env
62 | .env*
63 |
64 | # Test
65 | coverage/
66 |
67 | # Flutter Version Manager
68 | .fvm/flutter_sdk
69 |
70 | # Generated files
71 |
72 | # Screenshots
73 | integration_test/screenshots/
74 |
75 | # Firebase
76 | .firebase/
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1-dev.placeholder
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Dual License Agreement
2 |
3 | This software ("The Package") is dual-licensed under both an open-source license and a commercial license.
4 |
5 | 1. Open-Source License
6 |
7 | For open-source projects that are distributed free of charge, The Package may be used under the terms of the MIT License, a copy of which can be found at https://opensource.org/licenses/MIT. By using The Package in an open-source project, you agree to the terms and conditions of the MIT License.
8 |
9 | 2. Commercial License
10 |
11 | For commercial projects, a separate commercial license must be purchased from the author. Commercial use of The Package without obtaining a valid commercial license from the author is strictly prohibited. To inquire about purchasing a commercial license, please contact the author at plugfox@gmail.com.
12 |
13 | The author reserves the right to change the terms of this dual license agreement at any time, without prior notice. By using The Package, you agree to be bound by the terms of this dual license agreement.
14 |
15 | Copyright (c) 2023 Matiunin Mikhail. All rights reserved.
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Chat
2 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | #include: package:flutter_lints/flutter.yaml
2 |
3 | # Analyzer options
4 | analyzer:
5 | # Exclude files from analysis. Must be relative to the root of the package.
6 | exclude:
7 | # Build
8 | - "build/**"
9 | # Tests
10 | - "test/**.mocks.dart"
11 | - ".test_coverage.dart"
12 | - "coverage/**"
13 | # Assets
14 | - "assets/**"
15 | # Flutter Version Manager
16 | - ".fvm/**"
17 | # Tools
18 | #- "tool/**"
19 | - "scripts/**"
20 | - ".dart_tool/**"
21 | # Platform
22 | - "ios/**"
23 | - "android/**"
24 | - "web/**"
25 | - "macos/**"
26 | - "windows/**"
27 | - "linux/**"
28 |
29 |
30 | # Enable the following options to enable strong mode.
31 | language:
32 | strict-casts: true
33 | strict-raw-types: true
34 | strict-inference: true
35 |
36 | # Enable the following options to enable new language features.
37 | #enable-experiment:
38 | # - patterns
39 | # - sealed-class
40 | # - records
41 | # - class-modifiers
42 | # - macros
43 | # - const-functions
44 | # - extension-types
45 | # - inference-update-2
46 | # - inline-class
47 | # - value-class
48 | # - variance
49 |
50 | # Set the following options to true to enable additional analysis.
51 | errors:
52 | # Info
53 | directives_ordering: info
54 | always_declare_return_types: info
55 |
56 | # Warning
57 | unsafe_html: warning
58 | no_logic_in_create_state: warning
59 | empty_catches: warning
60 | close_sinks: warning
61 |
62 | # Error
63 | always_use_package_imports: error
64 | avoid_relative_lib_imports: error
65 | avoid_slow_async_io: error
66 | avoid_types_as_parameter_names: error
67 | cancel_subscriptions: error
68 | valid_regexps: error
69 | always_require_non_null_named_parameters: error
70 |
71 | # Disable rules
72 |
73 | # Lint rules
74 | linter:
75 | rules:
76 | # Public packages
77 | public_member_api_docs: false
78 | lines_longer_than_80_chars: false
79 |
80 | # Enabling rules
81 | always_use_package_imports: true
82 | avoid_relative_lib_imports: true
83 |
84 | # Disable rules
85 | sort_pub_dependencies: false
86 | prefer_relative_imports: false
87 | curly_braces_in_flow_control_structures: false
--------------------------------------------------------------------------------
/example/chat_app/.fvm/fvm_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "flutterSdkVersion": "3.10.5",
3 | "flavors": {}
4 | }
5 |
--------------------------------------------------------------------------------
/example/chat_app/.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 |
46 | # Databases
47 | .sqlite
48 | .db
49 | .lock
50 |
51 | # Logs
52 | log.txt
53 |
54 | # Emulator
55 | emulator/
56 |
57 | # Temporary files
58 | temp/
59 | .temp/
60 |
61 | # Env
62 | .env*
63 |
64 | # Test
65 | coverage/
66 |
67 | # Flutter Version Manager
68 | .fvm/flutter_sdk
69 |
70 | # Generated files
71 |
72 | # Screenshots
73 | integration_test/screenshots/
74 |
75 | # Firebase
76 | .firebase/
77 |
78 |
--------------------------------------------------------------------------------
/example/chat_app/.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: 74e4b092e5212ebf8292dde2a48d3da960c0920b
8 | channel: beta
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
17 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
18 | - platform: android
19 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
20 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
21 | - platform: ios
22 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
23 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
24 | - platform: linux
25 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
26 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
27 | - platform: macos
28 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
29 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
30 | - platform: web
31 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
32 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
33 | - platform: windows
34 | create_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
35 | base_revision: 74e4b092e5212ebf8292dde2a48d3da960c0920b
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 |
--------------------------------------------------------------------------------
/example/chat_app/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["dart-code.dart-code", "Dart-Code.flutter"]
3 | }
4 |
--------------------------------------------------------------------------------
/example/chat_app/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "develop",
6 | "program": "lib/main.dart",
7 | "request": "launch",
8 | "type": "dart",
9 | "flutterMode": "debug",
10 | "env": {
11 | "ENVIRONMENT": "develop"
12 | },
13 | "args": [
14 | "--dart-define-from-file=config/development.json",
15 | /* "--enable-experiment=sealed-class,records,patterns,class-modifiers", */
16 | "--dart-define=ENVIRONMENT=development",
17 | "--web-renderer=html"
18 | ]
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/example/chat_app/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "[dart]": {
3 | "editor.insertSpaces": true,
4 | "editor.tabSize": 2,
5 | "editor.suggest.snippetsPreventQuickSuggestions": false,
6 | "editor.suggestSelection": "first",
7 | "editor.tabCompletion": "onlySnippets",
8 | "editor.wordBasedSuggestions": false,
9 | "editor.selectionHighlight": false,
10 | "editor.defaultFormatter": "Dart-Code.dart-code",
11 | "editor.formatOnSave": true,
12 | "editor.formatOnType": true,
13 | "editor.formatOnPaste": true,
14 | "editor.codeActionsOnSave": {
15 | "source.fixAll": true,
16 | "source.organizeImports": true
17 | },
18 | "editor.quickSuggestions": {
19 | "comments": "on",
20 | "strings": "on",
21 | "other": "on"
22 | },
23 | "editor.links": true,
24 | "editor.rulers": [120]
25 | },
26 | "dart.lineLength": 120,
27 | "dart.doNotFormat": ["**.g.dart", "**.config.dart", "**.mocks.dart"],
28 |
29 | // Flutter Version Manager
30 | "dart.flutterSdkPath": ".fvm/flutter_sdk",
31 |
32 | // Remove .fvm files from search
33 | "search.exclude": {
34 | //"**/.fvm": true,
35 | ".dart_tool": true,
36 | "coverage": true,
37 | "build": true
38 | },
39 |
40 | // Remove from file watching
41 | "files.watcherExclude": {
42 | "**/.fvm": true,
43 | ".dart_tool": true,
44 | "coverage": true,
45 | "build": true
46 | },
47 |
48 | // Causes the debug view to automatically appear when a breakpoint is hit. This
49 | // setting is global and not configurable per-language.
50 | "debug.openDebug": "openOnDebugBreak",
51 | "explorer.fileNesting.enabled": true,
52 | "explorer.fileNesting.expand": false,
53 | "explorer.fileNesting.patterns": {
54 | "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml, dart*.yaml, flutter*.yaml, icons_launcher.yaml",
55 | ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
56 | "readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
57 | "*.dart": "$(capture).g.dart, $(capture).freezed.dart, $(capture).config.dart"
58 | },
59 | "files.associations": {
60 | "*.drift": "sql"
61 | },
62 | "highlight.regexes": {
63 | "(\"@\\s*.+\":\\s{0,1}{},)": {
64 | "filterFileRegex": ".*\\.arb",
65 | "decorations": [
66 | {
67 | "overviewRulerColor": "#d19a66",
68 | "backgroundColor": "#d19a66",
69 | "color": "#282c34",
70 | "fontWeight": "bold"
71 | }
72 | ]
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/example/chat_app/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "windows": {},
4 | "tasks": [
5 | {
6 | "label": "Dependencies",
7 | "type": "shell",
8 | "command": ["fvm flutter pub get"],
9 | "group": {
10 | "kind": "none",
11 | "isDefault": true
12 | },
13 | "problemMatcher": []
14 | },
15 | {
16 | "label": "Codegeneration",
17 | "type": "shell",
18 | "dependsOn": ["Dependencies"],
19 | "command": [
20 | "fvm flutter pub run build_runner build --delete-conflicting-outputs"
21 | ],
22 | "group": {
23 | "kind": "none",
24 | "isDefault": true
25 | },
26 | "problemMatcher": []
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/example/chat_app/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: help
2 |
3 | # Script description and usage through `make` or `make help` commands
4 | help:
5 | @echo "Let's make something good"
6 | @fvm flutter --version
7 |
8 | -include tool/makefile/pub.mk tool/makefile/test.mk tool/makefile/setup.mk
--------------------------------------------------------------------------------
/example/chat_app/README.md:
--------------------------------------------------------------------------------
1 | # Chat App
2 |
3 | ## Code generation
4 |
5 | ```bash
6 | $ make codegen
7 | ```
8 |
9 | ## Localization
10 |
11 | ```bash
12 | $ code lib/src/common/localization/intl_en.arb
13 | $ make intl
14 | ```
15 |
16 | ## Recreating the project
17 |
18 | **! Warning: This will overwrite all files in the current directory.**
19 |
20 | ```bash
21 | fvm spawn beta create --overwrite -t app --project-name "chatapp" --org "dev.plugfox.chat" --description "The Chat App" --platforms ios,android,windows,linux,macos,web .
22 | ```
23 |
--------------------------------------------------------------------------------
/example/chat_app/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Analyzer options
4 | analyzer:
5 | # Exclude files from analysis. Must be relative to the root of the package.
6 | exclude:
7 | # Build
8 | - "build/**"
9 | # Tests
10 | - "test/**.mocks.dart"
11 | - ".test_coverage.dart"
12 | - "coverage/**"
13 | # Assets
14 | - "assets/**"
15 | # Generated
16 | - "lib/src/common/localization/generated/**"
17 | - "lib/src/common/constants/pubspec.yaml.g.dart"
18 | - "lib/src/common/model/generated/**"
19 | - "**.g.dart"
20 | - "**.gql.dart"
21 | - "**.freezed.dart"
22 | - "**.config.dart"
23 | - "**.mocks.dart"
24 | - "**.gen.dart"
25 | - "**.pb.dart"
26 | - "**.pbenum.dart"
27 | - "**.pbjson.dart"
28 | # Flutter Version Manager
29 | - ".fvm/**"
30 | # Tools
31 | #- "tool/**"
32 | - "scripts/**"
33 | - ".dart_tool/**"
34 | # Platform
35 | - "ios/**"
36 | - "android/**"
37 | - "web/**"
38 | - "macos/**"
39 | - "windows/**"
40 | - "linux/**"
41 |
42 |
43 | # Enable the following options to enable strong mode.
44 | language:
45 | strict-casts: true
46 | strict-raw-types: true
47 | strict-inference: true
48 |
49 | # Enable the following options to enable new language features.
50 | #enable-experiment:
51 | # - patterns
52 | # - sealed-class
53 | # - records
54 | # - class-modifiers
55 | # - macros
56 | # - const-functions
57 | # - extension-types
58 | # - inference-update-2
59 | # - inline-class
60 | # - value-class
61 | # - variance
62 |
63 | # Set the following options to true to enable additional analysis.
64 | errors:
65 | # Info
66 | directives_ordering: info
67 | always_declare_return_types: info
68 |
69 | # Warning
70 | unsafe_html: warning
71 | no_logic_in_create_state: warning
72 | empty_catches: warning
73 | close_sinks: warning
74 |
75 | # Error
76 | always_use_package_imports: error
77 | avoid_relative_lib_imports: error
78 | avoid_slow_async_io: error
79 | avoid_types_as_parameter_names: error
80 | cancel_subscriptions: error
81 | valid_regexps: error
82 | always_require_non_null_named_parameters: error
83 |
84 | # Disable rules
85 |
86 | # Lint rules
87 | linter:
88 | rules:
89 | # Public packages
90 | public_member_api_docs: false
91 | lines_longer_than_80_chars: false
92 |
93 | # Enabling rules
94 | always_use_package_imports: true
95 | avoid_relative_lib_imports: true
96 |
97 | # Disable rules
98 | sort_pub_dependencies: false
99 | prefer_relative_imports: false
100 | curly_braces_in_flow_control_structures: false
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "dev.plugfox.chat.chatapp"
27 | compileSdkVersion flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "dev.plugfox.chat.chatapp"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {
68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
69 | }
70 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/kotlin/dev/plugfox/chat/chat_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package dev.plugfox.chat.chatapp
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/kotlin/dev/plugfox/chat/chatapp/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package dev.plugfox.chat.chatapp
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/chat_app/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/chat_app/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.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/chat_app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | plugins {
14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15 | }
16 | }
17 |
18 | include ":app"
19 |
20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
21 |
--------------------------------------------------------------------------------
/example/chat_app/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | sources:
4 | - $package$
5 | - lib/**
6 | - pubspec.yaml
7 | - test/**
8 | builders:
9 | pubspec_generator:
10 | options:
11 | output: lib/src/common/constant/pubspec.yaml.g.dart
12 |
--------------------------------------------------------------------------------
/example/chat_app/config/development.json:
--------------------------------------------------------------------------------
1 | {
2 | "ENVIRONMENT": "development"
3 | }
4 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PlugFox/chat/fdb9450c17897c210a05b8779bd6728d4197e71b/example/chat_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/chat_app/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.
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Chat App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | chatapp
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 |
--------------------------------------------------------------------------------
/example/chat_app/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/chat_app/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 |
--------------------------------------------------------------------------------
/example/chat_app/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:chatapp/src/common/util/logger_util.dart';
4 | import 'package:chatapp/src/common/widget/app.dart';
5 | import 'package:chatapp/src/feature/dependencies/initialization/initialization.dart';
6 | import 'package:chatapp/src/feature/dependencies/widget/dependencies_scope.dart';
7 | import 'package:chatapp/src/feature/dependencies/widget/initialization_splash_screen.dart';
8 | import 'package:flutter/widgets.dart';
9 | import 'package:l/l.dart';
10 |
11 | void main() => l.capture(
12 | () => runZonedGuarded(
13 | () {
14 | final initialization = InitializationExecutor();
15 | runApp(
16 | DependenciesScope(
17 | initialization: initialization(),
18 | splashScreen: InitializationSplashScreen(
19 | progress: initialization,
20 | ),
21 | child: const App(),
22 | ),
23 | );
24 | },
25 | l.e,
26 | ),
27 | const LogOptions(
28 | handlePrint: true,
29 | messageFormatting: LoggerUtil.messageFormatting,
30 | outputInRelease: false,
31 | printColors: true,
32 | ),
33 | );
34 |
--------------------------------------------------------------------------------
/example/chat_app/lib/src/common/controller/controller.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/foundation.dart' show Listenable, ChangeNotifier;
4 | import 'package:meta/meta.dart';
5 |
6 | /// {@template controller}
7 | /// The controller responsible for processing the logic,
8 | /// the connection of widgets and the date of the layer.
9 | /// {@endtemplate}
10 | abstract interface class IController implements Listenable {
11 | /// Whether the controller is currently handling a requests
12 | bool get isProcessing;
13 |
14 | /// Discards any resources used by the object.
15 | ///
16 | /// This method should only be called by the object's owner.
17 | void dispose();
18 | }
19 |
20 | /// Controller observer
21 | abstract interface class IControllerObserver {
22 | /// Called when the controller is created.
23 | void onCreate(IController controller);
24 |
25 | /// Called when the controller is disposed.
26 | void onDispose(IController controller);
27 |
28 | /// Called on any state change in the controller.
29 | void onStateChanged(IController controller, Object prevState, Object nextState);
30 |
31 | /// Called on any error in the controller.
32 | void onError(IController controller, Object error, StackTrace stackTrace);
33 | }
34 |
35 | /// {@template controller}
36 | abstract base class Controller with ChangeNotifier implements IController {
37 | Controller() {
38 | runZonedGuarded(
39 | () => Controller.observer?.onCreate(this),
40 | (error, stackTrace) {/* ignore */},
41 | );
42 | }
43 |
44 | /// Controller observer
45 | static IControllerObserver? observer;
46 |
47 | bool get isDisposed => _$isDisposed;
48 | bool _$isDisposed = false;
49 |
50 | @protected
51 | void onError(Object error, StackTrace stackTrace) => runZonedGuarded(
52 | () => Controller.observer?.onError(this, error, stackTrace),
53 | (error, stackTrace) {/* ignore */},
54 | );
55 |
56 | @protected
57 | void handle(FutureOr Function() handler);
58 |
59 | @override
60 | @mustCallSuper
61 | void dispose() {
62 | _$isDisposed = true;
63 | runZonedGuarded(
64 | () => Controller.observer?.onDispose(this),
65 | (error, stackTrace) {/* ignore */},
66 | );
67 | super.dispose();
68 | }
69 |
70 | @protected
71 | @nonVirtual
72 | @override
73 | void notifyListeners() => super.notifyListeners();
74 | }
75 |
--------------------------------------------------------------------------------
/example/chat_app/lib/src/common/controller/controller_observer.dart:
--------------------------------------------------------------------------------
1 | import 'package:chatapp/src/common/controller/controller.dart';
2 | import 'package:l/l.dart';
3 |
4 | class ControllerObserver implements IControllerObserver {
5 | @override
6 | void onCreate(IController controller) {
7 | l.v6('Controller | ${controller.runtimeType} | Created');
8 | }
9 |
10 | @override
11 | void onDispose(IController controller) {
12 | l.v5('Controller | ${controller.runtimeType} | Disposed');
13 | }
14 |
15 | @override
16 | void onStateChanged(IController controller, Object prevState, Object nextState) {
17 | l.d('Controller | ${controller.runtimeType} | $prevState -> $nextState');
18 | }
19 |
20 | @override
21 | void onError(IController controller, Object error, StackTrace stackTrace) {
22 | l.w('Controller | ${controller.runtimeType} | $error', stackTrace);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/chat_app/lib/src/common/controller/droppable_controller_concurrency.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:chatapp/src/common/controller/controller.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | base mixin DroppableControllerConcurrency on Controller {
7 | @override
8 | @nonVirtual
9 | bool get isProcessing => _$processingCalls > 0;
10 | int _$processingCalls = 0;
11 |
12 | @override
13 | @protected
14 | @mustCallSuper
15 | void handle(
16 | FutureOr Function() handler, [
17 | FutureOr Function()? errorHandler,
18 | FutureOr Function()? doneHandler,
19 | ]) =>
20 | runZonedGuarded(
21 | () async {
22 | if (isDisposed || isProcessing) return;
23 | _$processingCalls++;
24 | try {
25 | await handler();
26 | } on Object catch (error, stackTrace) {
27 | onError(error, stackTrace);
28 | await Future(() async {
29 | await errorHandler?.call();
30 | }).catchError(onError);
31 | } finally {
32 | await Future(() async {
33 | await doneHandler?.call();
34 | }).catchError(onError);
35 | _$processingCalls--;
36 | }
37 | },
38 | onError,
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/example/chat_app/lib/src/common/controller/sequential_controller_concurrency.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:collection';
3 |
4 | import 'package:chatapp/src/common/controller/controller.dart';
5 | import 'package:meta/meta.dart';
6 |
7 | base mixin SequentialControllerConcurrency on Controller {
8 | final _ControllerEventQueue _eventQueue = _ControllerEventQueue();
9 |
10 | @override
11 | @nonVirtual
12 | bool get isProcessing => _eventQueue.length > 0;
13 |
14 | @override
15 | @protected
16 | @mustCallSuper
17 | void handle(
18 | FutureOr Function() handler, [
19 | FutureOr Function()? errorHandler,
20 | FutureOr Function()? doneHandler,
21 | ]) =>
22 | _eventQueue.push(
23 | () {
24 | final completer = Completer();
25 | runZonedGuarded(
26 | () async {
27 | if (isDisposed) return;
28 | try {
29 | await handler();
30 | } on Object catch (error, stackTrace) {
31 | onError(error, stackTrace);
32 | await Future(() async {
33 | await errorHandler?.call();
34 | }).catchError(onError);
35 | } finally {
36 | await Future(() async {
37 | await doneHandler?.call();
38 | }).catchError(onError);
39 | completer.complete();
40 | }
41 | },
42 | onError,
43 | );
44 | return completer.future;
45 | },
46 | );
47 | }
48 |
49 | /// {@nodoc}
50 | final class _ControllerEventQueue {
51 | /// {@nodoc}
52 | _ControllerEventQueue();
53 |
54 | final DoubleLinkedQueue<_SequentialTask