├── .editorconfig
├── .env
├── .gitignore
├── .metadata
├── .vscode
├── launch.json
└── settings.json
├── CHANGELOG.md
├── README.md
├── README_ZH.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── fluttertemplate
│ │ │ │ └── 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
├── animations
│ ├── acqua_text_out_of_band.riv
│ ├── loader.flr
│ └── lottie
│ │ ├── 18582-as-the-waters-rise.json
│ │ └── 29056-nepenthe-illustration.json
├── audio
│ ├── Beethoven__Moonlight_Sonata.mid
│ ├── chenicheng.xml
│ ├── tapbutton.mp3
│ └── viper.mp3
├── images
│ ├── back.png
│ ├── back2.png
│ ├── bian.png
│ ├── ifredom.jpg
│ ├── loginbg.png
│ ├── tab_1.png
│ ├── tab_1s.png
│ ├── tab_2.png
│ ├── tab_2s.png
│ ├── tab_3.png
│ ├── tab_3s.png
│ ├── tab_4.png
│ └── tab_4s.png
├── lang
│ ├── en.json
│ └── zh.json
├── sounds
│ └── Piano.sf2
└── webview
│ ├── demo
│ ├── Beethoven_AnDieFerneGeliebte.xml
│ ├── demo.css
│ ├── favicon.ico
│ ├── index.html
│ ├── index.js
│ ├── indexbake.html
│ └── opensheetmusicdisplay.min.js
│ └── dist
│ ├── css
│ ├── app.d40fc157.css
│ └── chunk-904b882c.f05ad106.css
│ ├── favicon.ico
│ ├── index.html
│ ├── js
│ ├── app.11b6c626.js
│ ├── chunk-904b882c.b0e0c1c6.js
│ └── chunk-vendors.2b3a5ceb.js
│ └── musicXML
│ ├── Beethoven_AnDieFerneGeliebte.xml
│ ├── Mozart_DasVeilchen.xml
│ └── MuzioClementi_SonatinaOpus36No1_Part1.xml
├── copy-app.js
├── devtools_options.yaml
├── docs
└── issuse.md
├── et --softq
├── flutter tips.md
├── 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
├── core
│ ├── app
│ │ ├── app.bottomsheets.dart
│ │ ├── app.dart
│ │ ├── app.dialogs.dart
│ │ ├── app.locator.dart
│ │ ├── app.logger.dart
│ │ └── app.router.dart
│ ├── constants
│ │ ├── animations.dart
│ │ ├── app_theme.dart
│ │ ├── component_state.dart
│ │ ├── constants.dart
│ │ └── formatter_text.dart
│ ├── localization
│ │ ├── localization.dart
│ │ └── setup_local.dart
│ ├── managers
│ │ ├── lifecycle_manager.dart
│ │ └── restart_manager.dart
│ ├── model
│ │ ├── app_models.dart
│ │ ├── school
│ │ │ ├── school.dart
│ │ │ ├── school.g.dart
│ │ │ ├── student.dart
│ │ │ ├── student.g.dart
│ │ │ ├── teacher.dart
│ │ │ └── teacher.g.dart
│ │ ├── serializers.dart
│ │ ├── serializers.g.dart
│ │ └── userinfo
│ │ │ ├── user.dart
│ │ │ ├── user.g.dart
│ │ │ ├── user_local.dart
│ │ │ └── user_local.g.dart
│ ├── services
│ │ ├── api
│ │ │ ├── apicode
│ │ │ │ ├── api.dart
│ │ │ │ └── whiteList.dart
│ │ │ ├── common
│ │ │ │ ├── code.dart
│ │ │ │ ├── exception_handle.dart
│ │ │ │ └── result_data.dart
│ │ │ ├── exceptions
│ │ │ │ └── network_exception.dart
│ │ │ ├── http_service.dart
│ │ │ ├── http_service_impl.dart
│ │ │ └── interceptors
│ │ │ │ ├── api_interceptor.dart
│ │ │ │ ├── error_interceptor.dart
│ │ │ │ ├── header_interceptor.dart
│ │ │ │ ├── log_interceptor.dart
│ │ │ │ ├── net_cache.dart
│ │ │ │ └── token_interceptor.dart
│ │ ├── app_settings_service.dart
│ │ ├── auth_service.dart
│ │ ├── connectivity_service.dart
│ │ ├── environment_service.dart
│ │ ├── file_helper.dart
│ │ ├── hardware_info_service.dart
│ │ ├── hive
│ │ │ ├── hive_service.dart
│ │ │ └── hive_service_impl.dart
│ │ ├── keyboard_service.dart
│ │ ├── local_storage_service.dart
│ │ ├── share_service.dart
│ │ ├── stoppable_service.dart
│ │ └── url_service.dart
│ └── utils
│ │ ├── common
│ │ ├── color_utils.dart
│ │ ├── network_utils.dart
│ │ ├── text_utils.dart
│ │ └── validators.dart
│ │ └── res
│ │ ├── assets.dart
│ │ ├── colors.dart
│ │ ├── dimens.dart
│ │ ├── gaps.dart
│ │ ├── local_storage_keys.dart
│ │ ├── locale_keys.dart
│ │ └── styles.dart
├── main.dart
└── ui
│ ├── common
│ ├── app_colors.dart
│ ├── app_strings.dart
│ └── ui_helpers.dart
│ ├── views
│ ├── 404.dart
│ ├── error_page.dart
│ ├── home
│ │ ├── first_view
│ │ │ ├── first_view.dart
│ │ │ └── title_view.dart
│ │ ├── forth_view
│ │ │ └── forth_view.dart
│ │ ├── home_view
│ │ │ ├── home.dart
│ │ │ └── home_view_model.dart
│ │ ├── second_view
│ │ │ └── second_view.dart
│ │ └── third_view
│ │ │ └── third_view.dart
│ ├── login
│ │ ├── login_phone_view.dart
│ │ ├── login_phone_view_model.dart
│ │ ├── login_view.dart
│ │ └── login_view_model.dart
│ ├── product_detail
│ │ └── product_detail_view.dart
│ ├── register
│ │ └── register_view.dart
│ ├── root_component.dart
│ ├── start_up
│ │ ├── start_up_view.dart
│ │ └── start_up_view_model.dart
│ └── update
│ │ ├── update_view.dart
│ │ └── update_viewmodel.dart
│ └── widgets
│ ├── DoubleBackExitApp
│ ├── DoubleBackExitApp.dart
│ └── TipsScaleAnimated.dart
│ ├── appbar
│ └── custom_appbar.dart
│ ├── bottombar
│ ├── bottom_bar_view.dart
│ └── tab_icon_data.dart
│ ├── buttons
│ ├── gradient_button.dart
│ └── image_background_button.dart
│ ├── custom
│ ├── base_dialog_wrapper.dart
│ ├── default_page_transition.dart
│ ├── lazy_index_stack.dart
│ ├── page_route_animation.dart
│ ├── screen.dart
│ └── ui_helpers.dart
│ ├── dialogs
│ ├── confirm_dialog.dart
│ └── info_alert
│ │ ├── info_alert_dialog.dart
│ │ └── info_alert_dialog_model.dart
│ ├── drawer
│ ├── drawer_user_controller.dart
│ ├── example.dart
│ └── home_drawer.dart
│ ├── loading
│ └── loading_animation.dart
│ ├── notice
│ ├── notice_sheet.dart
│ └── notice_sheet_model.dart
│ ├── popup
│ └── popup.dart
│ ├── routeanimation
│ └── page_route_anim.dart
│ ├── skeleton
│ └── skeleton.dart
│ ├── slider
│ ├── base_slider.dart
│ └── demo.dart
│ ├── switchanimation
│ └── animated_provider.dart
│ └── textfield
│ └── text_field.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
├── package.json
├── pubspec.lock
├── pubspec.yaml
├── stacked.json
├── test
├── helpers
│ ├── test_helpers.dart
│ └── test_helpers.mocks.dart
├── viewmodels
│ ├── home_viewmodel_test.dart
│ ├── info_alert_dialog_model_test.dart
│ └── notice_sheet_model_test.dart
└── 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
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | charset = utf-8
7 | trim_trailing_whitespace = false
8 | insert_final_newline = false
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | AUTHOR=IFREDOM
2 | DEV=DEVPLONMENT
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 | /android/app/build
48 |
--------------------------------------------------------------------------------
/.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 and should not be manually edited.
5 |
6 | version:
7 | revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "flutter-template-perfect",
9 | "request": "launch",
10 | "type": "dart"
11 | },
12 | {
13 | "name": "flutter-template-perfect (profile mode)",
14 | "request": "launch",
15 | "type": "dart",
16 | "flutterMode": "profile"
17 | },
18 | {
19 | "name": "flutter-template-perfect (release mode)",
20 | "request": "launch",
21 | "type": "dart",
22 | "flutterMode": "release"
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.configuration.updateBuildConfiguration": "disabled"
3 | }
4 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # changelog(更新日志)
2 |
3 | ## [1.1.0] - 2024-06-13
4 |
5 | ### new feature
6 |
7 | - update flutter sdk to 3.22.0
8 | - update all package dependencies version
9 |
10 |
--------------------------------------------------------------------------------
/README_ZH.md:
--------------------------------------------------------------------------------
1 | # 模板
2 |
3 | 这是一个 flutter 完整商用项目模板
4 |
5 | ## 开始
6 |
7 | ```bash
8 | # 开发
9 | > flutter run
10 |
11 | # 通过指定入口文件运行
12 | > flutter run --target ex/exMain.dart
13 |
14 | # 构建
15 | > flutter build apk
16 | ```
17 |
18 | ### 核心功能
19 |
20 | - stacked (MVVM 架构)
21 | - route (路由)基于 `auto_route` ,由 **build_runner** 自动生成 ,
22 | - service (服务)基于 `get_it, stacked_service`,内置十种基础懒加载服务 [NavigationService,DialogService,BottomSheetService,SnackbarService] [ConnectivityService,OpenLinkService,ShareService,FileService,LocalStorageService...]
23 | - model (模型)基于 `built_value` ,由 **build_runner** 自动生成
24 | - localization (国际化)基于 `flutter_localizations`,内置中英文 [en,zh],只需在 **assets/lang** 定义
25 | - common utils(常用函数)位于 utils,内置常见颜色,尺寸[Colour,Distance,validators]
26 |
27 | ### 1. [MVVM 架构](https://pub.flutter-io.cn/packages/stacked)
28 |
29 | - 一个文件管理 Ui eg: **XX_view.dart**
30 | - 一个文件管理数据 eg: **XX_view_model.dart**
31 |
32 | ### 2. [服务](https://pub.flutter-io.cn/packages/get_it)
33 |
34 | - NavigationService: 路由服务,控制路由跳转,数据传输,路由监听。路由由指令自动生成。
35 | - DialogService: 对话框服务,默认对话框,可定制 UI
36 | - BottomSheetService: 应用底部提示框服务,可定制 UI
37 | - SnackbarService: 应用顶部提示框服务,可定制 UI
38 |
39 | - ConnectivityService :连接服务。应用是否处于前台或缩放到后台。监听应用生命周期。使用包 `connectivity_plus`
40 | - OpenLinkService : 通过链接打开一个 App. 使用包 `url_launcher`
41 | - ShareService : 分享. 使用包 `share`
42 | - FileService : 文件上传下载保存服务. 使用包 `path_provider`
43 | - LocalStorageService : 本地存储服务. 使用包 `shared_preferences`
44 | - AppSettingsService : 打开 APP 设置服务. 使用包 `app_settings`
45 | - EnvironmentService : 开发/产品 环境服务. 使用包 `flutter_dotenv`
46 | - device_info_plus : 获取设备信息服务. 使用包 `device_info_plus`
47 | - KeyboardService : 获取键盘状态服务. 使用包 `flutter_keyboard_visibility`
48 | - HttpService : Http 接口请求服务. 使用包 `dio`
49 | - StoppableService : 停止服务. 对已启动得服务进行控制管理,停用已经启用得服务
50 |
51 |
62 |
63 | ## 自动生成 数据模型
64 |
65 | > 在 cmd 中,项目根目录下运行以下指令:
66 |
67 | ```bash
68 | > flutter packages pub run build_runner build --delete-conflicting-outputs
69 |
70 | # or(或者)
71 |
72 | > flutter packages pub run build_runner watch
73 | ```
74 |
75 | ## 自动生成 路由,定位,日志模型
76 |
77 | > 在 cmd 中,项目根目录下运行以下指令:
78 |
79 | ```bash
80 | # 根据 core/app/app.dart 生成 路由,定位,日志模型文件
81 | # 生成结果位于 /core/app/
82 | > flutter pub run build_runner build --delete-conflicting-outputs stacked generate
83 | ```
84 |
--------------------------------------------------------------------------------
/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 | analyzer:
11 | errors:
12 | avoid_print: ignore
13 | constant_identifier_names: ignore
14 | include: package:flutter_lints/flutter.yaml
15 |
16 | linter:
17 | # The lint rules applied to this project can be customized in the
18 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
19 | # included above or to enable additional rules. A list of all available lints
20 | # and their documentation is published at
21 | # https://dart-lang.github.io/linter/lints/index.html.
22 | #
23 | # Instead of disabling a lint rule for the entire project in the
24 | # section below, it can also be suppressed for a single line of code
25 | # or a specific dart file by using the `// ignore: name_of_lint` and
26 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
27 | # producing the lint.
28 | rules:
29 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
30 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
31 |
32 | # Additional information about this file can be found at
33 | # https://dart.dev/guides/language/analysis-options
34 |
--------------------------------------------------------------------------------
/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 | 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 = "com.example.fluttertemplate"
27 | compileSdk = flutter.compileSdkVersion
28 | ndkVersion = "25.2.9519653"
29 | // ndkVersion = flutter.ndkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility = JavaVersion.VERSION_11
33 | targetCompatibility = JavaVersion.VERSION_11
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId = "com.example.fluttertemplate"
39 | // You can update the following values to match your application needs.
40 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41 | minSdk = flutter.minSdkVersion
42 | targetSdk = flutter.targetSdkVersion
43 | versionCode = flutterVersionCode.toInteger()
44 | versionName = flutterVersionName
45 | }
46 |
47 | buildTypes {
48 | release {
49 | // TODO: Add your own signing config for the release build.
50 | // Signing with the debug keys for now, so `flutter run --release` works.
51 | signingConfig = signingConfigs.debug
52 | }
53 | }
54 | }
55 |
56 | flutter {
57 | source = "../.."
58 | }
59 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/fluttertemplate/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.fluttertemplate
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | // maven { url 'https://maven.aliyun.com/repository/google' }
6 | // maven { url 'https://maven.aliyun.com/repository/jcenter' }
7 | // maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
8 |
9 | }
10 | }
11 |
12 | rootProject.buildDir = "../build"
13 | subprojects {
14 | project.layout.buildDirectory = rootProject.layout.buildDirectory.dir(project.name)
15 | project.evaluationDependsOn(':app')
16 | }
17 |
18 | tasks.register("clean", Delete) {
19 | delete rootProject.buildDir
20 | }
21 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
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.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/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 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/assets/animations/acqua_text_out_of_band.riv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/animations/acqua_text_out_of_band.riv
--------------------------------------------------------------------------------
/assets/animations/loader.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/animations/loader.flr
--------------------------------------------------------------------------------
/assets/audio/Beethoven__Moonlight_Sonata.mid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/audio/Beethoven__Moonlight_Sonata.mid
--------------------------------------------------------------------------------
/assets/audio/tapbutton.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/audio/tapbutton.mp3
--------------------------------------------------------------------------------
/assets/audio/viper.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/audio/viper.mp3
--------------------------------------------------------------------------------
/assets/images/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/back.png
--------------------------------------------------------------------------------
/assets/images/back2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/back2.png
--------------------------------------------------------------------------------
/assets/images/bian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/bian.png
--------------------------------------------------------------------------------
/assets/images/ifredom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/ifredom.jpg
--------------------------------------------------------------------------------
/assets/images/loginbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/loginbg.png
--------------------------------------------------------------------------------
/assets/images/tab_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_1.png
--------------------------------------------------------------------------------
/assets/images/tab_1s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_1s.png
--------------------------------------------------------------------------------
/assets/images/tab_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_2.png
--------------------------------------------------------------------------------
/assets/images/tab_2s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_2s.png
--------------------------------------------------------------------------------
/assets/images/tab_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_3.png
--------------------------------------------------------------------------------
/assets/images/tab_3s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_3s.png
--------------------------------------------------------------------------------
/assets/images/tab_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_4.png
--------------------------------------------------------------------------------
/assets/images/tab_4s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/images/tab_4s.png
--------------------------------------------------------------------------------
/assets/lang/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "app-title": "Title",
3 | "confirm-dialog-title": "Tips",
4 | "home-view-title": "Home",
5 | "home-view-no-posts": "No posts available",
6 | "settings-view-title": "Settings",
7 | "settings-view-permissions": "Permissions",
8 | "settings-view-permissions-desc": "Open App Permissions",
9 | "settings-view-app-settings": "App Settings",
10 | "settings-view-app-settings-desc": "Open App Settings",
11 | "settings-view-notifications": "Notifications",
12 | "settings-view-notifications-desc": "Enable Notifications",
13 | "settings-view-location": "Current location",
14 | "settings-view-sign-out": "Sign out",
15 | "settings-view-sign-out-desc": "Sign out of the app",
16 | "settings-view-snack-bar": "Snack Bar",
17 | "settings-view-snack-bar-desc": "Show Snack Bar",
18 | "login-view-title": "Login",
19 | "login-button": "Login",
20 | "button-cancel": "Cancel",
21 | "button-confirm": "Confirm",
22 | "email-hint": "Email",
23 | "password-hint": "Password",
24 | "invalid-email": "Invalid email",
25 | "invalid-phone-number": "Invalid phone number",
26 | "invalid-zip-code": "Invalid zip code",
27 | "password-empty": "Password is required",
28 | "password-short": "Password must be more than 6 characters",
29 | "snackbar-message": "SnackBar message",
30 | "snackbar-action": "Action",
31 | "invalid-postal-idcard": "invalid postal idcard"
32 | }
33 |
--------------------------------------------------------------------------------
/assets/lang/zh.json:
--------------------------------------------------------------------------------
1 | {
2 | "app-title": "享弹",
3 | "confirm-dialog-title": "提示",
4 | "home-view-title": "首页",
5 | "home-view-no-posts": "没有更多数据",
6 | "settings-view-title": "Settings",
7 | "settings-view-permissions": "Permissions",
8 | "settings-view-permissions-desc": "Open App Permissions",
9 | "settings-view-app-settings": "App Settings",
10 | "settings-view-app-settings-desc": "Open App Settings",
11 | "settings-view-notifications": "Notifications",
12 | "settings-view-notifications-desc": "Enable Notifications",
13 | "settings-view-location": "Current location",
14 | "settings-view-sign-out": "Sign out",
15 | "settings-view-sign-out-desc": "Sign out of the app",
16 | "settings-view-snack-bar": "Snack Bar",
17 | "settings-view-snack-bar-desc": "Show Snack Bar",
18 | "login-view-title": "Login",
19 | "login-button": "登录",
20 | "button-cancel": "取消",
21 | "button-confirm": "确定",
22 | "email-hint": "Email",
23 | "password-hint": "密码",
24 | "invalid-email": "不可用 email",
25 | "invalid-phone-number": "手机号码不正确",
26 | "invalid-zip-code": "不正确得压缩码",
27 | "password-empty": "必须输入密码",
28 | "password-short": "密码不能少于6位数",
29 | "snackbar-message": "SnackBar 通知",
30 | "snackbar-action": "SnackBar 操作",
31 | "invalid-postal-idcard": "身份证号码不正确"
32 | }
--------------------------------------------------------------------------------
/assets/sounds/Piano.sf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/sounds/Piano.sf2
--------------------------------------------------------------------------------
/assets/webview/demo/demo.css:
--------------------------------------------------------------------------------
1 | p {
2 | margin: 0px 8px 8px 8px;
3 | }
4 |
5 | /* the select widths are not used for some reason, even if we don't set the style in index.html */
6 | select {
7 | width: 100px;
8 | margin: 2px 8px 8px 8px;
9 | }
10 |
11 | #selectSample {
12 | width: 320px;
13 | }
14 |
15 | #selectBounding {
16 | width: 80%;
17 | }
18 |
19 | .bignum {
20 | width: 1em;
21 | text-align: center;
22 | font-size: 4em;
23 | color: white;
24 | background-color: black;
25 | padding: 0.3em;
26 | border-right: 0.3em solid white;
27 | }
28 |
29 | #error-tr {
30 | background-color: red;
31 | text-align: center;
32 | }
33 |
34 | #error-td {
35 | padding: 1em;
36 | color: white;
37 | }
38 |
39 | table {
40 | width: 100%;
41 | }
42 |
--------------------------------------------------------------------------------
/assets/webview/demo/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/webview/demo/favicon.ico
--------------------------------------------------------------------------------
/assets/webview/demo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jquery加载 demo
8 |
9 |
10 |
14 |
18 |
19 |
24 |
30 |
31 |
32 | 哈哈哈哈
33 |
34 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/assets/webview/dist/css/app.d40fc157.css:
--------------------------------------------------------------------------------
1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}
--------------------------------------------------------------------------------
/assets/webview/dist/css/chunk-904b882c.f05ad106.css:
--------------------------------------------------------------------------------
1 | .page-wrapper[data-v-a3065b40]{width:100%;height:auto}
--------------------------------------------------------------------------------
/assets/webview/dist/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/assets/webview/dist/favicon.ico
--------------------------------------------------------------------------------
/assets/webview/dist/index.html:
--------------------------------------------------------------------------------
1 | pianoapp
--------------------------------------------------------------------------------
/copy-app.js:
--------------------------------------------------------------------------------
1 | // test.js
2 | var { exec } = require("child_process");
3 | const fs = require("fs");
4 | const path = require("path");
5 |
6 | var targetPath = "build/app/outputs/apk/release";
7 | var cli = "cd " + targetPath;
8 | var APP_NAME = "app-release.apk";
9 | exec(cli, { encoding: "utf8" }, function (err, stdout, stderr) {
10 | if (err) {
11 | console.log(err);
12 | return;
13 | }
14 | copyFile(resolvePath(targetPath, APP_NAME), resolvePath("./", APP_NAME));
15 | });
16 |
17 | function resolvePath(filePath, fileName) {
18 | return path.resolve(filePath, fileName);
19 | }
20 | function copyFile(source, target) {
21 | fs.writeFileSync(target, fs.readFileSync(source));
22 | }
23 |
--------------------------------------------------------------------------------
/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | description: This file stores settings for Dart & Flutter DevTools.
2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
3 | extensions:
4 |
--------------------------------------------------------------------------------
/docs/issuse.md:
--------------------------------------------------------------------------------
1 | # issuse
2 |
3 |
4 | ## 1.One or more plugins require a higher Android NDK version.
5 |
6 |
7 | change: android/app/build.gradle
8 |
9 | ```bash
10 | android {
11 | # from here
12 | // ndkVersion = flutter.ndkVersion
13 | # change to
14 | ndkVersion = "25.2.9519653"
15 |
16 | ...
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/flutter tips.md:
--------------------------------------------------------------------------------
1 | # Flutter 支持通过自动选择 DPI 依赖资源来加载资产
2 |
3 | https://flutter.dev/docs/development/ui/assets-and-images#declaring-resolution-aware-image-assets
4 |
5 | ## 错误处理方式
6 |
7 | https://github.com/cfug/flutter.cn/blob/3ef3c8cfb6e69f5842c3a566931f514c0b945837/src/docs/testing/errors.md
8 |
9 | ## 错误解决
10 |
11 | 1. MissingPluginException (MissingPluginException(No implementation found for method check on channel plugins.flutter.io/connectivity)) => 解决办法:新建项目,旧代码移动到全新项目
12 |
13 | ## built_value
14 |
15 | https://stackoverflow.com/questions/64876381/how-to-build-a-list-using-built-value
16 |
17 | ## keymap 快捷方式
18 |
19 | win + E 打开资源管理器
20 |
21 | ## 经验
22 |
23 | BottomNavigationBar + PageView 比用 BottomNavigationBar + IndexedStack 好一点,不用一次性加载完所有 page
24 |
25 |
26 |
27 | ## andorid 问题集锦
28 |
29 | ## android studio plugin 下载很慢,总是超时
30 |
31 | 直接去[插件市场下载](https://plugins.jetbrains.com/),下载之后解压到 androidstudio 安装目录 plugins 文件夹下
32 |
33 | ## 编译出错怎么查看更多信息
34 |
35 | 安卓采用 Gradle 进行构建,所以当出错后我们自然使用 Gradle 查看更多信息,那么 Gradle 在哪里呢?
36 |
37 | ```bash
38 | // 在你的项目路径下的这里
39 | ./android/gradlew
40 | ```
41 |
42 | ```bash
43 | PS >./android/gradlew compileDebug --stacktrace -info
44 | ```
45 |
46 | ## Gradle 错误, 通过 AS 打开 flutter 项目中的 android 文件夹,在 AS 右上侧面有一个 gradle 菜单,点击 Toogle Offline Mode
47 |
48 | ### [布局约束](https://www.jianshu.com/p/b956b8a37012)
49 |
50 |
51 | ### “error: cannot find symbol” when building for Android in flutter
52 |
53 | > flutterEngine.getPlugins().add(new com.example.appsettings.AppSettingsPlugin());
54 | https://stackoverflow.com/questions/66305553/error-cannot-find-symbol-when-building-for-android-in-flutter
55 |
--------------------------------------------------------------------------------
/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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/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.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 Flutter
2 | import UIKit
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/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ifredom/flutter-template-perfect/c7a13b05b3dcacf18454eca729bfd626806d81a2/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/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Fluttertemplate
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | fluttertemplate
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 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/core/app/app.bottomsheets.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | // **************************************************************************
4 | // StackedBottomsheetGenerator
5 | // **************************************************************************
6 |
7 | import 'package:stacked_services/stacked_services.dart';
8 |
9 | import 'app.locator.dart';
10 | import '../../ui/widgets/notice/notice_sheet.dart';
11 |
12 | enum BottomSheetType {
13 | notice,
14 | }
15 |
16 | void setupBottomSheetUi() {
17 | final bottomsheetService = locator();
18 |
19 | final Map builders = {
20 | BottomSheetType.notice: (context, request, completer) =>
21 | NoticeSheet(request: request, completer: completer),
22 | };
23 |
24 | bottomsheetService.setCustomSheetBuilders(builders);
25 | }
26 |
--------------------------------------------------------------------------------
/lib/core/app/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:connectivity_plus/connectivity_plus.dart';
2 | import 'package:fluttertemplate/core/services/auth_service.dart';
3 | import 'package:fluttertemplate/core/services/connectivity_service.dart';
4 | import 'package:fluttertemplate/core/services/file_helper.dart';
5 | import 'package:fluttertemplate/core/services/hardware_info_service.dart';
6 | import 'package:fluttertemplate/core/services/local_storage_service.dart';
7 | import 'package:fluttertemplate/core/services/share_service.dart';
8 | import 'package:fluttertemplate/core/services/url_service.dart';
9 | import 'package:fluttertemplate/ui/views/home/home_view/home.dart';
10 | import 'package:fluttertemplate/ui/views/login/login_phone_view.dart';
11 | import 'package:fluttertemplate/ui/views/login/login_view.dart';
12 | import 'package:fluttertemplate/ui/views/product_detail/product_detail_view.dart';
13 | import 'package:fluttertemplate/ui/views/register/register_view.dart';
14 | import 'package:fluttertemplate/ui/views/start_up/start_up_view.dart';
15 | import 'package:fluttertemplate/ui/views/update/update_view.dart';
16 | import 'package:fluttertemplate/ui/widgets/dialogs/info_alert/info_alert_dialog.dart';
17 | import 'package:fluttertemplate/ui/widgets/notice/notice_sheet.dart';
18 | import 'package:stacked/stacked_annotations.dart';
19 | import 'package:stacked_services/stacked_services.dart';
20 | // document: https://stacked.filledstacks.com/docs/in-depth/service-locator
21 | // example: https://github.com/Stacked-Org/stacked/blob/9f88465576f3e40c22c82da0500704919476a47a/example/router_example/lib/app/app.dart#L82
22 |
23 | // Using StackedApp for state management, generating routes and dependency injection.
24 | @StackedApp(
25 | routes: [
26 | MaterialRoute(page: StartUpView, initial: true),
27 | MaterialRoute(page: UpdateView),
28 | MaterialRoute(page: HomeView),
29 | MaterialRoute(page: LoginView),
30 | MaterialRoute(page: LoginPhoneView),
31 | MaterialRoute(page: RegisterView),
32 | MaterialRoute(page: ProductDetailView),
33 | ],
34 | dependencies: [
35 | // Lazy singletons
36 | LazySingleton(classType: NavigationService),
37 | LazySingleton(classType: DialogService),
38 | LazySingleton(classType: SnackbarService),
39 | LazySingleton(classType: Connectivity),
40 |
41 | LazySingleton(classType: ConnectivityService),
42 | LazySingleton(classType: OpenLinkService),
43 | LazySingleton(classType: ShareService),
44 | LazySingleton(classType: HardwareInfoService),
45 | LazySingleton(classType: FileServiceImpl),
46 | LazySingleton(classType: AuthService),
47 | // singletons
48 |
49 | // Presolve
50 | InitializableSingleton(classType: LocalStorageService),
51 | ],
52 | bottomsheets: [
53 | StackedBottomsheet(classType: NoticeSheet),
54 | // @stacked-bottom-sheet
55 | ],
56 | dialogs: [
57 | StackedDialog(classType: InfoAlertDialog),
58 | // @stacked-dialog
59 | ],
60 | logger: StackedLogger(),
61 | )
62 | class App {
63 | /** This class has no puporse besides housing the annotation that generates the required functionality(除了附加注释之外,没有任何用途) **/
64 | }
65 |
--------------------------------------------------------------------------------
/lib/core/app/app.dialogs.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | // **************************************************************************
4 | // StackedDialogGenerator
5 | // **************************************************************************
6 |
7 | import 'package:stacked_services/stacked_services.dart';
8 |
9 | import 'app.locator.dart';
10 | import '../../ui/widgets/dialogs/info_alert/info_alert_dialog.dart';
11 |
12 | enum DialogType {
13 | infoAlert,
14 | }
15 |
16 | void setupDialogUi() {
17 | final dialogService = locator();
18 |
19 | final Map builders = {
20 | DialogType.infoAlert: (context, request, completer) =>
21 | InfoAlertDialog(request: request, completer: completer),
22 | };
23 |
24 | dialogService.registerCustomDialogBuilders(builders);
25 | }
26 |
--------------------------------------------------------------------------------
/lib/core/app/app.locator.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | // **************************************************************************
4 | // StackedLocatorGenerator
5 | // **************************************************************************
6 |
7 | // ignore_for_file: public_member_api_docs, implementation_imports, depend_on_referenced_packages
8 |
9 | import 'package:connectivity_plus/connectivity_plus.dart';
10 | import 'package:stacked_services/src/dialog/dialog_service.dart';
11 | import 'package:stacked_services/src/navigation/navigation_service.dart';
12 | import 'package:stacked_services/src/snackbar/snackbar_service.dart';
13 | import 'package:stacked_shared/stacked_shared.dart';
14 |
15 | import '../services/auth_service.dart';
16 | import '../services/connectivity_service.dart';
17 | import '../services/file_helper.dart';
18 | import '../services/hardware_info_service.dart';
19 | import '../services/local_storage_service.dart';
20 | import '../services/share_service.dart';
21 | import '../services/url_service.dart';
22 |
23 | final locator = StackedLocator.instance;
24 |
25 | Future setupLocator({
26 | String? environment,
27 | EnvironmentFilter? environmentFilter,
28 | }) async {
29 | // Register environments
30 | locator.registerEnvironment(
31 | environment: environment, environmentFilter: environmentFilter);
32 |
33 | // Register dependencies
34 | locator.registerLazySingleton(() => NavigationService());
35 | locator.registerLazySingleton(() => DialogService());
36 | locator.registerLazySingleton(() => SnackbarService());
37 | locator.registerLazySingleton(() => Connectivity());
38 | locator.registerLazySingleton(() => ConnectivityService());
39 | locator.registerLazySingleton(() => OpenLinkService());
40 | locator.registerLazySingleton(() => ShareService());
41 | locator.registerLazySingleton(() => HardwareInfoService());
42 | locator.registerLazySingleton(() => FileServiceImpl());
43 | locator.registerLazySingleton(() => AuthService());
44 | final localStorageService = LocalStorageService();
45 | await localStorageService.init();
46 | locator.registerSingleton(localStorageService);
47 | }
48 |
--------------------------------------------------------------------------------
/lib/core/constants/animations.dart:
--------------------------------------------------------------------------------
1 | /// File Paths and constants for flare animations
2 | class Animations {
3 | Animations._();
4 |
5 | static const loader = 'assets/animations/acqua_text_out_of_band.riv';
6 | static const loader_name = 'Aura';
7 | }
8 |
--------------------------------------------------------------------------------
/lib/core/constants/component_state.dart:
--------------------------------------------------------------------------------
1 | /// 枚举: 支持的语言种类
2 | enum SupportLocale { FOLLOW_SYSTEM, SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE_TW, TRADITIONAL_CHINESE_HK, ENGLISH }
3 |
4 | enum BackImageMode { light, black }
5 |
6 | enum ConnectivityStatus { Cellular, WiFi, Offline, Init }
7 |
8 | enum SexEnum { man, women }
9 |
10 | enum UserinfoType { username, sex, age, address, description }
11 |
12 | enum DialogType {
13 | Basic,
14 | Generic,
15 | CUSTOM_INPUT,
16 | CUSTOM_ARRAY_SIZE,
17 | ABOUT_APP,
18 | }
19 |
--------------------------------------------------------------------------------
/lib/core/constants/constants.dart:
--------------------------------------------------------------------------------
1 | class Constants {
2 | ///请求地址
3 | static const String BASE_URL = 'https://easy-mock.com/mock/59f69a7f70d0b32d6619db4e/user';
4 |
5 | /// 视频地址
6 | static const freeVideoUrl = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4';
7 |
8 | // 是否开启debug模式
9 | static const bool DEBUG = true;
10 |
11 | /// 是否开启http代理
12 | static const bool useProxy = false;
13 |
14 | /// 是否开启反向代理的IP/域名地址 (前置条件:开启代理)
15 | static const String proxyAddress = "192.168.2.201:9003";
16 | }
17 |
--------------------------------------------------------------------------------
/lib/core/constants/formatter_text.dart:
--------------------------------------------------------------------------------
1 | class FormatText {
2 | static String formatLevelcode(String level) {
3 | const List