├── .fvmrc ├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── soushin │ │ │ │ └── tin_flutter │ │ │ │ └── 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 ├── settings.gradle └── tin_flutter.jks ├── assets ├── color │ └── colors.xml └── images │ └── icon.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── 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 ├── lib ├── app │ ├── app_data.dart │ ├── global.dart │ ├── logger.dart │ ├── network │ │ ├── app_connect.dart │ │ ├── dio_client.dart │ │ ├── error_response_handler.dart │ │ ├── http_service.dart │ │ ├── retrofit_client.dart │ │ └── retrofit_client.g.dart │ ├── res │ │ └── intl.dart │ ├── route_observers.dart │ ├── routes.dart │ └── widget │ │ └── header_bar.dart ├── generated │ ├── gen │ │ ├── assets.gen.dart │ │ └── colors.gen.dart │ └── json │ │ ├── base │ │ ├── json_convert_content.dart │ │ └── json_field.dart │ │ └── chapter_info_entity.g.dart ├── main.dart └── ui │ ├── bean │ ├── base_response_entity.dart │ ├── chapter_info_entity.dart │ └── event_task_bean.dart │ └── demo │ ├── connect │ ├── connect_binding.dart │ ├── connect_logic.dart │ ├── connect_page.dart │ └── connect_state.dart │ ├── count │ ├── count_binding.dart │ ├── count_logic.dart │ ├── count_page.dart │ └── count_state.dart │ ├── dynamic │ └── dynamic_state.dart │ ├── home │ └── home_state.dart │ ├── main │ ├── dynamic_page.dart │ ├── home_page.dart │ ├── main_binding.dart │ ├── main_logic.dart │ ├── main_page.dart │ ├── main_state.dart │ └── mine_page.dart │ ├── mine │ ├── mine_page.dart │ └── mine_state.dart │ ├── multiplex │ ├── multiplex_binding.dart │ ├── multiplex_logic.dart │ ├── multiplex_page.dart │ └── multiplex_state.dart │ ├── rx_dart │ ├── rx_dart_binding.dart │ ├── rx_dart_logic.dart │ ├── rx_dart_page.dart │ └── rx_dart_state.dart │ ├── storage │ ├── storage_binding.dart │ ├── storage_logic.dart │ ├── storage_page.dart │ └── storage_state.dart │ └── web │ ├── web_binding.dart │ ├── web_logic.dart │ ├── web_page.dart │ └── web_state.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.fvmrc: -------------------------------------------------------------------------------- 1 | { 2 | "flutter": "3.27.4" 3 | } -------------------------------------------------------------------------------- /.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 | 48 | # FVM Version Cache 49 | .fvm/ -------------------------------------------------------------------------------- /.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: b1395592de68cc8ac4522094ae59956dd21a91db 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TinFlutter 2 | 3 | ## 环境配置要求 4 | 5 | 基于Flutter3.27.1、Dart3.6.0版本开发,使用的三方库都适配了空安全。 6 | 目前可运行于Android iOS Web三种平台,去掉不支持的依赖库依然适用于windows/linux/macos平台 7 | 8 | ### 需要安装的Plugin: 9 | - 基本配置插件: Dart、Kotlin、Flutter 10 | - Flutter Intl 国际化插件,用于生成国际化相关代码 11 | - Json to Dart 对象bean生成插件 12 | - GetX GetX框架插件,用于生成GetX框架相关类和代码 13 | 14 | 15 | 2025-02-16 16 | - 新增依赖插件[flutter_gen](https://pub.dev/packages/flutter_gen)处理资源文件(image/flutter_svg/rive/lottie/color/font)的快速配置 17 | - 升级Flutter版本到3.27.1 18 | 19 | 2024-09-18 20 | - 更新依赖插件 21 | 22 | 2024-01-18 23 | 新增 24 | - 更新依赖插件 25 | - 废弃之前使用的intl插件,使用getX自带的国际化 26 | - 废弃日志打印(logger太花哨,缺少实用),改用自己封装的logger 27 | - 使用FlutterJsonBeanFactory工具,转化json为bean,很适合处理网络请求返回数据 28 | - 使用[retrofit](https://pub.dev/packages/retrofit)接管dio的请求处理 29 | - 包含上述框架的简单演示源码 30 | 31 | 2022-08-20 32 | 新增 33 | - 更新依赖插件 34 | - 废弃之前使用的intl插件,使用getX自带的国际化 35 | - 废弃日志打印(logger太花哨,缺少实用),改用自己封装的logger 36 | - 使用FlutterJsonBeanFactory工具,转化json为bean,很适合处理网络请求返回数据 37 | - 包含上述框架的简单演示源码 38 | 39 | 2021-08-08 40 | 新增 41 | ****注意 此次更新涉及空安全升级 项目所依赖的三方库需要支持空安全 42 | - Flutter项目框架[GetX](https://github.com/jonataslaw/getx) 43 | - 轻量级存储框架[Shared preferences plugin](https://pub.dev/packages/shared_preferences) 44 | - 屏幕适配框架[flutter_screenutil](https://pub.dev/packages/flutter_screenutil) 45 | - 包含上述框架的简单演示源码 46 | 47 | 2021-05-02 48 | 新增 49 | - 刷新加载框架[EasyRefresh](https://github.com/xuelongqy/flutter_easyrefresh) 50 | - Toast框架[FlutterToast](https://github.com/ponnamkarthik/FlutterToast) 51 | - 事件总线[EventBus](https://github.com/marcojakob/dart-event-bushttps://github.com/marcojakob/dart-event-bus) 52 | - 异步处理[RxDart](https://github.com/ReactiveX/rxdart) 53 | - 权限申请[permission_handler](https://github.com/Baseflow/flutter-permission-handler) 54 | - 包含上述框架的简单演示源码 55 | 56 | 57 | 58 | 59 | 60 | ### 参考文档 61 | 62 | - [Flutter GetX使用---简洁的魅力!](https://juejin.cn/post/6924104248275763208) 63 | - [FlutterJsonBeanFactory](https://github.com/fluttercandies/FlutterJsonBeanFactory) 64 | 65 | 66 | ### 其他常用框架 67 | - [Flutter(十七) 实现国际化](https://blog.csdn.net/zhongad007/article/details/106470787/) 68 | - [dio使用文档](https://github.com/flutterchina/dio/blob/master/README-ZH.md) 69 | - [网络框架Dio](https://github.com/flutterchina/dio) 70 | - [Retrofit.dart网络框架](https://github.com/trevorwang/retrofit.dart/) 71 | - [Get框架的快速、超轻量和同步键值存储](https://github.com/jonataslaw/get_storage) 72 | - [fish-redux闲鱼Flutter跨平台解决方案](https://github.com/alibaba/fish-redux) 73 | - [轻量存储库Hive](https://github.com/hivedb/hive) 74 | - [ImagePicker图片选择框架](https://pub.dev/packages/image_picker) 75 | - [json2dart工具网址](https://caijinglong.github.io/json2dart/index_ch.html) 76 | 77 | 78 | ### 问题 79 | 80 | - flutter for web中的跨域问题[flutter for web跨域解决方案](https://www.cnblogs.com/lcosima/p/14504254.html) 81 | - fluttergen 和 fvm冲突导致无法使用时,可编辑$HOME/.pub-cache/bin/fluttergen增加fvm 82 | 83 | ### retrofit适用命令 84 | 85 | # dart 86 | - dart pub run build_runner build 87 | 88 | # flutter 89 | - flutter pub run build_runner build 90 | - flutter pub run build_runner build --delete-conflicting-outputs 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /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 | /gradle/ 13 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdk 34 30 | namespace 'com.soushin.tin_flutter' 31 | 32 | sourceSets { 33 | main.java.srcDirs += 'src/main/kotlin' 34 | } 35 | 36 | defaultConfig { 37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 38 | applicationId "com.soushin.tin_flutter" 39 | minSdkVersion 21 40 | targetSdkVersion 34 41 | versionCode flutterVersionCode.toInteger() 42 | versionName flutterVersionName 43 | multiDexEnabled true 44 | } 45 | signingConfigs { 46 | config { 47 | keyAlias 'tin_flutter' 48 | keyPassword '123456' 49 | storeFile file('../tin_flutter.jks') 50 | storePassword '123456' 51 | } 52 | } 53 | buildTypes { 54 | release { 55 | signingConfig signingConfigs.config 56 | } 57 | debug { 58 | signingConfig signingConfigs.config 59 | } 60 | } 61 | android.applicationVariants.all { variant -> 62 | variant.outputs.all { 63 | // 自定义文件名{示例:AppName-Flavor-debug-v1.0.0_201807301409} 64 | outputFileName = "flutter${variant.flavorName}_${variant.buildType.name}_${variant.versionName}.apk" 65 | } 66 | } 67 | } 68 | 69 | flutter { 70 | source '../..' 71 | } 72 | 73 | dependencies { 74 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 75 | } 76 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 26 | 30 | 33 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/soushin/tin_flutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.soushin.tin_flutter 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | //阿里云仓库总览 https://developer.aliyun.com/mvn/guide 5 | maven { url 'https://maven.aliyun.com/repository/google' } 6 | maven { url 'https://maven.aliyun.com/repository/central' } 7 | maven { url 'https://maven.aliyun.com/repository/public' } 8 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } 9 | maven { url 'https://maven.aliyun.com/repository/spring' } 10 | maven { url 'https://maven.aliyun.com/repository/spring-plugin' } 11 | maven { url 'https://maven.aliyun.com/repository/grails-core' } 12 | maven { url 'https://maven.aliyun.com/repository/apache-snapshots' } 13 | google() 14 | mavenCentral() 15 | maven { url "https://www.jitpack.io" } 16 | } 17 | 18 | dependencies { 19 | classpath 'com.android.tools.build:gradle:8.0.2' 20 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 21 | } 22 | } 23 | 24 | allprojects { 25 | repositories { 26 | //阿里云仓库总览 https://developer.aliyun.com/mvn/guide 27 | maven { url 'https://maven.aliyun.com/repository/google' } 28 | maven { url 'https://maven.aliyun.com/repository/central' } 29 | maven { url 'https://maven.aliyun.com/repository/public' } 30 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } 31 | maven { url 'https://maven.aliyun.com/repository/spring' } 32 | maven { url 'https://maven.aliyun.com/repository/spring-plugin' } 33 | maven { url 'https://maven.aliyun.com/repository/grails-core' } 34 | maven { url 'https://maven.aliyun.com/repository/apache-snapshots' } 35 | google() 36 | mavenCentral() 37 | maven { url "https://www.jitpack.io" } 38 | } 39 | } 40 | 41 | rootProject.buildDir = '../build' 42 | subprojects { 43 | project.buildDir = "${rootProject.buildDir}/${project.name}" 44 | } 45 | subprojects { 46 | project.evaluationDependsOn(':app') 47 | } 48 | 49 | tasks.register("clean", Delete) { 50 | delete rootProject.buildDir 51 | } 52 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/tin_flutter.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/android/tin_flutter.jks -------------------------------------------------------------------------------- /assets/color/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #000000 5 | #EEEEEE 6 | #979797 7 | #CF2A2A 8 | #DF9527 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/assets/images/icon.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /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? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_inappwebview_ios (0.0.1): 4 | - Flutter 5 | - flutter_inappwebview_ios/Core (= 0.0.1) 6 | - OrderedSet (~> 6.0.3) 7 | - flutter_inappwebview_ios/Core (0.0.1): 8 | - Flutter 9 | - OrderedSet (~> 6.0.3) 10 | - fluttertoast (0.0.2): 11 | - Flutter 12 | - OrderedSet (6.0.3) 13 | - path_provider_foundation (0.0.1): 14 | - Flutter 15 | - FlutterMacOS 16 | - permission_handler_apple (9.3.0): 17 | - Flutter 18 | - shared_preferences_foundation (0.0.1): 19 | - Flutter 20 | - FlutterMacOS 21 | 22 | DEPENDENCIES: 23 | - Flutter (from `Flutter`) 24 | - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) 25 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) 26 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) 27 | - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) 28 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) 29 | 30 | SPEC REPOS: 31 | trunk: 32 | - OrderedSet 33 | 34 | EXTERNAL SOURCES: 35 | Flutter: 36 | :path: Flutter 37 | flutter_inappwebview_ios: 38 | :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" 39 | fluttertoast: 40 | :path: ".symlinks/plugins/fluttertoast/ios" 41 | path_provider_foundation: 42 | :path: ".symlinks/plugins/path_provider_foundation/darwin" 43 | permission_handler_apple: 44 | :path: ".symlinks/plugins/permission_handler_apple/ios" 45 | shared_preferences_foundation: 46 | :path: ".symlinks/plugins/shared_preferences_foundation/darwin" 47 | 48 | SPEC CHECKSUMS: 49 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 50 | flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 51 | fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f 52 | OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 53 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 54 | permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 55 | shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 56 | 57 | PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 58 | 59 | COCOAPODS: 1.15.2 60 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | BF668365544FD33A471FDAEF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFB6C08A3E5F0D45D72CCD05 /* Pods_Runner.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 061A2BD17203F8EBD76E761B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 34 | 061D81E5FFAB2DD24F45180D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | CF7FC19D72B8995CC6054EB1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 49 | CFB6C08A3E5F0D45D72CCD05 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | BF668365544FD33A471FDAEF /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 184A5AF3F647E109EC2F74FB /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | CFB6C08A3E5F0D45D72CCD05 /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 9740EEB11CF90186004384FC /* Flutter */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | F576E1FBB2303BFF8A860B23 /* Pods */, 90 | 184A5AF3F647E109EC2F74FB /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 110 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 111 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 112 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 113 | ); 114 | path = Runner; 115 | sourceTree = ""; 116 | }; 117 | F576E1FBB2303BFF8A860B23 /* Pods */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 061D81E5FFAB2DD24F45180D /* Pods-Runner.debug.xcconfig */, 121 | CF7FC19D72B8995CC6054EB1 /* Pods-Runner.release.xcconfig */, 122 | 061A2BD17203F8EBD76E761B /* Pods-Runner.profile.xcconfig */, 123 | ); 124 | path = Pods; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 97C146ED1CF9000F007C117D /* Runner */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 133 | buildPhases = ( 134 | 7BBC87962C7FAAF5A5CE8ABE /* [CP] Check Pods Manifest.lock */, 135 | 9740EEB61CF901F6004384FC /* Run Script */, 136 | 97C146EA1CF9000F007C117D /* Sources */, 137 | 97C146EB1CF9000F007C117D /* Frameworks */, 138 | 97C146EC1CF9000F007C117D /* Resources */, 139 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 140 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 141 | 40427C318246069F1A8EBF47 /* [CP] Embed Pods Frameworks */, 142 | 8705A3F9758766C384716A72 /* [CP] Copy Pods Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 1510; 160 | ORGANIZATIONNAME = ""; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | LastSwiftMigration = 1100; 165 | }; 166 | }; 167 | }; 168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 169 | compatibilityVersion = "Xcode 9.3"; 170 | developmentRegion = en; 171 | hasScannedForEncodings = 0; 172 | knownRegions = ( 173 | en, 174 | Base, 175 | ); 176 | mainGroup = 97C146E51CF9000F007C117D; 177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 97C146ED1CF9000F007C117D /* Runner */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 97C146EC1CF9000F007C117D /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | alwaysOutOfDate = 1; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputPaths = ( 208 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 216 | }; 217 | 40427C318246069F1A8EBF47 /* [CP] Embed Pods Frameworks */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputFileListPaths = ( 223 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 224 | ); 225 | name = "[CP] Embed Pods Frameworks"; 226 | outputFileListPaths = ( 227 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | shellPath = /bin/sh; 231 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 232 | showEnvVarsInLog = 0; 233 | }; 234 | 7BBC87962C7FAAF5A5CE8ABE /* [CP] Check Pods Manifest.lock */ = { 235 | isa = PBXShellScriptBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | inputFileListPaths = ( 240 | ); 241 | inputPaths = ( 242 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 243 | "${PODS_ROOT}/Manifest.lock", 244 | ); 245 | name = "[CP] Check Pods Manifest.lock"; 246 | outputFileListPaths = ( 247 | ); 248 | outputPaths = ( 249 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | shellPath = /bin/sh; 253 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 254 | showEnvVarsInLog = 0; 255 | }; 256 | 8705A3F9758766C384716A72 /* [CP] Copy Pods Resources */ = { 257 | isa = PBXShellScriptBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | inputFileListPaths = ( 262 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", 263 | ); 264 | name = "[CP] Copy Pods Resources"; 265 | outputFileListPaths = ( 266 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | shellPath = /bin/sh; 270 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; 271 | showEnvVarsInLog = 0; 272 | }; 273 | 9740EEB61CF901F6004384FC /* Run Script */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | alwaysOutOfDate = 1; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | inputPaths = ( 280 | ); 281 | name = "Run Script"; 282 | outputPaths = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | shellPath = /bin/sh; 286 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 287 | }; 288 | /* End PBXShellScriptBuildPhase section */ 289 | 290 | /* Begin PBXSourcesBuildPhase section */ 291 | 97C146EA1CF9000F007C117D /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 296 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | /* End PBXSourcesBuildPhase section */ 301 | 302 | /* Begin PBXVariantGroup section */ 303 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 304 | isa = PBXVariantGroup; 305 | children = ( 306 | 97C146FB1CF9000F007C117D /* Base */, 307 | ); 308 | name = Main.storyboard; 309 | sourceTree = ""; 310 | }; 311 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 312 | isa = PBXVariantGroup; 313 | children = ( 314 | 97C147001CF9000F007C117D /* Base */, 315 | ); 316 | name = LaunchScreen.storyboard; 317 | sourceTree = ""; 318 | }; 319 | /* End PBXVariantGroup section */ 320 | 321 | /* Begin XCBuildConfiguration section */ 322 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_ANALYZER_NONNULL = YES; 327 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 328 | CLANG_CXX_LIBRARY = "libc++"; 329 | CLANG_ENABLE_MODULES = YES; 330 | CLANG_ENABLE_OBJC_ARC = YES; 331 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 332 | CLANG_WARN_BOOL_CONVERSION = YES; 333 | CLANG_WARN_COMMA = YES; 334 | CLANG_WARN_CONSTANT_CONVERSION = YES; 335 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_EMPTY_BODY = YES; 338 | CLANG_WARN_ENUM_CONVERSION = YES; 339 | CLANG_WARN_INFINITE_RECURSION = YES; 340 | CLANG_WARN_INT_CONVERSION = YES; 341 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 343 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 345 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 346 | CLANG_WARN_STRICT_PROTOTYPES = YES; 347 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 348 | CLANG_WARN_UNREACHABLE_CODE = YES; 349 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 350 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 351 | COPY_PHASE_STRIP = NO; 352 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 353 | ENABLE_NS_ASSERTIONS = NO; 354 | ENABLE_STRICT_OBJC_MSGSEND = YES; 355 | GCC_C_LANGUAGE_STANDARD = gnu99; 356 | GCC_NO_COMMON_BLOCKS = YES; 357 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 358 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 359 | GCC_WARN_UNDECLARED_SELECTOR = YES; 360 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 361 | GCC_WARN_UNUSED_FUNCTION = YES; 362 | GCC_WARN_UNUSED_VARIABLE = YES; 363 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 364 | MTL_ENABLE_DEBUG_INFO = NO; 365 | SDKROOT = iphoneos; 366 | SUPPORTED_PLATFORMS = iphoneos; 367 | TARGETED_DEVICE_FAMILY = "1,2"; 368 | VALIDATE_PRODUCT = YES; 369 | }; 370 | name = Profile; 371 | }; 372 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 373 | isa = XCBuildConfiguration; 374 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 375 | buildSettings = { 376 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 377 | CLANG_ENABLE_MODULES = YES; 378 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 379 | DEVELOPMENT_TEAM = 85T97ATLCB; 380 | ENABLE_BITCODE = NO; 381 | INFOPLIST_FILE = Runner/Info.plist; 382 | LD_RUNPATH_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "@executable_path/Frameworks", 385 | ); 386 | PRODUCT_BUNDLE_IDENTIFIER = com.soushin.tin_flutter; 387 | PRODUCT_NAME = "$(TARGET_NAME)"; 388 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 389 | SWIFT_VERSION = 5.0; 390 | VERSIONING_SYSTEM = "apple-generic"; 391 | }; 392 | name = Profile; 393 | }; 394 | 97C147031CF9000F007C117D /* Debug */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_ANALYZER_NONNULL = YES; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 404 | CLANG_WARN_BOOL_CONVERSION = YES; 405 | CLANG_WARN_COMMA = YES; 406 | CLANG_WARN_CONSTANT_CONVERSION = YES; 407 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INFINITE_RECURSION = YES; 412 | CLANG_WARN_INT_CONVERSION = YES; 413 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 414 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 415 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 416 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 417 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 418 | CLANG_WARN_STRICT_PROTOTYPES = YES; 419 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 420 | CLANG_WARN_UNREACHABLE_CODE = YES; 421 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 423 | COPY_PHASE_STRIP = NO; 424 | DEBUG_INFORMATION_FORMAT = dwarf; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | ENABLE_TESTABILITY = YES; 427 | GCC_C_LANGUAGE_STANDARD = gnu99; 428 | GCC_DYNAMIC_NO_PIC = NO; 429 | GCC_NO_COMMON_BLOCKS = YES; 430 | GCC_OPTIMIZATION_LEVEL = 0; 431 | GCC_PREPROCESSOR_DEFINITIONS = ( 432 | "DEBUG=1", 433 | "$(inherited)", 434 | ); 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 442 | MTL_ENABLE_DEBUG_INFO = YES; 443 | ONLY_ACTIVE_ARCH = YES; 444 | SDKROOT = iphoneos; 445 | TARGETED_DEVICE_FAMILY = "1,2"; 446 | }; 447 | name = Debug; 448 | }; 449 | 97C147041CF9000F007C117D /* Release */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ALWAYS_SEARCH_USER_PATHS = NO; 453 | CLANG_ANALYZER_NONNULL = YES; 454 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 455 | CLANG_CXX_LIBRARY = "libc++"; 456 | CLANG_ENABLE_MODULES = YES; 457 | CLANG_ENABLE_OBJC_ARC = YES; 458 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 459 | CLANG_WARN_BOOL_CONVERSION = YES; 460 | CLANG_WARN_COMMA = YES; 461 | CLANG_WARN_CONSTANT_CONVERSION = YES; 462 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 463 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 464 | CLANG_WARN_EMPTY_BODY = YES; 465 | CLANG_WARN_ENUM_CONVERSION = YES; 466 | CLANG_WARN_INFINITE_RECURSION = YES; 467 | CLANG_WARN_INT_CONVERSION = YES; 468 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 469 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 470 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 471 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 472 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 473 | CLANG_WARN_STRICT_PROTOTYPES = YES; 474 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 475 | CLANG_WARN_UNREACHABLE_CODE = YES; 476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 478 | COPY_PHASE_STRIP = NO; 479 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 480 | ENABLE_NS_ASSERTIONS = NO; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 491 | MTL_ENABLE_DEBUG_INFO = NO; 492 | SDKROOT = iphoneos; 493 | SUPPORTED_PLATFORMS = iphoneos; 494 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | VALIDATE_PRODUCT = YES; 497 | }; 498 | name = Release; 499 | }; 500 | 97C147061CF9000F007C117D /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 503 | buildSettings = { 504 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 505 | CLANG_ENABLE_MODULES = YES; 506 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 507 | DEVELOPMENT_TEAM = 85T97ATLCB; 508 | ENABLE_BITCODE = NO; 509 | INFOPLIST_FILE = Runner/Info.plist; 510 | LD_RUNPATH_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "@executable_path/Frameworks", 513 | ); 514 | PRODUCT_BUNDLE_IDENTIFIER = com.soushin.tin_flutter; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 517 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 518 | SWIFT_VERSION = 5.0; 519 | VERSIONING_SYSTEM = "apple-generic"; 520 | }; 521 | name = Debug; 522 | }; 523 | 97C147071CF9000F007C117D /* Release */ = { 524 | isa = XCBuildConfiguration; 525 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 526 | buildSettings = { 527 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 528 | CLANG_ENABLE_MODULES = YES; 529 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 530 | DEVELOPMENT_TEAM = 85T97ATLCB; 531 | ENABLE_BITCODE = NO; 532 | INFOPLIST_FILE = Runner/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "@executable_path/Frameworks", 536 | ); 537 | PRODUCT_BUNDLE_IDENTIFIER = com.soushin.tin_flutter; 538 | PRODUCT_NAME = "$(TARGET_NAME)"; 539 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 540 | SWIFT_VERSION = 5.0; 541 | VERSIONING_SYSTEM = "apple-generic"; 542 | }; 543 | name = Release; 544 | }; 545 | /* End XCBuildConfiguration section */ 546 | 547 | /* Begin XCConfigurationList section */ 548 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 97C147031CF9000F007C117D /* Debug */, 552 | 97C147041CF9000F007C117D /* Release */, 553 | 249021D3217E4FDB00AE95B9 /* Profile */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | 97C147061CF9000F007C117D /* Debug */, 562 | 97C147071CF9000F007C117D /* Release */, 563 | 249021D4217E4FDB00AE95B9 /* Profile */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | /* End XCConfigurationList section */ 569 | }; 570 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 571 | } 572 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/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 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | tin_flutter 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | NSCameraUsageDescription 31 | 需要使用摄像头权限用于用户头像 32 | NSPhotoLibraryUsageDescription 33 | 需要使用图库权限用于用户头像 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UIViewControllerBasedStatusBarAppearance 52 | 53 | CADisableMinimumFrameDurationOnPhone 54 | 55 | UIApplicationSupportsIndirectInputEvents 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/app/app_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | import 'package:tin_flutter/app/global.dart'; 3 | 4 | /// 应用内数据缓存处理 5 | /// @author SouShin 6 | /// @time 2021/8/10 10:22 7 | class AppData { 8 | // static Box? box; 9 | static SharedPreferences? prefs; 10 | 11 | static Future initData() async { 12 | prefs = await SharedPreferences.getInstance(); 13 | print("初始化完成${new DateTime.now().toString()} ${prefs!=null}"); 14 | return Future.value(prefs!=null); 15 | } 16 | 17 | static void saveLocaleIndex(int index) async { 18 | prefs?.setInt("locale_index", index); 19 | } 20 | 21 | static int queryLocaleIndex() { 22 | // SharedPreferences prefs = await SharedPreferences.getInstance(); 23 | return prefs?.getInt("locale_index") == null ? 1 : prefs!.getInt("locale_index")!; 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lib/app/global.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:event_bus/event_bus.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | import 'package:rxdart/rxdart.dart'; 5 | 6 | 7 | ///普通事件 8 | EventBus eventBus=new EventBus(); 9 | ///可用于黏性事件 10 | EventBus behaviorBus = EventBus.customController(BehaviorSubject()); 11 | 12 | ///显示Toast消息 13 | void showToast(String message){ 14 | Fluttertoast.showToast(msg: message,gravity: ToastGravity.CENTER); 15 | } 16 | 17 | ///是否debug环境 18 | final isDebug = !inProduct(); 19 | 20 | ///判断程序当前的运行环境 21 | bool inProduct(){ 22 | return const bool.fromEnvironment("dart.vm.product"); 23 | } 24 | 25 | 26 | class Global{ 27 | 28 | static const base_url = "https://www.wanandroid.com/";//:8860 29 | 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /lib/app/logger.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'dart:developer'; 4 | 5 | import 'package:common_utils/common_utils.dart'; 6 | import 'package:tin_flutter/app/global.dart'; 7 | 8 | 9 | class Logger{ 10 | 11 | static void init({ 12 | String tag = 'TinFlutter', 13 | bool isDebug = false, 14 | int maxLen = 128, 15 | }) { 16 | LogUtil.init(tag: tag,isDebug: isDebug,maxLen: maxLen); 17 | } 18 | 19 | } 20 | 21 | 22 | void logger(dynamic message,{String name = ''}){ 23 | if(isDebug) { 24 | log(dynamicToString(message),time: DateTime.now(),name: name); 25 | } 26 | } 27 | 28 | void loggerArray(Iterable iterable,{String name = ''}){ 29 | if(isDebug) { 30 | logger(StringBuffer(iterable),name: name); 31 | } 32 | } 33 | 34 | void loggerV(Object? object, {String? tag}){ 35 | LogUtil.v(object,tag: tag); 36 | } 37 | 38 | void loggerD(Object? object, {String? tag}){ 39 | LogUtil.d(object,tag: tag); 40 | } 41 | 42 | void loggerE(Object? object, {String? tag}){ 43 | LogUtil.e(object,tag: tag); 44 | } 45 | 46 | 47 | String dynamicToString(dynamic message){ 48 | if(message == null){ 49 | return 'null'; 50 | }else if(message is String){ 51 | return message; 52 | }else if(message is Map){ 53 | return JsonUtil.encodeObj(message) ?? ''; 54 | }else if(message is List){ 55 | return message.map((e) => dynamicToString(e)).toList().toString(); 56 | }else{ 57 | return message.toString(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/app/network/app_connect.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:get/get.dart'; 3 | import 'package:get/get_connect/connect.dart'; 4 | import 'package:tin_flutter/app/logger.dart'; 5 | 6 | class AppConnect extends GetConnect{ 7 | 8 | @override 9 | void onInit() { 10 | super.onInit(); 11 | // All request will pass to jsonEncode so CasesModel.fromJson() 12 | // httpClient.defaultDecoder 13 | httpClient.baseUrl = 'https://www.wanandroid.com'; 14 | //Autenticator will be called 3 times if HttpStatus is 15 | //HttpStatus.unauthorized 16 | httpClient.maxAuthRetries = 3; 17 | httpClient.timeout = Duration(seconds: 60); 18 | // baseUrl = 'https://api.covid19api.com'; // It define baseUrl to 19 | // Http and websockets if used with no [httpClient] instance 20 | // It's will attach 'apikey' property on header from all requests 21 | // httpClient.addRequestModifier((Request request){ 22 | // var requestLog = 'REQUEST#################\n'+ 23 | // 'HEADERS=${request.headers}\n'+ 24 | // 'URL=${request.url}\n'+ 25 | // 'METHOD=${request.method}\n'+ 26 | // 'CONTENT_LENGTH=${request.contentLength}'; 27 | // return request; 28 | // }); 29 | // Even if the server sends data from the country "Brazil", 30 | // it will never be displayed to users, because you remove 31 | // that data from the response, even before the response is delivered 32 | httpClient.addResponseModifier((request, response) { 33 | loggerArray([response.statusCode,request.url.toString(),response.bodyString], name: "RESPONSE" ); 34 | return response; 35 | }); 36 | 37 | /*httpClient.addAuthenticator((Request request) async { 38 | final response = await get("http://yourapi/token"); 39 | final token = response.body['token']; 40 | // Set the header 41 | request.headers['Authorization'] = "$token"; 42 | return request; 43 | });*/ 44 | 45 | } 46 | 47 | AppConnect._internal(); 48 | 49 | static AppConnect? instance; 50 | 51 | static getInstance() { 52 | if (instance == null) { 53 | instance = AppConnect._internal(); 54 | instance?.onInit(); 55 | } 56 | return instance; 57 | } 58 | 59 | factory AppConnect() => getInstance(); 60 | 61 | 62 | Stream> getStream(String url, {Map? headers, String? contentType, Map? query, Decoder? decoder}) { 63 | Future> future = get(url, headers:headers, contentType:contentType, query:query, decoder:decoder); 64 | return future.asStream(); 65 | } 66 | 67 | 68 | @override 69 | Future> get(String url, {Map? headers, String? contentType, Map? query, Decoder? decoder}) { 70 | loggerArray(['GET请求参数',url,headers,contentType,query]); 71 | return super.get(url, headers:headers, contentType:contentType, query:query, decoder:decoder); 72 | } 73 | 74 | 75 | @override 76 | Future> post(String? url, body, {String? contentType, Map? headers, Map? query, Decoder? decoder, Progress? uploadProgress}) { 77 | final bodyData = (body != null && body is FormData) ? body.fields.map((e) => '${e.key}:${e.value}').toList() : body; 78 | loggerArray(['POST请求参数',url,bodyData,contentType,headers,query]); 79 | return super.post(url, body, contentType: contentType, headers:headers, query:query, decoder:decoder, uploadProgress:uploadProgress); 80 | } 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | } -------------------------------------------------------------------------------- /lib/app/network/dio_client.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:dio/dio.dart'; 3 | 4 | /// 网络访问 替换getx自带的appConnect 5 | ///author: Soushin 6 | ///2023/6/20 20:12 7 | class DioClient { 8 | 9 | DioClient._internal(); 10 | 11 | static DioClient? instance; 12 | 13 | static getInstance() { 14 | if (instance == null) { 15 | instance = DioClient._internal(); 16 | instance?.onInit(); 17 | } 18 | return instance; 19 | } 20 | 21 | factory DioClient() => getInstance(); 22 | 23 | final dio = Dio(); 24 | 25 | void onInit(){ 26 | dio.options.baseUrl = "https://www.wanandroid.com"; 27 | dio.options.connectTimeout = Duration(seconds: 60); 28 | dio.options.receiveTimeout = Duration(seconds: 60); 29 | dio.options.sendTimeout = Duration(seconds: 60); 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /lib/app/network/error_response_handler.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:tin_flutter/app/global.dart'; 3 | import 'package:tin_flutter/app/logger.dart'; 4 | 5 | ///app全局错误监听处理 6 | class ErrorResponseHandler { 7 | ErrorResponseHandler._internal(); 8 | 9 | static ErrorResponseHandler? instance; 10 | 11 | static ErrorResponseHandler getInstance() { 12 | instance ??= ErrorResponseHandler._internal(); 13 | return instance!; 14 | } 15 | 16 | factory ErrorResponseHandler() => getInstance(); 17 | 18 | ///记录一下最后显示吐司的时间 19 | var lastTime = 0; 20 | ///记录最后一次吐司的内容 21 | var lastToast = ""; 22 | 23 | void onErrorHandle(dynamic error, {dynamic stackTrace}) { 24 | loggerArray(['onErrorHandle',lastTime, error, stackTrace]); 25 | ///控制连续多次弹出同样内容的吐司 26 | var current = DateTime.now().millisecondsSinceEpoch; 27 | if(error is Map){ 28 | responseHandler(error); 29 | } else { 30 | var toast= error.toString(); 31 | if(toast != lastToast || (current - lastTime) >= 5000){ 32 | lastTime = current; 33 | lastToast = toast; 34 | showToast(toast); 35 | } 36 | } 37 | } 38 | 39 | ///服务返回异常处理 40 | void responseHandler(Map error) { 41 | var toast= error["message"]; 42 | var current = DateTime.now().millisecondsSinceEpoch; 43 | if(toast != lastToast || (current - lastTime) >= 5000){ 44 | lastTime = current; 45 | lastToast = toast; 46 | switch(error["code"]){ 47 | case 401://Unauthorized 48 | showToast(toast); 49 | break; 50 | case 403://Forbidden 51 | showToast(toast); 52 | break; 53 | case 404://Not Found 54 | showToast(toast); 55 | break; 56 | case 900000://系统异常 57 | showToast(toast); 58 | break; 59 | case 900004://整站维护中 60 | showToast(toast); 61 | break; 62 | case 900072://请求参数不合法 63 | showToast(toast); 64 | break; 65 | case 900403://鉴权失败 66 | // ///登录权限已过期,或退出登录 67 | // Get.until((ModalRoute.withName(Routes.main))); 68 | // ///刷新各页面数据 69 | // eventBus.fire(LoginRefreshEvent(show_notice: false)); 70 | // ///页面切换到首页 71 | // eventBus.fire(ChangeMainPageEvent(0)); 72 | // ///清除用户登录信息 73 | // AppData.clear(); 74 | // showToast(toast); 75 | break; 76 | case 900078://无效的请求方式 77 | showToast(toast); 78 | break; 79 | default: 80 | showToast(toast); 81 | break; 82 | } 83 | 84 | } 85 | } 86 | 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /lib/app/network/http_service.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:convert'; 3 | 4 | import 'package:dio/dio.dart'; 5 | import 'package:tin_flutter/app/logger.dart'; 6 | import 'package:tin_flutter/app/network/error_response_handler.dart'; 7 | import 'package:tin_flutter/app/network/retrofit_client.dart'; 8 | import 'package:tin_flutter/ui/bean/base_response_entity.dart'; 9 | import 'package:tin_flutter/ui/bean/chapter_info_entity.dart'; 10 | class HttpService{ 11 | 12 | static late RetrofitClient _client; 13 | 14 | static void doInit(){ 15 | var dio = Dio(); 16 | dio.interceptors.add(InterceptorsWrapper( 17 | onRequest: (options, handler){ 18 | options.headers["Content-Type"] = "application/x-www-form-urlencoded"; 19 | // options.headers["Accept-Language"] = Intr().currentLocale().languageCode; 20 | 21 | //设备信息【PC:PC网页端,MP:移动端,APP:原生APP】 22 | //网站ID 23 | //机器型号 24 | //系统版本号【APP强制使用】 25 | // var commonParams = {"machineModel":Constants.model(),"siteId":"9000","siteType":"1","terminal":"APP","version":Constants.version()}; 26 | // options.queryParameters.addAll(commonParams); 27 | loggerArray(["发起请求","${options.baseUrl}${options.path}\n","${options.method}\n","${options.headers}\n",options.data ?? options.queryParameters]); 28 | handler.next(options); 29 | }, 30 | onResponse: (response, handler){ 31 | loggerArray(["返回响应",response.requestOptions.path,response.statusCode,"${response.statusMessage}\n",jsonEncode(response.data)]); 32 | if(response.statusCode == 200){ 33 | handler.next(response); 34 | }else { 35 | ErrorResponseHandler().onErrorHandle({"code": response.statusCode,"message": response.statusMessage}); 36 | } 37 | }, 38 | onError: (DioException e, handler){ 39 | loggerArray(["异常响应",e.toString()]); 40 | handler.next(e); 41 | } 42 | )); 43 | _client = RetrofitClient(dio); 44 | } 45 | 46 | 47 | 48 | ///游戏返回体 49 | ///封装请求体,自动处理各种异常问题 50 | static Future buildFuture(RequestCallback callback,{bool loading = true,bool needMsg = false,bool errorHandler = true}) async { 51 | // if(loading){ EasyLoading.show(maskType: EasyLoadingMaskType.black,status: Intr().jiazaizhong); } 52 | try{ 53 | var value = await callback.call(); 54 | // if(loading){ EasyLoading.dismiss(); } 55 | if(value.isOk()){ 56 | ///data为null时处理 57 | return Future.value(value.data ?? (needMsg ? value.errorMsg.toString():"")); 58 | } else { 59 | if(errorHandler){ ErrorResponseHandler().onErrorHandle({"code": value.errorCode,"message": value.errorMsg.toString()}); } 60 | return Future.error(value.errorMsg.toString()); 61 | } 62 | }catch(error){ 63 | loggerArray(["请求异常信息",error]); 64 | // if(loading){ EasyLoading.dismiss(); } 65 | if(errorHandler){ ErrorResponseHandler().onErrorHandle(error); } 66 | return Future.error(error); 67 | } 68 | } 69 | 70 | 71 | static Future> getChapters(){ 72 | return buildFuture>(()=> _client.getChapters(),loading: false); 73 | } 74 | 75 | static Future queryArticle(Map params,){ 76 | return buildFuture(()=> _client.queryArticle(params),loading: false); 77 | } 78 | 79 | 80 | 81 | 82 | 83 | } 84 | 85 | 86 | typedef RequestCallback = Future> Function(); 87 | -------------------------------------------------------------------------------- /lib/app/network/retrofit_client.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:dio/dio.dart' hide Headers; 3 | import 'package:retrofit/retrofit.dart'; 4 | import 'package:tin_flutter/app/global.dart'; 5 | import 'package:tin_flutter/ui/bean/base_response_entity.dart'; 6 | import 'package:tin_flutter/ui/bean/chapter_info_entity.dart'; 7 | 8 | part 'retrofit_client.g.dart'; 9 | 10 | @RestApi(baseUrl: Global.base_url,parser: Parser.JsonSerializable) 11 | abstract class RetrofitClient{ 12 | 13 | factory RetrofitClient(Dio dio, {String? baseUrl}) = _RetrofitClient; 14 | 15 | 16 | @GET('/wxarticle/chapters/json') 17 | Future>> getChapters(); 18 | 19 | @POST('/article/query/0/json') 20 | Future> queryArticle(@Body() Map params,); 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | } 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/app/network/retrofit_client.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'retrofit_client.dart'; 4 | 5 | // ************************************************************************** 6 | // RetrofitGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations 10 | 11 | class _RetrofitClient implements RetrofitClient { 12 | _RetrofitClient( 13 | this._dio, { 14 | this.baseUrl, 15 | this.errorLogger, 16 | }) { 17 | baseUrl ??= 'https://www.wanandroid.com/'; 18 | } 19 | 20 | final Dio _dio; 21 | 22 | String? baseUrl; 23 | 24 | final ParseErrorLogger? errorLogger; 25 | 26 | @override 27 | Future>> getChapters() async { 28 | final _extra = {}; 29 | final queryParameters = {}; 30 | final _headers = {}; 31 | const Map? _data = null; 32 | final _options = 33 | _setStreamType>>(Options( 34 | method: 'GET', 35 | headers: _headers, 36 | extra: _extra, 37 | ) 38 | .compose( 39 | _dio.options, 40 | '/wxarticle/chapters/json', 41 | queryParameters: queryParameters, 42 | data: _data, 43 | ) 44 | .copyWith( 45 | baseUrl: _combineBaseUrls( 46 | _dio.options.baseUrl, 47 | baseUrl, 48 | ))); 49 | final _result = await _dio.fetch>(_options); 50 | late BaseResponseEntity> _value; 51 | try { 52 | _value = 53 | BaseResponseEntity>.fromJson(_result.data!); 54 | } on Object catch (e, s) { 55 | errorLogger?.logError(e, s, _options); 56 | rethrow; 57 | } 58 | return _value; 59 | } 60 | 61 | @override 62 | Future> queryArticle( 63 | Map params) async { 64 | final _extra = {}; 65 | final queryParameters = {}; 66 | final _headers = {}; 67 | final _data = {}; 68 | _data.addAll(params); 69 | final _options = _setStreamType>(Options( 70 | method: 'POST', 71 | headers: _headers, 72 | extra: _extra, 73 | ) 74 | .compose( 75 | _dio.options, 76 | '/article/query/0/json', 77 | queryParameters: queryParameters, 78 | data: _data, 79 | ) 80 | .copyWith( 81 | baseUrl: _combineBaseUrls( 82 | _dio.options.baseUrl, 83 | baseUrl, 84 | ))); 85 | final _result = await _dio.fetch>(_options); 86 | late BaseResponseEntity _value; 87 | try { 88 | _value = BaseResponseEntity.fromJson(_result.data!); 89 | } on Object catch (e, s) { 90 | errorLogger?.logError(e, s, _options); 91 | rethrow; 92 | } 93 | return _value; 94 | } 95 | 96 | RequestOptions _setStreamType(RequestOptions requestOptions) { 97 | if (T != dynamic && 98 | !(requestOptions.responseType == ResponseType.bytes || 99 | requestOptions.responseType == ResponseType.stream)) { 100 | if (T == String) { 101 | requestOptions.responseType = ResponseType.plain; 102 | } else { 103 | requestOptions.responseType = ResponseType.json; 104 | } 105 | } 106 | return requestOptions; 107 | } 108 | 109 | String _combineBaseUrls( 110 | String dioBaseUrl, 111 | String? baseUrl, 112 | ) { 113 | if (baseUrl == null || baseUrl.trim().isEmpty) { 114 | return dioBaseUrl; 115 | } 116 | 117 | final url = Uri.parse(baseUrl); 118 | 119 | if (url.isAbsolute) { 120 | return url.toString(); 121 | } 122 | 123 | return Uri.parse(dioBaseUrl).resolveUri(url).toString(); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /lib/app/res/intl.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:ui'; 3 | import 'package:get/get.dart'; 4 | 5 | class Intl extends Translations{ 6 | Intl._internal(); 7 | 8 | static Intl? instance; 9 | 10 | static getInstance() { 11 | if (instance == null) { 12 | instance = Intl._internal(); 13 | // instance?.onInit(); 14 | } 15 | return instance; 16 | } 17 | 18 | factory Intl() => getInstance(); 19 | 20 | var locales = [const Locale('zh','ZH'),const Locale('en','US')]; 21 | 22 | 23 | String get connect => 'connect'.tr; 24 | String get getx_get => 'getx_get'.tr; 25 | String get getx_post => 'getx_post'.tr; 26 | String get count => 'count'.tr; 27 | String get home => 'home'.tr; 28 | String get activity => 'activity'.tr; 29 | String get other => 'other'.tr; 30 | String get sayHello => 'sayHello'.tr; 31 | String get multiple => 'multiple'.tr; 32 | String get app_name => 'app_name'.tr; 33 | String get greet => 'greet'.tr; 34 | 35 | String get language => 'language'.tr; 36 | String get storage => 'storage'.tr; 37 | String get theme => 'theme'.tr; 38 | String get permission => 'permission'.tr; 39 | String get webview => 'webview'.tr; 40 | String get pictureSelector => 'pictureSelector'.tr; 41 | String get rx_dart => 'rx_dart'.tr; 42 | String get userEventBus => 'userEventBus'.tr; 43 | String get ac_unit => 'ac_unit'.tr; 44 | String get access_alarm => 'access_alarm'.tr; 45 | String get accessibility => 'accessibility'.tr; 46 | String get account_balance => 'account_balance'.tr; 47 | String get account_balance_wallet => 'account_balance_wallet'.tr; 48 | String get add_a_photo => 'add_a_photo'.tr; 49 | String get add_moderator => 'add_moderator'.tr; 50 | String get add_shopping_cart => 'add_shopping_cart'.tr; 51 | String get rx_map => 'rx_map'.tr; 52 | String get rx_expand => 'rx_expand'.tr; 53 | String get rx_merge => 'rx_merge'.tr; 54 | 55 | 56 | @override 57 | Map> get keys => { 58 | 'en_US': { 59 | "app_name": "Flutter Demo", 60 | "home": "Home", 61 | "activity": "activity", 62 | "other": "other", 63 | "greet": "hello~", 64 | "language": "Language", 65 | "count": "GetX Count", 66 | "storage": "Storage", 67 | "connect": "Connect", 68 | "theme": "Theme", 69 | "dio_get":"dio get", 70 | "dio_post":"dio post", 71 | "getx_get": "getx Get", 72 | "getx_post": "getx Post", 73 | "permission": "Permission", 74 | "webview": "WebView", 75 | "pictureSelector": "Picture Selector", 76 | "rx_dart": "RxDart", 77 | "pick_time": "Pick a time", 78 | "sayHello": "hello {name}", 79 | "multiple": "Multiple layout", 80 | "userEventBus": "Welcome to EventBus", 81 | "permissionDenied": "Permission denied", 82 | "ac_unit": "ac unit", 83 | "access_alarm": "access alarm", 84 | "accessibility": "accessibility", 85 | "account_balance": "account balance", 86 | "account_balance_wallet": "account balance wallet", 87 | "add_a_photo": "add a photo", 88 | "add_moderator": "add moderator", 89 | "rx_map": "rx_map", 90 | "rx_expand": "rx_expand", 91 | "rx_merge": "rx_merge", 92 | 93 | }, 94 | 'zh_ZH': { 95 | "app_name": "Flutter示例", 96 | "home": "首页", 97 | "activity": "活动", 98 | "other": "其他", 99 | "greet": "你好~", 100 | "language": "语言", 101 | "count": "GetX计数器", 102 | "storage": "轻量存储", 103 | "connect": "网络请求", 104 | "theme": "主题", 105 | "dio_get":"dio get", 106 | "dio_post":"dio post", 107 | "getx_get": "getx Get", 108 | "getx_post": "getx Post", 109 | "permission": "权限", 110 | "webview": "浏览器", 111 | "pictureSelector": "图片选择器", 112 | "rx_dart": "RxDart使用", 113 | "pick_time": "选择时间", 114 | "sayHello": "你好", 115 | "multiple": "多布局", 116 | "userEventBus": "欢迎使用EventBus", 117 | "permissionDenied": "权限已被拒绝", 118 | "ac_unit": "雪花", 119 | "access_alarm": "闹钟", 120 | "accessibility": "健康", 121 | "account_balance": "酒店", 122 | "account_balance_wallet": "钱包", 123 | "add_a_photo": "摄影", 124 | "add_moderator": "安全", 125 | "add_shopping_cart": "购物", 126 | "rx_map": "rx_map", 127 | "rx_expand": "rx_expand", 128 | "rx_merge": "rx_merge", 129 | } 130 | }; 131 | 132 | 133 | } 134 | 135 | -------------------------------------------------------------------------------- /lib/app/route_observers.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:tin_flutter/app/logger.dart'; 4 | 5 | import 'global.dart'; 6 | 7 | //监听页面路由跳转 8 | class RouteObservers extends NavigatorObserver{ 9 | 10 | @override 11 | void didPush(Route route, Route? previousRoute) { 12 | // TODO: implement didPush 13 | super.didPush(route, previousRoute); 14 | logger("当前路由页: ${route.settings.name}"); 15 | } 16 | 17 | @override 18 | void didPop(Route route, Route? previousRoute) { 19 | // TODO: implement didPop 20 | super.didPop(route, previousRoute); 21 | } 22 | 23 | @override 24 | void didRemove(Route route, Route? previousRoute) { 25 | // TODO: implement didRemove 26 | super.didRemove(route, previousRoute); 27 | } 28 | 29 | @override 30 | void didStartUserGesture(Route route, Route? previousRoute) { 31 | // TODO: implement didStartUserGesture 32 | super.didStartUserGesture(route, previousRoute); 33 | } 34 | 35 | @override 36 | void didStopUserGesture() { 37 | // TODO: implement didStopUserGesture 38 | super.didStopUserGesture(); 39 | } 40 | 41 | 42 | } -------------------------------------------------------------------------------- /lib/app/routes.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:get/get_navigation/src/routes/get_route.dart'; 3 | import 'package:tin_flutter/ui/demo/connect/connect_binding.dart'; 4 | import 'package:tin_flutter/ui/demo/connect/connect_page.dart'; 5 | import 'package:tin_flutter/ui/demo/count/count_binding.dart'; 6 | import 'package:tin_flutter/ui/demo/count/count_page.dart'; 7 | import 'package:tin_flutter/ui/demo/main/main_binding.dart'; 8 | import 'package:tin_flutter/ui/demo/main/main_page.dart'; 9 | import 'package:tin_flutter/ui/demo/multiplex/multiplex_binding.dart'; 10 | import 'package:tin_flutter/ui/demo/multiplex/multiplex_page.dart'; 11 | import 'package:tin_flutter/ui/demo/rx_dart/rx_dart_binding.dart'; 12 | import 'package:tin_flutter/ui/demo/rx_dart/rx_dart_page.dart'; 13 | import 'package:tin_flutter/ui/demo/storage/storage_binding.dart'; 14 | import 'package:tin_flutter/ui/demo/storage/storage_page.dart'; 15 | import 'package:tin_flutter/ui/demo/web/web_binding.dart'; 16 | import 'package:tin_flutter/ui/demo/web/web_page.dart'; 17 | 18 | class Routes { 19 | static final String main = "/"; 20 | static final String multiplex = "/multiplex"; 21 | static final String count = "/count"; 22 | static final String storage = "/storage"; 23 | static final String connect = "/connect"; 24 | static final String webview = "/webview"; 25 | static final String rx_dart = "/rx_dart"; 26 | 27 | static final List getPages=[ 28 | GetPage(name: main, binding: MainBinding(), page: () => MainPage()), 29 | GetPage(name: multiplex,binding: MultiplexBinding(), page: () => MultiplexPage()), 30 | GetPage(name: count,binding: CountBinding(), page: () => CountPage()), 31 | GetPage(name: storage,binding: StorageBinding(), page: () => StoragePage()), 32 | GetPage(name: connect,binding: ConnectBinding(), page: () => ConnectPage()), 33 | GetPage(name: webview,binding: WebBinding(), page: () => WebPage()), 34 | GetPage(name: rx_dart,binding: RxDartBinding(), page: () => RxDartPage()), 35 | 36 | ]; 37 | 38 | } 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/app/widget/header_bar.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | 7 | class HeaderBar extends StatefulWidget implements PreferredSizeWidget { 8 | 9 | final String title; 10 | final Color backgroundColor; 11 | final bool darkMode; 12 | 13 | HeaderBar(this.title, {this.backgroundColor=Colors.blue,this.darkMode = false}); 14 | 15 | @override 16 | State createState() => new HeaderBarState(); 17 | 18 | @override 19 | Size get preferredSize => new Size.fromHeight(56.h); 20 | 21 | } 22 | 23 | class HeaderBarState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | ///设置状态栏和导航栏主题风格 27 | SystemChrome.setSystemUIOverlayStyle(widget.darkMode?SystemUiOverlayStyle.dark:SystemUiOverlayStyle.light); 28 | return Container( 29 | padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight,), 30 | color: widget.backgroundColor, 31 | alignment: Alignment.centerLeft, 32 | child: Stack( 33 | children: [ 34 | Container( 35 | alignment: Alignment.centerLeft, 36 | child: IconButton( 37 | icon: Icon(Icons.arrow_back,color: Colors.white,), 38 | onPressed: () => Get.back(), 39 | ), 40 | ), 41 | Container( 42 | alignment: Alignment.center, 43 | child: Text( 44 | widget.title, 45 | style: TextStyle(color: Colors.white, fontSize: 18.sp), 46 | ), 47 | ), 48 | ], 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/generated/gen/assets.gen.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED CODE - DO NOT MODIFY BY HAND 2 | /// ***************************************************** 3 | /// FlutterGen 4 | /// ***************************************************** 5 | 6 | // coverage:ignore-file 7 | // ignore_for_file: type=lint 8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use 9 | 10 | import 'package:flutter/widgets.dart'; 11 | 12 | class $AssetsColorGen { 13 | const $AssetsColorGen(); 14 | 15 | /// File path: assets/color/colors.xml 16 | String get colors => 'assets/color/colors.xml'; 17 | 18 | /// List of all assets 19 | List get values => [colors]; 20 | } 21 | 22 | class $AssetsImagesGen { 23 | const $AssetsImagesGen(); 24 | 25 | /// File path: assets/images/icon.png 26 | AssetGenImage get icon => const AssetGenImage('assets/images/icon.png'); 27 | 28 | /// List of all assets 29 | List get values => [icon]; 30 | } 31 | 32 | class Assets { 33 | const Assets._(); 34 | 35 | static const $AssetsColorGen color = $AssetsColorGen(); 36 | static const $AssetsImagesGen images = $AssetsImagesGen(); 37 | } 38 | 39 | class AssetGenImage { 40 | const AssetGenImage( 41 | this._assetName, { 42 | this.size, 43 | this.flavors = const {}, 44 | }); 45 | 46 | final String _assetName; 47 | 48 | final Size? size; 49 | final Set flavors; 50 | 51 | Image image({ 52 | Key? key, 53 | AssetBundle? bundle, 54 | ImageFrameBuilder? frameBuilder, 55 | ImageErrorWidgetBuilder? errorBuilder, 56 | String? semanticLabel, 57 | bool excludeFromSemantics = false, 58 | double? scale, 59 | double? width, 60 | double? height, 61 | Color? color, 62 | Animation? opacity, 63 | BlendMode? colorBlendMode, 64 | BoxFit? fit, 65 | AlignmentGeometry alignment = Alignment.center, 66 | ImageRepeat repeat = ImageRepeat.noRepeat, 67 | Rect? centerSlice, 68 | bool matchTextDirection = false, 69 | bool gaplessPlayback = true, 70 | bool isAntiAlias = false, 71 | String? package, 72 | FilterQuality filterQuality = FilterQuality.medium, 73 | int? cacheWidth, 74 | int? cacheHeight, 75 | }) { 76 | return Image.asset( 77 | _assetName, 78 | key: key, 79 | bundle: bundle, 80 | frameBuilder: frameBuilder, 81 | errorBuilder: errorBuilder, 82 | semanticLabel: semanticLabel, 83 | excludeFromSemantics: excludeFromSemantics, 84 | scale: scale, 85 | width: width, 86 | height: height, 87 | color: color, 88 | opacity: opacity, 89 | colorBlendMode: colorBlendMode, 90 | fit: fit, 91 | alignment: alignment, 92 | repeat: repeat, 93 | centerSlice: centerSlice, 94 | matchTextDirection: matchTextDirection, 95 | gaplessPlayback: gaplessPlayback, 96 | isAntiAlias: isAntiAlias, 97 | package: package, 98 | filterQuality: filterQuality, 99 | cacheWidth: cacheWidth, 100 | cacheHeight: cacheHeight, 101 | ); 102 | } 103 | 104 | ImageProvider provider({ 105 | AssetBundle? bundle, 106 | String? package, 107 | }) { 108 | return AssetImage( 109 | _assetName, 110 | bundle: bundle, 111 | package: package, 112 | ); 113 | } 114 | 115 | String get path => _assetName; 116 | 117 | String get keyName => _assetName; 118 | } 119 | -------------------------------------------------------------------------------- /lib/generated/gen/colors.gen.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED CODE - DO NOT MODIFY BY HAND 2 | /// ***************************************************** 3 | /// FlutterGen 4 | /// ***************************************************** 5 | 6 | // coverage:ignore-file 7 | // ignore_for_file: type=lint 8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use 9 | 10 | import 'package:flutter/painting.dart'; 11 | import 'package:flutter/material.dart'; 12 | 13 | class ColorX { 14 | ColorX._(); 15 | 16 | /// Color: #000000 17 | static const Color black = Color(0xFF000000); 18 | 19 | /// MaterialColor: 20 | /// 50: #FFF9E5E5 21 | /// 100: #FFF1BFBF 22 | /// 200: #FFE79595 23 | /// 300: #FFDD6A6A 24 | /// 400: #FFD64A4A 25 | /// 500: #FFCF2A2A 26 | /// 600: #FFCA2525 27 | /// 700: #FFC31F1F 28 | /// 800: #FFBD1919 29 | /// 900: #FFB20F0F 30 | static const MaterialColor crimsonRed = MaterialColor( 31 | 0xFFCF2A2A, 32 | { 33 | 50: Color(0xFFF9E5E5), 34 | 100: Color(0xFFF1BFBF), 35 | 200: Color(0xFFE79595), 36 | 300: Color(0xFFDD6A6A), 37 | 400: Color(0xFFD64A4A), 38 | 500: Color(0xFFCF2A2A), 39 | 600: Color(0xFFCA2525), 40 | 700: Color(0xFFC31F1F), 41 | 800: Color(0xFFBD1919), 42 | 900: Color(0xFFB20F0F), 43 | }, 44 | ); 45 | 46 | /// Color: #979797 47 | static const Color gray410 = Color(0xFF979797); 48 | 49 | /// Color: #EEEEEE 50 | static const Color gray70 = Color(0xFFEEEEEE); 51 | 52 | /// Color: #FFFFFF 53 | static const Color white = Color(0xFFFFFFFF); 54 | 55 | /// MaterialColor: 56 | /// 50: #FFFBF2E5 57 | /// 100: #FFF5DFBE 58 | /// 200: #FFEFCA93 59 | /// 300: #FFE9B568 60 | /// 400: #FFE4A547 61 | /// 500: #FFDF9527 62 | /// 600: #FFDB8D23 63 | /// 700: #FFD7821D 64 | /// 800: #FFD27817 65 | /// 900: #FFCA670E 66 | static const MaterialColor yellowOcher = MaterialColor( 67 | 0xFFDF9527, 68 | { 69 | 50: Color(0xFFFBF2E5), 70 | 100: Color(0xFFF5DFBE), 71 | 200: Color(0xFFEFCA93), 72 | 300: Color(0xFFE9B568), 73 | 400: Color(0xFFE4A547), 74 | 500: Color(0xFFDF9527), 75 | 600: Color(0xFFDB8D23), 76 | 700: Color(0xFFD7821D), 77 | 800: Color(0xFFD27817), 78 | 900: Color(0xFFCA670E), 79 | }, 80 | ); 81 | 82 | /// MaterialAccentColor: 83 | /// 100: #FFFFE8E0 84 | /// 200: #FFFFBCA3 85 | /// 400: #FFFFA989 86 | /// 700: #FFFF9E7A 87 | static const MaterialAccentColor yellowOcherAccent = MaterialAccentColor( 88 | 0xFFFFBCA3, 89 | { 90 | 100: Color(0xFFFFE8E0), 91 | 200: Color(0xFFFFBCA3), 92 | 400: Color(0xFFFFA989), 93 | 700: Color(0xFFFF9E7A), 94 | }, 95 | ); 96 | } 97 | -------------------------------------------------------------------------------- /lib/generated/json/base/json_convert_content.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: non_constant_identifier_names 2 | // ignore_for_file: camel_case_types 3 | // ignore_for_file: prefer_single_quotes 4 | 5 | // This file is automatically generated. DO NOT EDIT, all your changes would be lost. 6 | import 'package:flutter/material.dart' show debugPrint; 7 | import 'package:tin_flutter/ui/bean/chapter_info_entity.dart'; 8 | 9 | JsonConvert jsonConvert = JsonConvert(); 10 | typedef JsonConvertFunction = T Function(Map json); 11 | typedef EnumConvertFunction = T Function(String value); 12 | 13 | class JsonConvert { 14 | static final Map convertFuncMap = { 15 | (ChapterInfoEntity).toString(): ChapterInfoEntity.fromJson, 16 | 17 | }; 18 | 19 | T? convert(dynamic value, {EnumConvertFunction? enumConvert}) { 20 | if (value == null) { 21 | return null; 22 | } 23 | if (value is T) { 24 | return value; 25 | } 26 | try { 27 | return _asT(value, enumConvert: enumConvert); 28 | } catch (e, stackTrace) { 29 | debugPrint('asT<$T> $e $stackTrace'); 30 | return null; 31 | } 32 | } 33 | 34 | List? convertList(List? value, {EnumConvertFunction? enumConvert}) { 35 | if (value == null) { 36 | return null; 37 | } 38 | try { 39 | return value.map((dynamic e) => _asT(e,enumConvert: enumConvert)).toList(); 40 | } catch (e, stackTrace) { 41 | debugPrint('asT<$T> $e $stackTrace'); 42 | return []; 43 | } 44 | } 45 | 46 | List? convertListNotNull(dynamic value, {EnumConvertFunction? enumConvert}) { 47 | if (value == null) { 48 | return null; 49 | } 50 | try { 51 | return (value as List).map((dynamic e) => _asT(e,enumConvert: enumConvert)!).toList(); 52 | } catch (e, stackTrace) { 53 | debugPrint('asT<$T> $e $stackTrace'); 54 | return []; 55 | } 56 | } 57 | 58 | T? _asT(dynamic value, 59 | {EnumConvertFunction? enumConvert}) { 60 | final String type = T.toString(); 61 | final String valueS = value.toString(); 62 | if (enumConvert != null) { 63 | return enumConvert(valueS) as T; 64 | } else if (type == "String") { 65 | return valueS as T; 66 | } else if (type == "int") { 67 | final int? intValue = int.tryParse(valueS); 68 | if (intValue == null) { 69 | return double.tryParse(valueS)?.toInt() as T?; 70 | } else { 71 | return intValue as T; 72 | } 73 | } else if (type == "double") { 74 | return double.parse(valueS) as T; 75 | } else if (type == "DateTime") { 76 | return DateTime.parse(valueS) as T; 77 | } else if (type == "bool") { 78 | if (valueS == '0' || valueS == '1') { 79 | return (valueS == '1') as T; 80 | } 81 | return (valueS == 'true') as T; 82 | } else if (type == "Map" || type.startsWith("Map<")) { 83 | return value as T; 84 | } else { 85 | if (convertFuncMap.containsKey(type)) { 86 | return convertFuncMap[type]!(Map.from(value)) as T; 87 | } else { 88 | throw UnimplementedError('$type unimplemented'); 89 | } 90 | } 91 | } 92 | 93 | //list is returned by type 94 | static M? _getListChildType(List> data) { 95 | if([] is M){ 96 | return data.map((Map e) => ChapterInfoEntity.fromJson(e)).toList() as M; 97 | } 98 | 99 | debugPrint("${M.toString()} not found"); 100 | 101 | return null; 102 | } 103 | 104 | static M? fromJsonAsT(dynamic json) { 105 | if (json is List) { 106 | return _getListChildType(json.map((e) => e as Map).toList()); 107 | } else { 108 | return jsonConvert.convert(json); 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /lib/generated/json/base/json_field.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: non_constant_identifier_names 2 | // ignore_for_file: camel_case_types 3 | // ignore_for_file: prefer_single_quotes 4 | 5 | // This file is automatically generated. DO NOT EDIT, all your changes would be lost. 6 | 7 | class JsonSerializable{ 8 | const JsonSerializable(); 9 | } 10 | 11 | class JSONField { 12 | //Specify the parse field name 13 | final String? name; 14 | 15 | //Whether to participate in toJson 16 | final bool? serialize; 17 | 18 | //Whether to participate in fromMap 19 | final bool? deserialize; 20 | 21 | //Enumeration or not 22 | final bool? isEnum; 23 | 24 | const JSONField({this.name, this.serialize, this.deserialize, this.isEnum}); 25 | } 26 | -------------------------------------------------------------------------------- /lib/generated/json/chapter_info_entity.g.dart: -------------------------------------------------------------------------------- 1 | import 'package:tin_flutter/generated/json/base/json_convert_content.dart'; 2 | import 'package:tin_flutter/ui/bean/chapter_info_entity.dart'; 3 | 4 | ChapterInfoEntity $ChapterInfoEntityFromJson(Map json) { 5 | final ChapterInfoEntity chapterInfoEntity = ChapterInfoEntity(); 6 | final List? children = jsonConvert.convertListNotNull(json['children']); 7 | if (children != null) { 8 | chapterInfoEntity.children = children; 9 | } 10 | final int? courseId = jsonConvert.convert(json['courseId']); 11 | if (courseId != null) { 12 | chapterInfoEntity.courseId = courseId; 13 | } 14 | final String? name = jsonConvert.convert(json['name']); 15 | if (name != null) { 16 | chapterInfoEntity.name = name; 17 | } 18 | final int? order = jsonConvert.convert(json['order']); 19 | if (order != null) { 20 | chapterInfoEntity.order = order; 21 | } 22 | final int? parentChapterId = jsonConvert.convert(json['parentChapterId']); 23 | if (parentChapterId != null) { 24 | chapterInfoEntity.parentChapterId = parentChapterId; 25 | } 26 | final bool? userControlSetTop = jsonConvert.convert(json['userControlSetTop']); 27 | if (userControlSetTop != null) { 28 | chapterInfoEntity.userControlSetTop = userControlSetTop; 29 | } 30 | final int? visible = jsonConvert.convert(json['visible']); 31 | if (visible != null) { 32 | chapterInfoEntity.visible = visible; 33 | } 34 | return chapterInfoEntity; 35 | } 36 | 37 | Map $ChapterInfoEntityToJson(ChapterInfoEntity entity) { 38 | final Map data = {}; 39 | data['children'] = entity.children; 40 | data['courseId'] = entity.courseId; 41 | data['name'] = entity.name; 42 | data['order'] = entity.order; 43 | data['parentChapterId'] = entity.parentChapterId; 44 | data['userControlSetTop'] = entity.userControlSetTop; 45 | data['visible'] = entity.visible; 46 | return data; 47 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:flutter_localizations/flutter_localizations.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | import 'package:get/get_navigation/src/root/get_material_app.dart'; 7 | import 'package:tin_flutter/app/global.dart'; 8 | import 'package:tin_flutter/app/network/http_service.dart'; 9 | import 'package:tin_flutter/app/res/intl.dart'; 10 | import 'package:tin_flutter/app/logger.dart'; 11 | import 'package:tin_flutter/app/routes.dart'; 12 | import 'app/app_data.dart'; 13 | import 'app/route_observers.dart'; 14 | 15 | void main() { 16 | WidgetsFlutterBinding.ensureInitialized(); 17 | runInitApp(MyApp()); 18 | } 19 | ///做一些初始化操作 20 | void runInitApp(Widget app) async { 21 | Logger.init(tag: 'TinFlutter',isDebug: isDebug); 22 | ///初始化本地数据 23 | await AppData.initData(); 24 | HttpService.doInit(); 25 | runApp(app); 26 | } 27 | 28 | // ignore: must_be_immutable 29 | class MyApp extends StatelessWidget { 30 | 31 | // This widget is the root of your application. 32 | @override 33 | Widget build(BuildContext context) { 34 | 35 | SystemChrome.setPreferredOrientations([ 36 | DeviceOrientation.portraitUp,//强制竖屏 37 | DeviceOrientation.portraitDown 38 | ]); 39 | 40 | return ScreenUtilInit( 41 | //填入设计稿中设备的屏幕尺寸,单位dp 42 | designSize: Size(375, 690), 43 | builder: (context,child) => GetMaterialApp( 44 | translations: Intl(), 45 | enableLog: true, 46 | initialRoute: Routes.main, 47 | getPages: Routes.getPages, 48 | navigatorObservers: [RouteObservers()], 49 | locale: Intl().locales[0], 50 | fallbackLocale: Intl().locales[0], ///添加一个默认语言选项,以备上面指定的语言翻译 不存在 51 | supportedLocales: Intl().locales, 52 | localizationsDelegates: [ 53 | // S.delegate, 54 | GlobalMaterialLocalizations.delegate, /// 指定本地化的字符串和一些其他的值 55 | GlobalCupertinoLocalizations.delegate, /// 对应的Cupertino风格 56 | GlobalWidgetsLocalizations.delegate, /// 指定默认的文本排列方向, 由左到右或由右到左 57 | ], 58 | builder: (context,widget){ 59 | return MediaQuery(///设置文字大小不随系统设置改变 60 | data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), 61 | child: widget ?? Container() 62 | ); 63 | }, 64 | ) 65 | ); 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /lib/ui/bean/base_response_entity.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:tin_flutter/generated/json/base/json_convert_content.dart'; 3 | 4 | class BaseResponseEntity { 5 | 6 | T? data; 7 | int? errorCode; 8 | String? errorMsg; 9 | 10 | BaseResponseEntity.fromJson(dynamic result){ 11 | if(result is Map){ 12 | errorCode = result['errorCode']; 13 | errorMsg = result['errorMsg']; 14 | data = JsonConvert.fromJsonAsT(result['data']); 15 | } 16 | } 17 | 18 | bool isOk(){ 19 | return errorCode == 0; 20 | } 21 | 22 | 23 | 24 | } -------------------------------------------------------------------------------- /lib/ui/bean/chapter_info_entity.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:tin_flutter/generated/json/base/json_field.dart'; 4 | import 'package:tin_flutter/generated/json/chapter_info_entity.g.dart'; 5 | 6 | @JsonSerializable() 7 | class ChapterInfoEntity { 8 | 9 | List? children; 10 | int? courseId; 11 | String? name; 12 | int? order; 13 | int? parentChapterId; 14 | bool? userControlSetTop; 15 | int? visible; 16 | 17 | ChapterInfoEntity(); 18 | 19 | factory ChapterInfoEntity.fromJson(Map json) => $ChapterInfoEntityFromJson(json); 20 | 21 | Map toJson() => $ChapterInfoEntityToJson(this); 22 | 23 | @override 24 | String toString() { 25 | return jsonEncode(this); 26 | } 27 | } -------------------------------------------------------------------------------- /lib/ui/bean/event_task_bean.dart: -------------------------------------------------------------------------------- 1 | ///event事件源 2 | ///key可用于区分不同事件 3 | ///value用于事件传值 4 | class EventTaskBean{ 5 | EventTaskBean(this.key, this.value); 6 | 7 | int key; 8 | Object value; 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /lib/ui/demo/connect/connect_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:tin_flutter/app/network/app_connect.dart'; 3 | 4 | import 'connect_logic.dart'; 5 | 6 | class ConnectBinding extends Bindings { 7 | @override 8 | void dependencies() { 9 | Get.lazyPut(() => ConnectLogic()); 10 | Get.lazyPut(() => AppConnect()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/ui/demo/connect/connect_logic.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:get/get.dart'; 3 | import 'package:tin_flutter/app/network/http_service.dart'; 4 | import 'connect_state.dart'; 5 | 6 | class ConnectLogic extends GetxController { 7 | final state = ConnectState(); 8 | 9 | @override 10 | void onReady() { 11 | // TODO: implement onReady 12 | super.onReady(); 13 | } 14 | 15 | @override 16 | void onClose() { 17 | // TODO: implement onClose 18 | super.onClose(); 19 | } 20 | 21 | 22 | void createGet() async { 23 | 24 | var array = List.empty(growable: true); 25 | 26 | HttpService.getChapters().then((value) { 27 | array.clear(); 28 | value.forEach((element) { 29 | array.add(element.name); 30 | }); 31 | state.result.value = '${array.toString()}'; 32 | }); 33 | // var future = AppConnect().get>>('/wxarticle/chapters/json',decoder: (data) => BaseResponseEntity.fromJson(data)); 34 | // loggerArray(['请求请求',future.runtimeType.toString()]); 35 | // future.then((value){ 36 | // array.clear(); 37 | // value.body?.data?.forEach((element) { 38 | // array.add(element.name); 39 | // }); 40 | // state.result.value = '${array.toString()}'; 41 | // },onError:(error, stackTrace){ 42 | // ErrorResponseHandler().onErrorHandle(error,stackTrace: stackTrace); 43 | // }); 44 | } 45 | 46 | void createPost(){ 47 | // var formData = FormData({'k': "flutter"}); 48 | // AppConnect().post('/article/query/0/json', formData).then((value) => { 49 | // state.result.value = '${value.bodyString}' 50 | // },onError: (error, stackTrace) => { 51 | // 52 | // }); 53 | HttpService.queryArticle({'k': "flutter"}).then((value) { 54 | state.result.value = value; 55 | }); 56 | } 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /lib/ui/demo/connect/connect_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import 'connect_logic.dart'; 6 | import 'connect_state.dart'; 7 | 8 | class ConnectPage extends StatefulWidget { 9 | @override 10 | _ConnectPageState createState() => _ConnectPageState(); 11 | } 12 | 13 | class _ConnectPageState extends State { 14 | final logic = Get.find(); 15 | final ConnectState state = Get.find().state; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | appBar: AppBar( 21 | title: Text(Intl().connect), 22 | automaticallyImplyLeading: true, 23 | leading: IconButton( 24 | icon: Icon(Icons.arrow_back), 25 | onPressed: () => Get.back(), 26 | ), 27 | ), 28 | body: Column( 29 | children: [ 30 | Row( 31 | children: [ 32 | TextButton( 33 | child: Text(Intl().getx_get), 34 | onPressed: () => { 35 | logic.createGet() 36 | }, 37 | ), 38 | TextButton( 39 | child: Text(Intl().getx_post), 40 | onPressed: () => { 41 | logic.createPost() 42 | }, 43 | ), 44 | ], 45 | ), 46 | Expanded( 47 | child: Obx(()=> Text('${state.result}'),), 48 | ), 49 | ], 50 | ), 51 | ); 52 | } 53 | 54 | @override 55 | void dispose() { 56 | Get.delete(); 57 | super.dispose(); 58 | } 59 | } -------------------------------------------------------------------------------- /lib/ui/demo/connect/connect_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class ConnectState { 4 | ConnectState() { 5 | ///Initialize variables 6 | } 7 | 8 | var result = "".obs; 9 | 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/ui/demo/count/count_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'count_logic.dart'; 4 | 5 | class CountBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => CountLogic()); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/ui/demo/count/count_logic.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:get/get.dart'; 3 | 4 | import 'count_state.dart'; 5 | 6 | class CountLogic extends GetxController { 7 | final state = CountState(); 8 | 9 | @override 10 | void onReady() { 11 | super.onReady(); 12 | printInfo(info: "传递过来的参数: ${Get.arguments.toString()}"); 13 | } 14 | 15 | @override 16 | void onClose() { 17 | super.onClose(); 18 | } 19 | 20 | ///自增 21 | void increase() => ++state.count; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /lib/ui/demo/count/count_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | import 'count_logic.dart'; 7 | import 'count_state.dart'; 8 | 9 | class CountPage extends StatefulWidget { 10 | @override 11 | _CountPageState createState() => _CountPageState(); 12 | } 13 | 14 | class _CountPageState extends State { 15 | final logic = Get.find(); 16 | final CountState state = Get.find().state; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Scaffold( 21 | appBar: AppBar( 22 | title: Text(Intl().count), 23 | automaticallyImplyLeading: true, 24 | leading: IconButton( 25 | icon: Icon(Icons.arrow_back), 26 | onPressed: () => Get.back(), 27 | ), 28 | ), 29 | body: Center( 30 | child: Obx( 31 | () => Text('${state.count.value}', 32 | style: TextStyle(fontSize: 30.sp)), 33 | ), 34 | ), 35 | floatingActionButton: FloatingActionButton( 36 | onPressed: () => logic.increase(), 37 | child: const Icon(Icons.add), 38 | ), 39 | ); 40 | } 41 | 42 | @override 43 | void dispose() { 44 | Get.delete(); 45 | super.dispose(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/ui/demo/count/count_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class CountState { 4 | CountState() { 5 | ///Initialize variables 6 | } 7 | 8 | var count = 0.obs; 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/ui/demo/dynamic/dynamic_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | 4 | class DynamicState { 5 | 6 | DynamicState() { 7 | ///Initialize variables 8 | } 9 | 10 | var count = 40.obs; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/ui/demo/home/home_state.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | class HomeState { 5 | 6 | HomeState() { 7 | ///Initialize variables 8 | } 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/ui/demo/main/dynamic_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:tin_flutter/app/res/intl.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | import 'package:tin_flutter/app/res/intl.dart'; 6 | 7 | import 'main_logic.dart'; 8 | 9 | class DynamicPage extends StatefulWidget { 10 | @override 11 | _DynamicState createState() => _DynamicState(); 12 | 13 | } 14 | 15 | class _DynamicState extends State { 16 | final logic = Get.find(); 17 | final state = Get.find().state; 18 | 19 | final List entries = ['A', 'B', 'C', 'D','E','F','G','H','I','J']; 20 | final List colorCodes = [900,800,700,600, 500, 400, 300, 200, 100,50]; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | // TODO: implement build 25 | return Scaffold( 26 | appBar: AppBar( 27 | title: Text(Intl().activity), 28 | ), 29 | body: Obx( ()=> ListView.builder( 30 | padding: EdgeInsets.all(8.r), 31 | itemCount: state.count.value, 32 | itemBuilder:(BuildContext context, int index) { 33 | return Container( 34 | height: 30.h, 35 | color: Colors.amber[colorCodes[index%10]], 36 | child: Center(child: Text('Entry ${entries[index%10]}')), 37 | ); 38 | } 39 | )), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/ui/demo/main/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:tin_flutter/app/res/intl.dart'; 4 | import 'package:tin_flutter/app/routes.dart'; 5 | import 'package:tin_flutter/app/global.dart'; 6 | import 'package:tin_flutter/ui/bean/event_task_bean.dart'; 7 | 8 | import 'main_logic.dart'; 9 | 10 | class HomePage extends StatefulWidget { 11 | HomePage({Key? key}) : super(key: key); 12 | 13 | @override 14 | _HomeState createState() => _HomeState(); 15 | } 16 | 17 | class _HomeState extends State { 18 | final logic = Get.find(); 19 | final state = Get.find().state; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | // TODO: implement build 24 | return Scaffold( 25 | appBar: AppBar( 26 | title: Text(Intl().home), 27 | ), 28 | body: Column( 29 | children: [ 30 | Wrap( 31 | spacing: 8, 32 | runSpacing: 4, 33 | alignment: WrapAlignment.start, 34 | children: [ 35 | TextButton( 36 | child: Text(Intl().language), 37 | onPressed: () => logic.changeLanguage(), 38 | ), 39 | TextButton( 40 | child: Text(Intl().count), 41 | onPressed: () => { 42 | Get.toNamed(Routes.count, 43 | arguments: {"title": Intl().count}), 44 | }, 45 | ), 46 | TextButton( 47 | child: Text(Intl().storage), 48 | onPressed: () => { 49 | Get.toNamed(Routes.storage), 50 | }, 51 | ), 52 | TextButton( 53 | child: Text(Intl().theme), 54 | onPressed: () => { 55 | Get.changeTheme( 56 | Get.isDarkMode ? ThemeData.light() : ThemeData.dark()), 57 | }, 58 | ), 59 | TextButton( 60 | child: Text(Intl().connect), 61 | onPressed: () => { 62 | Get.toNamed(Routes.connect), 63 | }, 64 | ), 65 | TextButton( 66 | onPressed: () => { 67 | if (GetPlatform.isAndroid || GetPlatform.isIOS) 68 | {logic.checkPermission(context)} 69 | }, 70 | child: Text(Intl().permission)), 71 | TextButton( 72 | onPressed: () => { 73 | if (GetPlatform.isAndroid || GetPlatform.isIOS) 74 | {Get.toNamed(Routes.webview)} 75 | }, 76 | child: Text(Intl().webview)), 77 | TextButton( 78 | onPressed: () => { 79 | // AssetPicker.pickAssets(context) 80 | // .then((value) => {logger('文件选择的结果${value?.length}')}) 81 | }, 82 | child: Text(Intl().pictureSelector), 83 | ), 84 | TextButton( 85 | onPressed: () => { 86 | Get.toNamed(Routes.rx_dart), 87 | }, 88 | child: Text(Intl().rx_dart), 89 | ), 90 | TextButton( 91 | child: Text(Intl().multiple), 92 | onPressed: () => { 93 | behaviorBus 94 | .fire(EventTaskBean(0, Intl().userEventBus)), 95 | Get.toNamed(Routes.multiplex), 96 | }, 97 | ), 98 | ], 99 | ), 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/ui/demo/main/main_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'main_logic.dart'; 4 | 5 | class MainBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => MainLogic()); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/ui/demo/main/main_logic.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:permission_handler/permission_handler.dart'; 5 | import 'package:tin_flutter/app/global.dart'; 6 | import 'package:tin_flutter/app/res/intl.dart'; 7 | import 'main_state.dart'; 8 | 9 | class MainLogic extends GetxController { 10 | final state = MainState(); 11 | 12 | @override 13 | void onReady() { 14 | // TODO: implement onReady 15 | super.onReady(); 16 | } 17 | 18 | @override 19 | void onClose() { 20 | // TODO: implement onClose 21 | super.onClose(); 22 | } 23 | 24 | Future checkPermission(BuildContext context) async { 25 | ///android权限申请需要在AndroidManifest.xml里添加对应的权限声明 26 | ///iOS 27 | // You can request multiple permissions at once. 28 | Map statuses = await [ 29 | Permission.phone, 30 | Permission.storage, 31 | ].request(); 32 | statuses.forEach((key, value) { 33 | if(value.isDenied){///被拒绝了 34 | showToast('permissionDenied'.tr); 35 | return; 36 | } 37 | }); 38 | } 39 | 40 | changeLanguage() { 41 | var locale = Get.locale; 42 | if(locale?.languageCode == 'cn'){ 43 | Get.updateLocale(Locale('en','EN')); 44 | } else { 45 | Get.updateLocale(Locale('cn','ZH')); 46 | } 47 | // for (var localeFile in S.delegate.supportedLocales) { 48 | // print("语言切换${locale.toString()}--${localeFile.toString()}"); 49 | // if (localeFile.languageCode != locale?.languageCode) { 50 | // Get.updateLocale(localeFile); 51 | // // MyAppState.appData.changeLocale(localeFile); 52 | // return; 53 | // } 54 | // } 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /lib/ui/demo/main/main_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import '../mine/mine_page.dart'; 6 | import 'dynamic_page.dart'; 7 | import 'home_page.dart'; 8 | import 'main_logic.dart'; 9 | import 'main_state.dart'; 10 | 11 | class MainPage extends StatefulWidget { 12 | @override 13 | _MainPageState createState() => _MainPageState(); 14 | } 15 | 16 | class _MainPageState extends State { 17 | final logic = Get.find(); 18 | final MainState state = Get.find().state; 19 | PageController? _pageConIntloller; 20 | List pages = [HomePage(), DynamicPage(), MinePage()]; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | _pageConIntloller = PageController(); 25 | 26 | return Scaffold( 27 | body: PageView( 28 | children: pages, //这个就类似于viewpage 29 | controller: _pageConIntloller, 30 | onPageChanged: (index) { 31 | state.selectedIndex.value = index; 32 | }, 33 | ), 34 | bottomNavigationBar: Obx( ()=> 35 | BottomNavigationBar( 36 | items: [ 37 | BottomNavigationBarItem(icon: Icon(Icons.home), label: Intl().home), 38 | BottomNavigationBarItem( 39 | icon: Icon(Icons.dynamic_form), label: Intl().activity 40 | ), 41 | BottomNavigationBarItem( 42 | icon: Icon(Icons.supervisor_account), label: Intl().other 43 | ), 44 | ], 45 | currentIndex: state.selectedIndex.value, 46 | fixedColor: Colors.blue, 47 | type: BottomNavigationBarType.fixed, 48 | onTap: _onItemTapped, 49 | ), 50 | ), 51 | ); 52 | } 53 | 54 | void _onItemTapped(int index) { 55 | _pageConIntloller?.jumpToPage(index); 56 | } 57 | 58 | @override 59 | void dispose() { 60 | _pageConIntloller?.dispose(); 61 | Get.delete(); 62 | super.dispose(); 63 | } 64 | 65 | 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /lib/ui/demo/main/main_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | 4 | class MainState { 5 | 6 | MainState() { 7 | ///Initialize variables 8 | } 9 | 10 | 11 | var count = 40.obs; 12 | var selectedIndex = 0.obs; 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /lib/ui/demo/main/mine_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | 6 | import 'main_logic.dart'; 7 | import 'main_state.dart'; 8 | 9 | class MinePage extends StatefulWidget { 10 | MinePage({Key? key}) : super(key: key); 11 | 12 | @override 13 | _MineState createState() => _MineState(); 14 | } 15 | 16 | class _MineState extends State { 17 | 18 | final logic = Get.find(); 19 | final MainState state = Get.find().state; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | // TODO: implement build 24 | return Scaffold( 25 | appBar: AppBar( 26 | title: Text(Intl().other), 27 | ), 28 | body: Center( 29 | child: Text(Intl().other), 30 | ), 31 | ); 32 | } 33 | 34 | 35 | 36 | 37 | 38 | } -------------------------------------------------------------------------------- /lib/ui/demo/mine/mine_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import 'package:tin_flutter/ui/demo/main/main_logic.dart'; 6 | 7 | class MinePage extends StatefulWidget { 8 | MinePage({Key? key}) : super(key: key); 9 | 10 | @override 11 | _MineState createState() => _MineState(); 12 | } 13 | 14 | class _MineState extends State { 15 | 16 | final logic = Get.find(); 17 | final state = Get.find().state; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | // TODO: implement build 22 | return Scaffold( 23 | appBar: AppBar( 24 | title: Text(Intl().other), 25 | ), 26 | body: Center( 27 | child: Wrap( 28 | crossAxisAlignment: WrapCrossAlignment.center, 29 | direction: Axis.vertical, 30 | children: [ 31 | // Image.asset(Images.ic_launcher), 32 | Text(Intl().other) 33 | ], 34 | ), 35 | ), 36 | ); 37 | } 38 | 39 | 40 | 41 | 42 | 43 | } -------------------------------------------------------------------------------- /lib/ui/demo/mine/mine_state.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | class MineState { 5 | 6 | MineState() { 7 | ///Initialize variables 8 | } 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/ui/demo/multiplex/multiplex_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'multiplex_logic.dart'; 4 | 5 | class MultiplexBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => MultiplexLogic()); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/ui/demo/multiplex/multiplex_logic.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:get/get.dart'; 3 | import 'package:tin_flutter/app/global.dart'; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import 'package:tin_flutter/ui/bean/event_task_bean.dart'; 6 | 7 | import 'multiplex_state.dart'; 8 | 9 | class MultiplexLogic extends GetxController { 10 | final state = MultiplexState(); 11 | StreamSubscription? subscription; 12 | 13 | @override 14 | void onReady() { 15 | super.onReady(); 16 | subscription = behaviorBus.on().listen((event) { 17 | // logger('sayHello'.tr);//event.value 18 | showToast(Intl().sayHello); 19 | }); 20 | } 21 | 22 | @override 23 | void onClose() { 24 | super.onClose(); 25 | subscription?.cancel(); 26 | } 27 | 28 | void increase() => state.count.value+=50; 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /lib/ui/demo/multiplex/multiplex_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:tin_flutter/app/global.dart'; 7 | import 'package:tin_flutter/app/res/intl.dart'; 8 | import 'package:tin_flutter/generated/gen/colors.gen.dart'; 9 | import '../../../generated/gen/assets.gen.dart'; 10 | import 'multiplex_logic.dart'; 11 | import 'multiplex_state.dart'; 12 | 13 | class MultiplexPage extends StatefulWidget { 14 | @override 15 | _MultiplexPageState createState() => _MultiplexPageState(); 16 | } 17 | 18 | class _MultiplexPageState extends State 19 | with SingleTickerProviderStateMixin { 20 | final logic = Get.find(); 21 | final MultiplexState state = Get.find().state; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | body: EasyRefresh.builder( 27 | builder: (context, physics, header, footer) { 28 | return CustomScrollView( 29 | physics: physics, 30 | slivers: [ 31 | SliverAppBar( 32 | title: Text(Intl().multiple), 33 | pinned: true, 34 | ), 35 | header as Widget, 36 | SliverList( 37 | delegate: SliverChildListDelegate([ 38 | SizedBox( 39 | height: 150.h, 40 | child: PageView(children: getBannerWidget()), 41 | ), 42 | buildGridView(context), 43 | ]), 44 | ), 45 | Obx( ()=> SliverList( 46 | delegate: SliverChildBuilderDelegate((context, index) { 47 | return GestureDetector( 48 | onTap: () { 49 | showToast(Intl().sayHello); 50 | }, 51 | child: Card( 52 | child: new Container( 53 | height: 60.h, 54 | padding: EdgeInsets.only(left: 20.r), 55 | alignment: Alignment.center, 56 | child: new Text("Item $index",textAlign: TextAlign.center,), 57 | ), 58 | ), 59 | ); 60 | }, childCount: state.count.value), 61 | ) 62 | ), 63 | footer as Widget, 64 | ], 65 | ); 66 | }, 67 | onRefresh: () async { 68 | await Future.delayed(Duration(microseconds: 100), () { 69 | if (mounted) { 70 | ///此state对象当前在树中 71 | state.count.value=20; 72 | } 73 | }); 74 | }, 75 | onLoad: () async { 76 | await Future.delayed(Duration(microseconds: 100), () { 77 | if (mounted) { 78 | logic.increase(); 79 | } 80 | }); 81 | }, 82 | ), 83 | ); 84 | } 85 | 86 | @override 87 | void dispose() { 88 | Get.delete(); 89 | super.dispose(); 90 | } 91 | 92 | /// 获取头部banner数据 93 | List getBannerWidget() { 94 | List colors = [ 95 | Colors.redAccent, 96 | Colors.blueAccent, 97 | Colors.greenAccent, 98 | Colors.yellowAccent 99 | ]; 100 | List widgets = []; 101 | colors.forEach((element) { 102 | widgets.add( 103 | Container( 104 | color: element, 105 | margin: EdgeInsets.symmetric(horizontal: 15.r, vertical: 10.r), 106 | ), 107 | ); 108 | }); 109 | return widgets; 110 | } 111 | 112 | ///构建横纵列表 113 | Widget buildGridView(BuildContext context) { 114 | List items=[ 115 | ActionItem(Icons.ac_unit, Intl().ac_unit), 116 | ActionItem(Icons.access_alarm, Intl().access_alarm), 117 | ActionItem(Icons.accessibility, Intl().accessibility), 118 | ActionItem(Icons.account_balance, Intl().account_balance), 119 | ActionItem(Icons.account_balance_wallet, Intl().account_balance_wallet), 120 | ActionItem(Icons.add_a_photo, Intl().add_a_photo), 121 | ActionItem(Icons.add_moderator, Intl().add_moderator), 122 | ActionItem(Icons.add_shopping_cart, Intl().add_shopping_cart), 123 | ]; 124 | return GridView.builder( 125 | shrinkWrap: true, 126 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 127 | crossAxisCount: 4, 128 | childAspectRatio: 1.7, 129 | ), 130 | itemBuilder: (context, index) { 131 | var action = items[index]; 132 | return GestureDetector( 133 | onTap: () { 134 | showToast(Intl().sayHello); 135 | }, 136 | child: Column( 137 | mainAxisAlignment: MainAxisAlignment.center, 138 | children: [ 139 | Icon(action.iconData), 140 | Text(action.title) 141 | ], 142 | ) 143 | ); 144 | }, 145 | itemCount: items.length, 146 | ); 147 | } 148 | } 149 | 150 | class ActionItem { 151 | final String title; 152 | final IconData iconData; 153 | const ActionItem(this.iconData,this.title); 154 | } 155 | -------------------------------------------------------------------------------- /lib/ui/demo/multiplex/multiplex_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class MultiplexState { 4 | MultiplexState() { 5 | ///Initialize variables 6 | } 7 | 8 | // 条目总数 9 | var count = 20.obs; 10 | 11 | 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /lib/ui/demo/rx_dart/rx_dart_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'rx_dart_logic.dart'; 4 | 5 | class RxDartBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => RxDartLogic()); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/ui/demo/rx_dart/rx_dart_logic.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'rx_dart_state.dart'; 4 | 5 | class RxDartLogic extends GetxController { 6 | final state = RxDartState(); 7 | 8 | @override 9 | void onReady() { 10 | // TODO: implement onReady 11 | super.onReady(); 12 | } 13 | 14 | @override 15 | void onClose() { 16 | // TODO: implement onClose 17 | super.onClose(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/ui/demo/rx_dart/rx_dart_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart' hide Rx; 4 | import 'package:tin_flutter/app/res/intl.dart'; 5 | import 'package:tin_flutter/app/logger.dart'; 6 | import 'package:tin_flutter/app/network/app_connect.dart'; 7 | import 'package:tin_flutter/app/widget/header_bar.dart'; 8 | import 'package:rxdart/rxdart.dart'; 9 | import 'rx_dart_logic.dart'; 10 | import 'rx_dart_state.dart'; 11 | 12 | class RxDartPage extends StatefulWidget { 13 | @override 14 | _RxDartPageState createState() => _RxDartPageState(); 15 | } 16 | 17 | class _RxDartPageState extends State { 18 | final logic = Get.find(); 19 | final RxDartState state = Get.find().state; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | appBar: HeaderBar( 25 | Intl().rx_dart, 26 | backgroundColor: Colors.amberAccent, 27 | ), 28 | body: Wrap( 29 | spacing: 4, 30 | children: [ 31 | TextButton( 32 | onPressed: () => { 33 | Stream.fromIterable(['1', '2', '3']) 34 | .map((event) => event + '0') 35 | .listen((event) { 36 | logger('下游收到的$event'); 37 | }) 38 | }, 39 | child: Text(Intl().rx_map), 40 | ), 41 | TextButton( 42 | onPressed: () => { 43 | Stream.fromIterable(['1', '2', '3']) 44 | .expand((element) => [element,'4','5']) 45 | .listen((event) { 46 | logger('下游收到的$event'); 47 | }), 48 | }, 49 | child: Text(Intl().rx_expand), 50 | ), 51 | TextButton( 52 | onPressed: () => { 53 | Rx.merge([ 54 | Stream.fromIterable(['1', '2', '3']) 55 | ,Stream.fromIterable(['4', '5', '6']) 56 | ,Stream.fromIterable(['7', '8', '9']) 57 | ]).listen((event) { 58 | logger('下游收到的$event'); 59 | }), 60 | }, 61 | child: Text(Intl().rx_merge), 62 | ), 63 | ], 64 | ), 65 | ); 66 | } 67 | 68 | @override 69 | void dispose() { 70 | Get.delete(); 71 | Get.delete(); 72 | super.dispose(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/ui/demo/rx_dart/rx_dart_state.dart: -------------------------------------------------------------------------------- 1 | class RxDartState { 2 | RxDartState() { 3 | ///Initialize variables 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/ui/demo/storage/storage_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'storage_logic.dart'; 4 | 5 | class StorageBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => StorageLogic()); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/ui/demo/storage/storage_logic.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:get/get.dart'; 4 | import 'package:tin_flutter/app/app_data.dart'; 5 | 6 | import 'storage_state.dart'; 7 | 8 | class StorageLogic extends GetxController { 9 | final state = StorageState(); 10 | 11 | @override 12 | void onReady() { 13 | // TODO: implement onReady 14 | super.onReady(); 15 | } 16 | 17 | @override 18 | void onClose() { 19 | // TODO: implement onClose 20 | super.onClose(); 21 | } 22 | 23 | void increase(){ 24 | state.localIndex.value = Random().nextInt(1000); 25 | AppData.saveLocaleIndex(state.localIndex.value); 26 | } 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /lib/ui/demo/storage/storage_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:tin_flutter/app/res/intl.dart'; 6 | import 'storage_logic.dart'; 7 | import 'storage_state.dart'; 8 | 9 | class StoragePage extends StatefulWidget { 10 | @override 11 | _StoragePageState createState() => _StoragePageState(); 12 | } 13 | 14 | class _StoragePageState extends State { 15 | final logic = Get.find(); 16 | final StorageState state = Get.find().state; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Scaffold( 21 | appBar: AppBar( 22 | title: Text(Intl().sayHello), 23 | automaticallyImplyLeading: true, 24 | leading: IconButton( 25 | icon: Icon(Icons.arrow_back), 26 | onPressed: () => Get.back(), 27 | ), 28 | ), 29 | body: Center( 30 | child: Obx( 31 | () => Text( 32 | '${state.localIndex.value}', 33 | style: TextStyle(fontSize: 30.sp) 34 | ), 35 | ), 36 | ), 37 | floatingActionButton: FloatingActionButton( 38 | child: const Icon(Icons.add_box), 39 | onPressed: () { 40 | logic.increase(); 41 | }, 42 | ), 43 | ); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | Get.delete(); 49 | super.dispose(); 50 | } 51 | } -------------------------------------------------------------------------------- /lib/ui/demo/storage/storage_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:tin_flutter/app/app_data.dart'; 3 | 4 | 5 | class StorageState { 6 | StorageState() { 7 | ///Initialize variables 8 | } 9 | 10 | var localIndex = AppData.queryLocaleIndex().obs; 11 | 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /lib/ui/demo/web/web_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import 'web_logic.dart'; 4 | 5 | class WebBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut(() => WebLogic()); 9 | } 10 | 11 | 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /lib/ui/demo/web/web_logic.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'web_state.dart'; 3 | 4 | class WebLogic extends GetxController { 5 | final state = WebState(); 6 | 7 | @override 8 | void onReady() { 9 | super.onReady(); 10 | } 11 | 12 | @override 13 | void onClose() { 14 | // TODO: implement onClose 15 | super.onClose(); 16 | } 17 | 18 | 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /lib/ui/demo/web/web_page.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_inappwebview/flutter_inappwebview.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:tin_flutter/app/res/intl.dart'; 6 | 7 | import 'web_logic.dart'; 8 | import 'web_state.dart'; 9 | 10 | class WebPage extends StatefulWidget { 11 | @override 12 | _WebPageState createState() => _WebPageState(); 13 | } 14 | 15 | class _WebPageState extends State { 16 | final logic = Get.find(); 17 | final WebState state = Get.find().state; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: AppBar( 23 | title: Text(Intl().webview), 24 | automaticallyImplyLeading: true, 25 | leading: IconButton( 26 | icon: Icon(Icons.arrow_back), 27 | onPressed: () => Get.back(), 28 | ), 29 | ), 30 | body: Column( 31 | children: [ 32 | Obx( 33 | () => Visibility( 34 | child: LinearProgressIndicator( 35 | value: state.progress.value/100,//取值为0-1 36 | minHeight: 3, 37 | valueColor: AlwaysStoppedAnimation(Colors.amberAccent), 38 | backgroundColor: Colors.white, 39 | ), 40 | visible: state.progressVisible.value, 41 | ), 42 | ), 43 | Expanded( 44 | child: Container( 45 | child: InAppWebView( 46 | initialUrlRequest: URLRequest(url: WebUri('https://juejin.cn/post/6988699252981497893')), 47 | // onWebViewCreated: (controller)=> logic.loadPage(controller), 48 | initialOptions: InAppWebViewGroupOptions( 49 | android: AndroidInAppWebViewOptions( 50 | loadWithOverviewMode: false, 51 | overScrollMode: AndroidOverScrollMode.OVER_SCROLL_NEVER, 52 | displayZoomControls: false, 53 | builtInZoomControls: false, 54 | useWideViewPort: false, 55 | ), 56 | ios: IOSInAppWebViewOptions( 57 | disallowOverScroll: true, 58 | enableViewportScale: true, 59 | ignoresViewportScaleLimits: true, 60 | ), 61 | ), 62 | onProgressChanged: (controller,pg){ 63 | state.progress.value = pg.toDouble(); 64 | state.progressVisible.value = pg != 100; 65 | }, 66 | ), 67 | ), 68 | ), 69 | ], 70 | )); 71 | } 72 | 73 | @override 74 | void dispose() { 75 | Get.delete(); 76 | super.dispose(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/ui/demo/web/web_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class WebState { 4 | WebState() { 5 | ///Initialize variables 6 | } 7 | 8 | var progress = 0.0.obs; 9 | var progressVisible= true.obs;//显示隐藏 10 | 11 | } 12 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "76.0.0" 12 | _macros: 13 | dependency: transitive 14 | description: dart 15 | source: sdk 16 | version: "0.3.3" 17 | analyzer: 18 | dependency: transitive 19 | description: 20 | name: analyzer 21 | sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" 22 | url: "https://pub.dev" 23 | source: hosted 24 | version: "6.11.0" 25 | archive: 26 | dependency: transitive 27 | description: 28 | name: archive 29 | sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" 30 | url: "https://pub.dev" 31 | source: hosted 32 | version: "4.0.7" 33 | args: 34 | dependency: transitive 35 | description: 36 | name: args 37 | sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 38 | url: "https://pub.dev" 39 | source: hosted 40 | version: "2.7.0" 41 | async: 42 | dependency: transitive 43 | description: 44 | name: async 45 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 46 | url: "https://pub.dev" 47 | source: hosted 48 | version: "2.11.0" 49 | boolean_selector: 50 | dependency: transitive 51 | description: 52 | name: boolean_selector 53 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 54 | url: "https://pub.dev" 55 | source: hosted 56 | version: "2.1.1" 57 | build: 58 | dependency: transitive 59 | description: 60 | name: build 61 | sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" 62 | url: "https://pub.dev" 63 | source: hosted 64 | version: "2.4.1" 65 | build_config: 66 | dependency: transitive 67 | description: 68 | name: build_config 69 | sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 70 | url: "https://pub.dev" 71 | source: hosted 72 | version: "1.1.1" 73 | build_daemon: 74 | dependency: transitive 75 | description: 76 | name: build_daemon 77 | sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" 78 | url: "https://pub.dev" 79 | source: hosted 80 | version: "4.0.2" 81 | build_resolvers: 82 | dependency: transitive 83 | description: 84 | name: build_resolvers 85 | sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" 86 | url: "https://pub.dev" 87 | source: hosted 88 | version: "2.4.2" 89 | build_runner: 90 | dependency: "direct dev" 91 | description: 92 | name: build_runner 93 | sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" 94 | url: "https://pub.dev" 95 | source: hosted 96 | version: "2.4.13" 97 | build_runner_core: 98 | dependency: transitive 99 | description: 100 | name: build_runner_core 101 | sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 102 | url: "https://pub.dev" 103 | source: hosted 104 | version: "7.3.2" 105 | built_collection: 106 | dependency: transitive 107 | description: 108 | name: built_collection 109 | sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" 110 | url: "https://pub.dev" 111 | source: hosted 112 | version: "5.1.1" 113 | built_value: 114 | dependency: transitive 115 | description: 116 | name: built_value 117 | sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 118 | url: "https://pub.dev" 119 | source: hosted 120 | version: "8.9.5" 121 | characters: 122 | dependency: transitive 123 | description: 124 | name: characters 125 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 126 | url: "https://pub.dev" 127 | source: hosted 128 | version: "1.3.0" 129 | checked_yaml: 130 | dependency: transitive 131 | description: 132 | name: checked_yaml 133 | sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff 134 | url: "https://pub.dev" 135 | source: hosted 136 | version: "2.0.3" 137 | clock: 138 | dependency: transitive 139 | description: 140 | name: clock 141 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 142 | url: "https://pub.dev" 143 | source: hosted 144 | version: "1.1.1" 145 | code_builder: 146 | dependency: transitive 147 | description: 148 | name: code_builder 149 | sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" 150 | url: "https://pub.dev" 151 | source: hosted 152 | version: "4.10.1" 153 | collection: 154 | dependency: transitive 155 | description: 156 | name: collection 157 | sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 158 | url: "https://pub.dev" 159 | source: hosted 160 | version: "1.19.0" 161 | color: 162 | dependency: transitive 163 | description: 164 | name: color 165 | sha256: ddcdf1b3badd7008233f5acffaf20ca9f5dc2cd0172b75f68f24526a5f5725cb 166 | url: "https://pub.dev" 167 | source: hosted 168 | version: "3.0.0" 169 | common_utils: 170 | dependency: "direct main" 171 | description: 172 | name: common_utils 173 | sha256: c26884339b13ff99b0739e56f4b02090c84054ed9dd3a045435cd24e7b99c2c1 174 | url: "https://pub.dev" 175 | source: hosted 176 | version: "2.1.0" 177 | convert: 178 | dependency: transitive 179 | description: 180 | name: convert 181 | sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 182 | url: "https://pub.dev" 183 | source: hosted 184 | version: "3.1.2" 185 | crypto: 186 | dependency: transitive 187 | description: 188 | name: crypto 189 | sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" 190 | url: "https://pub.dev" 191 | source: hosted 192 | version: "3.0.6" 193 | cupertino_icons: 194 | dependency: "direct main" 195 | description: 196 | name: cupertino_icons 197 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 198 | url: "https://pub.dev" 199 | source: hosted 200 | version: "1.0.8" 201 | dart_style: 202 | dependency: transitive 203 | description: 204 | name: dart_style 205 | sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" 206 | url: "https://pub.dev" 207 | source: hosted 208 | version: "2.3.7" 209 | dartx: 210 | dependency: transitive 211 | description: 212 | name: dartx 213 | sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" 214 | url: "https://pub.dev" 215 | source: hosted 216 | version: "1.2.0" 217 | decimal: 218 | dependency: transitive 219 | description: 220 | name: decimal 221 | sha256: "4140a688f9e443e2f4de3a1162387bf25e1ac6d51e24c9da263f245210f41440" 222 | url: "https://pub.dev" 223 | source: hosted 224 | version: "3.0.2" 225 | dio: 226 | dependency: "direct main" 227 | description: 228 | name: dio 229 | sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" 230 | url: "https://pub.dev" 231 | source: hosted 232 | version: "5.8.0+1" 233 | dio_web_adapter: 234 | dependency: transitive 235 | description: 236 | name: dio_web_adapter 237 | sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" 238 | url: "https://pub.dev" 239 | source: hosted 240 | version: "2.1.1" 241 | event_bus: 242 | dependency: "direct main" 243 | description: 244 | name: event_bus 245 | sha256: "1a55e97923769c286d295240048fc180e7b0768902c3c2e869fe059aafa15304" 246 | url: "https://pub.dev" 247 | source: hosted 248 | version: "2.0.1" 249 | fake_async: 250 | dependency: transitive 251 | description: 252 | name: fake_async 253 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 254 | url: "https://pub.dev" 255 | source: hosted 256 | version: "1.3.1" 257 | ffi: 258 | dependency: transitive 259 | description: 260 | name: ffi 261 | sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" 262 | url: "https://pub.dev" 263 | source: hosted 264 | version: "2.1.3" 265 | file: 266 | dependency: transitive 267 | description: 268 | name: file 269 | sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 270 | url: "https://pub.dev" 271 | source: hosted 272 | version: "7.0.1" 273 | fixnum: 274 | dependency: transitive 275 | description: 276 | name: fixnum 277 | sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be 278 | url: "https://pub.dev" 279 | source: hosted 280 | version: "1.1.1" 281 | flutter: 282 | dependency: "direct main" 283 | description: flutter 284 | source: sdk 285 | version: "0.0.0" 286 | flutter_easyrefresh: 287 | dependency: "direct main" 288 | description: 289 | name: flutter_easyrefresh 290 | sha256: "5d161ee5dcac34da9065116568147d742dd25fb9bff3b10024d9054b195087ad" 291 | url: "https://pub.dev" 292 | source: hosted 293 | version: "2.2.2" 294 | flutter_gen: 295 | dependency: "direct main" 296 | description: 297 | name: flutter_gen 298 | sha256: "4117a3ea6b26a910c715bd58abcc5a90447e70930a5b98249e94c41da9e849bb" 299 | url: "https://pub.dev" 300 | source: hosted 301 | version: "5.10.0" 302 | flutter_gen_core: 303 | dependency: transitive 304 | description: 305 | name: flutter_gen_core 306 | sha256: "3eaa2d3d8be58267ac4cd5e215ac965dd23cae0410dc073de2e82e227be32bfc" 307 | url: "https://pub.dev" 308 | source: hosted 309 | version: "5.10.0" 310 | flutter_gen_runner: 311 | dependency: "direct dev" 312 | description: 313 | name: flutter_gen_runner 314 | sha256: e74b4ead01df3e8f02e73a26ca856759dbbe8cb3fd60941ba9f4005cd0cd19c9 315 | url: "https://pub.dev" 316 | source: hosted 317 | version: "5.10.0" 318 | flutter_inappwebview: 319 | dependency: "direct main" 320 | description: 321 | name: flutter_inappwebview 322 | sha256: "80092d13d3e29b6227e25b67973c67c7210bd5e35c4b747ca908e31eb71a46d5" 323 | url: "https://pub.dev" 324 | source: hosted 325 | version: "6.1.5" 326 | flutter_inappwebview_android: 327 | dependency: transitive 328 | description: 329 | name: flutter_inappwebview_android 330 | sha256: "62557c15a5c2db5d195cb3892aab74fcaec266d7b86d59a6f0027abd672cddba" 331 | url: "https://pub.dev" 332 | source: hosted 333 | version: "1.1.3" 334 | flutter_inappwebview_internal_annotations: 335 | dependency: transitive 336 | description: 337 | name: flutter_inappwebview_internal_annotations 338 | sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd" 339 | url: "https://pub.dev" 340 | source: hosted 341 | version: "1.2.0" 342 | flutter_inappwebview_ios: 343 | dependency: transitive 344 | description: 345 | name: flutter_inappwebview_ios 346 | sha256: "5818cf9b26cf0cbb0f62ff50772217d41ea8d3d9cc00279c45f8aabaa1b4025d" 347 | url: "https://pub.dev" 348 | source: hosted 349 | version: "1.1.2" 350 | flutter_inappwebview_macos: 351 | dependency: transitive 352 | description: 353 | name: flutter_inappwebview_macos 354 | sha256: c1fbb86af1a3738e3541364d7d1866315ffb0468a1a77e34198c9be571287da1 355 | url: "https://pub.dev" 356 | source: hosted 357 | version: "1.1.2" 358 | flutter_inappwebview_platform_interface: 359 | dependency: transitive 360 | description: 361 | name: flutter_inappwebview_platform_interface 362 | sha256: cf5323e194096b6ede7a1ca808c3e0a078e4b33cc3f6338977d75b4024ba2500 363 | url: "https://pub.dev" 364 | source: hosted 365 | version: "1.3.0+1" 366 | flutter_inappwebview_web: 367 | dependency: transitive 368 | description: 369 | name: flutter_inappwebview_web 370 | sha256: "55f89c83b0a0d3b7893306b3bb545ba4770a4df018204917148ebb42dc14a598" 371 | url: "https://pub.dev" 372 | source: hosted 373 | version: "1.1.2" 374 | flutter_inappwebview_windows: 375 | dependency: transitive 376 | description: 377 | name: flutter_inappwebview_windows 378 | sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055" 379 | url: "https://pub.dev" 380 | source: hosted 381 | version: "0.6.0" 382 | flutter_localizations: 383 | dependency: "direct main" 384 | description: flutter 385 | source: sdk 386 | version: "0.0.0" 387 | flutter_screenutil: 388 | dependency: "direct main" 389 | description: 390 | name: flutter_screenutil 391 | sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de" 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "5.9.3" 395 | flutter_test: 396 | dependency: "direct dev" 397 | description: flutter 398 | source: sdk 399 | version: "0.0.0" 400 | flutter_web_plugins: 401 | dependency: transitive 402 | description: flutter 403 | source: sdk 404 | version: "0.0.0" 405 | fluttertoast: 406 | dependency: "direct main" 407 | description: 408 | name: fluttertoast 409 | sha256: "25e51620424d92d3db3832464774a6143b5053f15e382d8ffbfd40b6e795dcf1" 410 | url: "https://pub.dev" 411 | source: hosted 412 | version: "8.2.12" 413 | frontend_server_client: 414 | dependency: transitive 415 | description: 416 | name: frontend_server_client 417 | sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 418 | url: "https://pub.dev" 419 | source: hosted 420 | version: "4.0.0" 421 | get: 422 | dependency: "direct main" 423 | description: 424 | name: get 425 | sha256: c79eeb4339f1f3deffd9ec912f8a923834bec55f7b49c9e882b8fef2c139d425 426 | url: "https://pub.dev" 427 | source: hosted 428 | version: "4.7.2" 429 | glob: 430 | dependency: transitive 431 | description: 432 | name: glob 433 | sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de 434 | url: "https://pub.dev" 435 | source: hosted 436 | version: "2.1.3" 437 | graphs: 438 | dependency: transitive 439 | description: 440 | name: graphs 441 | sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" 442 | url: "https://pub.dev" 443 | source: hosted 444 | version: "2.3.2" 445 | hashcodes: 446 | dependency: transitive 447 | description: 448 | name: hashcodes 449 | sha256: "80f9410a5b3c8e110c4b7604546034749259f5d6dcca63e0d3c17c9258f1a651" 450 | url: "https://pub.dev" 451 | source: hosted 452 | version: "2.0.0" 453 | http_multi_server: 454 | dependency: transitive 455 | description: 456 | name: http_multi_server 457 | sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 458 | url: "https://pub.dev" 459 | source: hosted 460 | version: "3.2.2" 461 | http_parser: 462 | dependency: transitive 463 | description: 464 | name: http_parser 465 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 466 | url: "https://pub.dev" 467 | source: hosted 468 | version: "4.0.2" 469 | image_size_getter: 470 | dependency: transitive 471 | description: 472 | name: image_size_getter 473 | sha256: "9a299e3af2ebbcfd1baf21456c3c884037ff524316c97d8e56035ea8fdf35653" 474 | url: "https://pub.dev" 475 | source: hosted 476 | version: "2.4.0" 477 | intl: 478 | dependency: transitive 479 | description: 480 | name: intl 481 | sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf 482 | url: "https://pub.dev" 483 | source: hosted 484 | version: "0.19.0" 485 | io: 486 | dependency: transitive 487 | description: 488 | name: io 489 | sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b 490 | url: "https://pub.dev" 491 | source: hosted 492 | version: "1.0.5" 493 | js: 494 | dependency: transitive 495 | description: 496 | name: js 497 | sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf 498 | url: "https://pub.dev" 499 | source: hosted 500 | version: "0.7.1" 501 | json_annotation: 502 | dependency: "direct main" 503 | description: 504 | name: json_annotation 505 | sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" 506 | url: "https://pub.dev" 507 | source: hosted 508 | version: "4.9.0" 509 | json_serializable: 510 | dependency: "direct dev" 511 | description: 512 | name: json_serializable 513 | sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c 514 | url: "https://pub.dev" 515 | source: hosted 516 | version: "6.9.0" 517 | leak_tracker: 518 | dependency: transitive 519 | description: 520 | name: leak_tracker 521 | sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 522 | url: "https://pub.dev" 523 | source: hosted 524 | version: "10.0.7" 525 | leak_tracker_flutter_testing: 526 | dependency: transitive 527 | description: 528 | name: leak_tracker_flutter_testing 529 | sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 530 | url: "https://pub.dev" 531 | source: hosted 532 | version: "3.0.8" 533 | leak_tracker_testing: 534 | dependency: transitive 535 | description: 536 | name: leak_tracker_testing 537 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 538 | url: "https://pub.dev" 539 | source: hosted 540 | version: "3.0.1" 541 | logging: 542 | dependency: transitive 543 | description: 544 | name: logging 545 | sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 546 | url: "https://pub.dev" 547 | source: hosted 548 | version: "1.3.0" 549 | macros: 550 | dependency: transitive 551 | description: 552 | name: macros 553 | sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" 554 | url: "https://pub.dev" 555 | source: hosted 556 | version: "0.1.3-main.0" 557 | matcher: 558 | dependency: transitive 559 | description: 560 | name: matcher 561 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 562 | url: "https://pub.dev" 563 | source: hosted 564 | version: "0.12.16+1" 565 | material_color_utilities: 566 | dependency: transitive 567 | description: 568 | name: material_color_utilities 569 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 570 | url: "https://pub.dev" 571 | source: hosted 572 | version: "0.11.1" 573 | meta: 574 | dependency: "direct overridden" 575 | description: 576 | name: meta 577 | sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c 578 | url: "https://pub.dev" 579 | source: hosted 580 | version: "1.16.0" 581 | mime: 582 | dependency: transitive 583 | description: 584 | name: mime 585 | sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" 586 | url: "https://pub.dev" 587 | source: hosted 588 | version: "2.0.0" 589 | package_config: 590 | dependency: transitive 591 | description: 592 | name: package_config 593 | sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc 594 | url: "https://pub.dev" 595 | source: hosted 596 | version: "2.2.0" 597 | path: 598 | dependency: transitive 599 | description: 600 | name: path 601 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 602 | url: "https://pub.dev" 603 | source: hosted 604 | version: "1.9.0" 605 | path_parsing: 606 | dependency: transitive 607 | description: 608 | name: path_parsing 609 | sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" 610 | url: "https://pub.dev" 611 | source: hosted 612 | version: "1.1.0" 613 | path_provider: 614 | dependency: "direct main" 615 | description: 616 | name: path_provider 617 | sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" 618 | url: "https://pub.dev" 619 | source: hosted 620 | version: "2.1.5" 621 | path_provider_android: 622 | dependency: transitive 623 | description: 624 | name: path_provider_android 625 | sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" 626 | url: "https://pub.dev" 627 | source: hosted 628 | version: "2.2.15" 629 | path_provider_foundation: 630 | dependency: transitive 631 | description: 632 | name: path_provider_foundation 633 | sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" 634 | url: "https://pub.dev" 635 | source: hosted 636 | version: "2.4.1" 637 | path_provider_linux: 638 | dependency: transitive 639 | description: 640 | name: path_provider_linux 641 | sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 642 | url: "https://pub.dev" 643 | source: hosted 644 | version: "2.2.1" 645 | path_provider_platform_interface: 646 | dependency: transitive 647 | description: 648 | name: path_provider_platform_interface 649 | sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" 650 | url: "https://pub.dev" 651 | source: hosted 652 | version: "2.1.2" 653 | path_provider_windows: 654 | dependency: transitive 655 | description: 656 | name: path_provider_windows 657 | sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 658 | url: "https://pub.dev" 659 | source: hosted 660 | version: "2.3.0" 661 | permission_handler: 662 | dependency: "direct main" 663 | description: 664 | name: permission_handler 665 | sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849" 666 | url: "https://pub.dev" 667 | source: hosted 668 | version: "11.4.0" 669 | permission_handler_android: 670 | dependency: transitive 671 | description: 672 | name: permission_handler_android 673 | sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc 674 | url: "https://pub.dev" 675 | source: hosted 676 | version: "12.1.0" 677 | permission_handler_apple: 678 | dependency: transitive 679 | description: 680 | name: permission_handler_apple 681 | sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 682 | url: "https://pub.dev" 683 | source: hosted 684 | version: "9.4.7" 685 | permission_handler_html: 686 | dependency: transitive 687 | description: 688 | name: permission_handler_html 689 | sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" 690 | url: "https://pub.dev" 691 | source: hosted 692 | version: "0.1.3+5" 693 | permission_handler_platform_interface: 694 | dependency: transitive 695 | description: 696 | name: permission_handler_platform_interface 697 | sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 698 | url: "https://pub.dev" 699 | source: hosted 700 | version: "4.3.0" 701 | permission_handler_windows: 702 | dependency: transitive 703 | description: 704 | name: permission_handler_windows 705 | sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" 706 | url: "https://pub.dev" 707 | source: hosted 708 | version: "0.2.1" 709 | petitparser: 710 | dependency: transitive 711 | description: 712 | name: petitparser 713 | sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 714 | url: "https://pub.dev" 715 | source: hosted 716 | version: "6.0.2" 717 | platform: 718 | dependency: transitive 719 | description: 720 | name: platform 721 | sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" 722 | url: "https://pub.dev" 723 | source: hosted 724 | version: "3.1.6" 725 | plugin_platform_interface: 726 | dependency: transitive 727 | description: 728 | name: plugin_platform_interface 729 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" 730 | url: "https://pub.dev" 731 | source: hosted 732 | version: "2.1.8" 733 | pool: 734 | dependency: transitive 735 | description: 736 | name: pool 737 | sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" 738 | url: "https://pub.dev" 739 | source: hosted 740 | version: "1.5.1" 741 | posix: 742 | dependency: transitive 743 | description: 744 | name: posix 745 | sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62 746 | url: "https://pub.dev" 747 | source: hosted 748 | version: "6.0.2" 749 | protobuf: 750 | dependency: transitive 751 | description: 752 | name: protobuf 753 | sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" 754 | url: "https://pub.dev" 755 | source: hosted 756 | version: "3.1.0" 757 | pub_semver: 758 | dependency: transitive 759 | description: 760 | name: pub_semver 761 | sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" 762 | url: "https://pub.dev" 763 | source: hosted 764 | version: "2.2.0" 765 | pubspec_parse: 766 | dependency: transitive 767 | description: 768 | name: pubspec_parse 769 | sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" 770 | url: "https://pub.dev" 771 | source: hosted 772 | version: "1.4.0" 773 | rational: 774 | dependency: transitive 775 | description: 776 | name: rational 777 | sha256: cb808fb6f1a839e6fc5f7d8cb3b0a10e1db48b3be102de73938c627f0b636336 778 | url: "https://pub.dev" 779 | source: hosted 780 | version: "2.2.3" 781 | retrofit: 782 | dependency: "direct main" 783 | description: 784 | name: retrofit 785 | sha256: c6cc9ad3374e6d07008343140a67afffaaa34cdf6bf08d4847d91417a99dcf45 786 | url: "https://pub.dev" 787 | source: hosted 788 | version: "4.4.2" 789 | retrofit_generator: 790 | dependency: "direct dev" 791 | description: 792 | name: retrofit_generator 793 | sha256: f76fdb2b66854690d5a332e7364d7561fc9dc2b3c924d7956ab8070495e21f6a 794 | url: "https://pub.dev" 795 | source: hosted 796 | version: "9.1.5" 797 | rxdart: 798 | dependency: "direct main" 799 | description: 800 | name: rxdart 801 | sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" 802 | url: "https://pub.dev" 803 | source: hosted 804 | version: "0.27.7" 805 | shared_preferences: 806 | dependency: "direct main" 807 | description: 808 | name: shared_preferences 809 | sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" 810 | url: "https://pub.dev" 811 | source: hosted 812 | version: "2.5.3" 813 | shared_preferences_android: 814 | dependency: transitive 815 | description: 816 | name: shared_preferences_android 817 | sha256: "9f9f3d372d4304723e6136663bb291c0b93f5e4c8a4a6314347f481a33bda2b1" 818 | url: "https://pub.dev" 819 | source: hosted 820 | version: "2.4.7" 821 | shared_preferences_foundation: 822 | dependency: transitive 823 | description: 824 | name: shared_preferences_foundation 825 | sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" 826 | url: "https://pub.dev" 827 | source: hosted 828 | version: "2.5.4" 829 | shared_preferences_linux: 830 | dependency: transitive 831 | description: 832 | name: shared_preferences_linux 833 | sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" 834 | url: "https://pub.dev" 835 | source: hosted 836 | version: "2.4.1" 837 | shared_preferences_platform_interface: 838 | dependency: transitive 839 | description: 840 | name: shared_preferences_platform_interface 841 | sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" 842 | url: "https://pub.dev" 843 | source: hosted 844 | version: "2.4.1" 845 | shared_preferences_web: 846 | dependency: transitive 847 | description: 848 | name: shared_preferences_web 849 | sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 850 | url: "https://pub.dev" 851 | source: hosted 852 | version: "2.4.3" 853 | shared_preferences_windows: 854 | dependency: transitive 855 | description: 856 | name: shared_preferences_windows 857 | sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" 858 | url: "https://pub.dev" 859 | source: hosted 860 | version: "2.4.1" 861 | shelf: 862 | dependency: transitive 863 | description: 864 | name: shelf 865 | sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 866 | url: "https://pub.dev" 867 | source: hosted 868 | version: "1.4.1" 869 | shelf_web_socket: 870 | dependency: transitive 871 | description: 872 | name: shelf_web_socket 873 | sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 874 | url: "https://pub.dev" 875 | source: hosted 876 | version: "2.0.1" 877 | sky_engine: 878 | dependency: transitive 879 | description: flutter 880 | source: sdk 881 | version: "0.0.0" 882 | source_gen: 883 | dependency: transitive 884 | description: 885 | name: source_gen 886 | sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" 887 | url: "https://pub.dev" 888 | source: hosted 889 | version: "1.5.0" 890 | source_helper: 891 | dependency: transitive 892 | description: 893 | name: source_helper 894 | sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" 895 | url: "https://pub.dev" 896 | source: hosted 897 | version: "1.3.5" 898 | source_span: 899 | dependency: transitive 900 | description: 901 | name: source_span 902 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 903 | url: "https://pub.dev" 904 | source: hosted 905 | version: "1.10.0" 906 | stack_trace: 907 | dependency: transitive 908 | description: 909 | name: stack_trace 910 | sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 911 | url: "https://pub.dev" 912 | source: hosted 913 | version: "1.12.0" 914 | stream_channel: 915 | dependency: transitive 916 | description: 917 | name: stream_channel 918 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 919 | url: "https://pub.dev" 920 | source: hosted 921 | version: "2.1.2" 922 | stream_transform: 923 | dependency: transitive 924 | description: 925 | name: stream_transform 926 | sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 927 | url: "https://pub.dev" 928 | source: hosted 929 | version: "2.1.1" 930 | string_scanner: 931 | dependency: transitive 932 | description: 933 | name: string_scanner 934 | sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 935 | url: "https://pub.dev" 936 | source: hosted 937 | version: "1.3.0" 938 | term_glyph: 939 | dependency: transitive 940 | description: 941 | name: term_glyph 942 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 943 | url: "https://pub.dev" 944 | source: hosted 945 | version: "1.2.1" 946 | test_api: 947 | dependency: transitive 948 | description: 949 | name: test_api 950 | sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 951 | url: "https://pub.dev" 952 | source: hosted 953 | version: "0.7.3" 954 | time: 955 | dependency: transitive 956 | description: 957 | name: time 958 | sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" 959 | url: "https://pub.dev" 960 | source: hosted 961 | version: "2.1.5" 962 | timing: 963 | dependency: transitive 964 | description: 965 | name: timing 966 | sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" 967 | url: "https://pub.dev" 968 | source: hosted 969 | version: "1.0.2" 970 | typed_data: 971 | dependency: transitive 972 | description: 973 | name: typed_data 974 | sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 975 | url: "https://pub.dev" 976 | source: hosted 977 | version: "1.4.0" 978 | vector_graphics_codec: 979 | dependency: transitive 980 | description: 981 | name: vector_graphics_codec 982 | sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" 983 | url: "https://pub.dev" 984 | source: hosted 985 | version: "1.1.13" 986 | vector_graphics_compiler: 987 | dependency: transitive 988 | description: 989 | name: vector_graphics_compiler 990 | sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" 991 | url: "https://pub.dev" 992 | source: hosted 993 | version: "1.1.16" 994 | vector_math: 995 | dependency: transitive 996 | description: 997 | name: vector_math 998 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 999 | url: "https://pub.dev" 1000 | source: hosted 1001 | version: "2.1.4" 1002 | vm_service: 1003 | dependency: transitive 1004 | description: 1005 | name: vm_service 1006 | sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 1007 | url: "https://pub.dev" 1008 | source: hosted 1009 | version: "14.3.0" 1010 | watcher: 1011 | dependency: transitive 1012 | description: 1013 | name: watcher 1014 | sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" 1015 | url: "https://pub.dev" 1016 | source: hosted 1017 | version: "1.1.1" 1018 | web: 1019 | dependency: transitive 1020 | description: 1021 | name: web 1022 | sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" 1023 | url: "https://pub.dev" 1024 | source: hosted 1025 | version: "1.1.1" 1026 | web_socket: 1027 | dependency: transitive 1028 | description: 1029 | name: web_socket 1030 | sha256: bfe6f435f6ec49cb6c01da1e275ae4228719e59a6b067048c51e72d9d63bcc4b 1031 | url: "https://pub.dev" 1032 | source: hosted 1033 | version: "1.0.0" 1034 | web_socket_channel: 1035 | dependency: transitive 1036 | description: 1037 | name: web_socket_channel 1038 | sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 1039 | url: "https://pub.dev" 1040 | source: hosted 1041 | version: "3.0.3" 1042 | xdg_directories: 1043 | dependency: transitive 1044 | description: 1045 | name: xdg_directories 1046 | sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" 1047 | url: "https://pub.dev" 1048 | source: hosted 1049 | version: "1.1.0" 1050 | xml: 1051 | dependency: transitive 1052 | description: 1053 | name: xml 1054 | sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 1055 | url: "https://pub.dev" 1056 | source: hosted 1057 | version: "6.5.0" 1058 | yaml: 1059 | dependency: transitive 1060 | description: 1061 | name: yaml 1062 | sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce 1063 | url: "https://pub.dev" 1064 | source: hosted 1065 | version: "3.1.3" 1066 | sdks: 1067 | dart: ">=3.5.0 <4.0.0" 1068 | flutter: ">=3.24.0" 1069 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tin_flutter 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: '>=3.0.5 <4.0.0' 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | #Widget国际化支持 27 | flutter_localizations: 28 | sdk: flutter 29 | permission_handler: ^11.3.1 30 | rxdart: ^0.27.7 31 | event_bus: ^2.0.0 32 | flutter_easyrefresh: ^2.2.2 33 | fluttertoast: ^8.2.8 34 | get: ^4.6.6 35 | dio: ^5.7.0 36 | retrofit: ^4.4.1 37 | json_annotation: ^4.9.0 38 | shared_preferences: ^2.3.2 39 | # path_provider: ^2.0.2 40 | common_utils: ^2.1.0 41 | flutter_inappwebview: ^6.0.0 42 | # wechat_assets_picker: ^8.8.1+1 43 | flutter_screenutil: ^5.9.0 44 | path_provider: ^2.1.4 45 | # The following adds the Cupertino Icons font to your application. 46 | # Use with the CupertinoIcons class for iOS style icons. 47 | cupertino_icons: ^1.0.8 48 | flutter_gen: ^5.9.0 49 | 50 | 51 | dependency_overrides: 52 | meta: ^1.14.0 # 替换为你需要的meta库的版本号 53 | 54 | dev_dependencies: 55 | flutter_test: 56 | sdk: flutter 57 | build_runner: ^2.4.11 58 | retrofit_generator: ^9.1.2 59 | json_serializable: ^6.8.0 60 | flutter_gen_runner: ^5.9.0 61 | # For information on the generic Dart part of this file, see the 62 | # following page: https://dart.dev/tools/pub/pubspec 63 | 64 | flutter_gen: 65 | output: lib/generated/gen/ # Optional (default: lib/gen/) 66 | line_length: 80 # Optional (default: 80) 67 | integrations: 68 | image: true 69 | flutter_svg: true 70 | rive: true 71 | lottie: true 72 | 73 | colors: 74 | inputs: 75 | - assets/color/colors.xml 76 | outputs: 77 | class_name: ColorX 78 | # The following section is specific to Flutter. 79 | flutter: 80 | 81 | # The following line ensures that the Material Icons font is 82 | # included with your application, so that you can use the icons in 83 | # the material Icons class. 84 | uses-material-design: true 85 | 86 | # To add assets to your application, add an assets section, like this: 87 | # assets: 88 | # - images/a_dot_burr.jpeg 89 | # - images/a_dot_ham.jpeg 90 | assets: 91 | - assets/ 92 | - assets/images/ 93 | - assets/color/ 94 | # An images asset can refer to one or more resolution-specific "variants", see 95 | # https://flutter.dev/assets-and-images/#resolution-aware. 96 | 97 | # For details regarding adding assets from package dependencies, see 98 | # https://flutter.dev/assets-and-images/#from-packages 99 | 100 | # To add widget fonts to your application, add a fonts section here, 101 | # in this "flutter" section. Each entry in this list should have a 102 | # "family" key with the font family name, and a "fonts" key with a 103 | # list giving the asset and other descriptors for the font. For 104 | # example: 105 | # fonts: 106 | # - family: Schyler 107 | # fonts: 108 | # - asset: fonts/Schyler-Regular.ttf 109 | # - asset: fonts/Schyler-Italic.ttf 110 | # style: italic 111 | # - family: Trajan Pro 112 | # fonts: 113 | # - asset: fonts/TrajanPro.ttf 114 | # - asset: fonts/TrajanPro_Bold.ttf 115 | # weight: 700 116 | # 117 | # For details regarding fonts from package dependencies, 118 | # see https://flutter.dev/custom-fonts/#from-packages 119 | 120 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | import 'package:tin_flutter/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/932707629/TinFlutter/1a03ab72d092132bc46560f3e39487770fcb8457/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | tin_flutter 27 | 28 | 29 | 30 | 33 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tin_flutter", 3 | "short_name": "tin_flutter", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------