├── .flutter-plugins-dependencies
├── .github
└── FUNDING.yml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── CHANGELOGS.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── thl
│ │ │ └── flutterwanandroid
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ └── launch_background.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_new.png
│ │ └── splash_bg.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── settings_aar.gradle
├── assets
├── data
│ └── china.json
└── images
│ └── 3.0x
│ ├── ali_connors.png
│ ├── ali_connors_sml.png
│ ├── guide1.png
│ ├── guide2.png
│ ├── guide3.png
│ ├── guide4.png
│ ├── ic_launcher_news.png
│ ├── icon_wan_android.png
│ ├── qrcode.png
│ └── splash_bg.png
├── flutter_wanandroid.iml
├── flutter_wanandroid_android.iml
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── flutter_export_environment.sh
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── 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
│ ├── main.m
│ └── zh-Hans-CN.lproj
│ ├── LaunchScreen.strings
│ └── Main.strings
├── lib
├── blocs
│ ├── application_bloc.dart
│ ├── bloc_index.dart
│ ├── bloc_provider.dart
│ ├── collect_bloc.dart
│ ├── com_list_bloc.dart
│ ├── main_bloc.dart
│ └── tab_bloc.dart
├── common
│ ├── common.dart
│ ├── component_index.dart
│ ├── global.dart
│ └── sp_helper.dart
├── data
│ ├── api
│ │ └── apis.dart
│ ├── protocol
│ │ └── models.dart
│ └── repository
│ │ ├── collect_repository.dart
│ │ ├── user_repository.dart
│ │ └── wan_repository.dart
├── db
│ └── db.dart
├── demos
│ ├── city_select_page.dart
│ ├── date_page.dart
│ ├── image_size_page.dart
│ ├── index.dart
│ ├── main_demos.dart
│ ├── money_page.dart
│ ├── pinyin_page.dart
│ ├── regex_page.dart
│ ├── round_portrait_page.dart
│ ├── test_page.dart
│ ├── timeline_page.dart
│ ├── timer_page.dart
│ └── widget_page.dart
├── event
│ └── event.dart
├── main.dart
├── models
│ └── models.dart
├── res
│ ├── colors.dart
│ ├── dimens.dart
│ ├── index.dart
│ ├── strings.dart
│ └── styles.dart
├── ui
│ ├── dialog
│ │ └── simple_dialog.dart
│ ├── pages
│ │ ├── about_page.dart
│ │ ├── author_page.dart
│ │ ├── backdrop_demo.dart
│ │ ├── collection_page.dart
│ │ ├── events_page.dart
│ │ ├── home_page.dart
│ │ ├── language_page.dart
│ │ ├── main_left_page.dart
│ │ ├── main_page.dart
│ │ ├── other_page.dart
│ │ ├── page_index.dart
│ │ ├── rec_hot_page.dart
│ │ ├── repos_page.dart
│ │ ├── search_page.dart
│ │ ├── setting_page.dart
│ │ ├── share_page.dart
│ │ ├── splash_page.dart
│ │ ├── system_page.dart
│ │ ├── tab_page.dart
│ │ └── user
│ │ │ ├── user_login_page.dart
│ │ │ └── user_register_page.dart
│ └── widgets
│ │ ├── article_item.dart
│ │ ├── com_item.dart
│ │ ├── com_list_page.dart
│ │ ├── com_list_view.dart
│ │ ├── header_item.dart
│ │ ├── likebtn
│ │ ├── circle_painter.dart
│ │ ├── dot_painter.dart
│ │ ├── like_button.dart
│ │ ├── like_button_util.dart
│ │ └── model.dart
│ │ ├── refresh_scaffold.dart
│ │ ├── repos_item.dart
│ │ ├── tree_item.dart
│ │ ├── web_scaffold.dart
│ │ ├── widget_index.dart
│ │ └── widgets.dart
└── utils
│ ├── http_utils.dart
│ ├── navigator_util.dart
│ ├── util_index.dart
│ └── utils.dart
├── pkgget
├── pubspec.yaml
├── test
└── widget_test.dart
└── uploadMaster
/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.2.0\\\\","dependencies":[]},{"name":"share","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share-0.6.5+4\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.5\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.2+4\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.7.10\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter-1.0.7\\\\","dependencies":[]}],"android":[{"name":"path_provider","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.2.0\\\\","dependencies":[]},{"name":"share","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share-0.6.5+4\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.5\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.2+4\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.7.10\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter-1.0.7\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_macos-2.0.0\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.2+4\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_macos-0.0.1+9\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.0.0\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_linux-2.0.0\\\\","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_linux-0.0.1+4\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.0.0\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_windows-2.0.0\\\\","dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_windows-0.0.1+3\\\\","dependencies":[]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_web-2.0.0\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\thl\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_web-0.1.5+3\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2021-03-17 16:00:16.748140","version":"2.0.0"}
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://sky24n.github.io/Sky24n/image/ali_pay.jpg', 'https://sky24n.github.io/Sky24n/image/wechat_pay.jpg']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | # If you're building an application, you may want to check-in your pubspec.lock
10 | pubspec.lock
11 |
12 | .flutter-plugins
13 |
14 | */.idea/
15 | .idea/
16 | /.idea/workspace.xml
17 | /.idea/libraries
--------------------------------------------------------------------------------
/.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: 5ab9e70727d858def3a586db7fb98ee580352957
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 更新说明
2 | ### v0.2.5 (2019.11.16)
3 | 1.基础库升级。
4 | 2.一些优化~。
5 |
6 | ### v0.2.2 (2019.07.02)
7 | 1.基础库升级。
8 | 2.修复OPPO R15详情页问题。
9 | 3.一些优化~。
10 |
11 | ### v0.2.1 (2019.05.08)
12 | 1.新增登录/注册。
13 | 2.新增收藏功能。
14 | 3.一些优化~。
15 |
16 | 温馨提醒:
17 | ① 默认主题色修改为deepPurpleAccent,与登录/注册页面元素保持一致。
18 | ② 设置新增升级提示次数,可关闭升级提醒,但超过5个版本未升级需要下载最新版。
19 | ③ 快速滚动至顶部按钮展示逻辑优化。
20 |
21 |
22 | ### v0.2.0 (2019.03.29)
23 | 1.新增分享~。
24 | 2.新增网络状态页。
25 |
26 | ### v0.1.9 (2019.03.16)
27 | 1.闪屏页支持视频。
28 | 2.支持App应用内升级。
29 | 3.玩安卓Api升级为https。
30 | 4.Flutter Demos 新增 获取图片尺寸示例。
31 |
32 | 温馨提醒:
33 | ① 为了方便大家体验应用内升级,服务端版本号为:v0.2.0,Apk版本始终为v0.1.9。
34 | ② 由于Apk文件是放在Github上面的,可能下载速度会比较慢。
35 | ③ 为了保护掘金作者原创文章,热门文章修改为从第二页开始获取。
36 |
37 | ### v0.1.7 (2019.03.04)
38 | 1、App新Logo。
39 | 2、闪屏页优化。
40 | 3、升级WebView,新增loading,点击TitleBar返回可回退网页。
41 | 4、新增内置浏览器,修复oppo R15, R11st无法查看详情页,若其他手机无法查看详情页,请自行修改为内置浏览器。
42 |
43 | ### v0.1.6 (2019.01.18)
44 | 1、主页新增Github Trending,新版本如未显示,请下拉刷新。
45 | 2、新增热门Tab,掘金热门文章!
46 | 3、重构HomePage。
47 |
48 | ### v0.1.3 (2019.01.09)
49 | ① 新WebView 重构项目。
50 |
51 | ### v0.1.2 (2018.12.20)
52 | ① 网络框架DioUtil
53 | ② 合并[flutter_demos][flutter_demos_github]
54 |
55 | ### v0.1.1 (2018.11.19)
56 | ① 新增启动页
57 | ② 新增引导页
58 | ③ 修复banner无法点击bug,一些优化
59 |
60 | ### v0.1.0 (2018.11.16)
61 | ① 堪称完美的UI界面almost
62 | ② 支持国际化
63 | ③ 支持更换主题色
64 |
65 | ## 其他
66 | ### [Flutter工具类库 flustars][flustars_github]
67 | #### v0.1.8(2018.12.29)
68 | ScreenUtil 屏幕适配更新。
69 | 方案一、不依赖context
70 | ```
71 | 步骤 1
72 | //如果设计稿尺寸默认配置一致,无需该设置。 配置设计稿尺寸 默认 360.0 / 640.0 / 3.0
73 | setDesignWHD(_designW,_designH,_designD);
74 |
75 | 步骤 2
76 | // 在MainPageState build 调用MediaQuery.of(context)
77 | class MainPageState extends State {
78 | @override
79 | Widget build(BuildContext context) {
80 |
81 | // 在 MainPageState build 调用 MediaQuery.of(context)
82 | MediaQuery.of(context);
83 |
84 | double width = ScreenUtil.getInstance().screenWidth;
85 | double height = ScreenUtil.getInstance().screenHeight;
86 | return new Scaffold(
87 | appBar: new AppBar(),
88 | );
89 | }
90 | }
91 |
92 | 步骤 3
93 | ScreenUtil.getInstance().screenWidth
94 | ScreenUtil.getInstance().screenHeight
95 | ScreenUtil.getInstance().screenDensity
96 | ScreenUtil.getInstance().statusBarHeight
97 | ScreenUtil.getInstance().bottomBarHeight
98 | //屏幕适配相关
99 | ScreenUtil.getInstance().getWidth(size); //返回根据屏幕宽适配后尺寸(单位 dp or pt)
100 | ScreenUtil.getInstance().getHeight(size); //返回根据屏幕高适配后尺寸 (单位 dp or pt)
101 | ScreenUtil.getInstance().getWidthPx(sizePx); //sizePx 单位px
102 | ScreenUtil.getInstance().getHeightPx(sizePx); //sizePx 单位px
103 | ScreenUtil.getInstance().getSp(fontSize); //返回根据屏幕宽适配后字体尺寸
104 |
105 | ```
106 | 方案二、依赖context
107 | ```
108 | //如果设计稿尺寸默认配置一致,无需该设置。 配置设计稿尺寸 默认 360.0 / 640.0 / 3.0
109 | setDesignWHD(_designW,_designH,_designD);
110 |
111 | ScreenUtil.getScreenW(context); //屏幕 宽
112 | ScreenUtil.getScreenH(context); //屏幕 高
113 | ScreenUtil.getScreenDensity(context); //屏幕 像素密度
114 | ScreenUtil.getStatusBarH(context); //状态栏高度
115 | ScreenUtil.getBottomBarH(context); //bottombar 高度
116 | //屏幕适配相关
117 | ScreenUtil.getScaleW(context, size); //返回根据屏幕宽适配后尺寸(单位 dp or pt)
118 | ScreenUtil.getScaleH(context, size); //返回根据屏幕高适配后尺寸 (单位 dp or pt)
119 | ScreenUtil.getScaleSp(context, size) ;//返回根据屏幕宽适配后字体尺寸
120 | ```
121 | #### v0.1.6(2018.12.20)
122 | 新增网络请求工具DioUtil, 单例模式,可输出请求日志。
123 | ```
124 | // 打开debug模式.
125 | DioUtil.openDebug();
126 |
127 | // 配置网络参数.
128 | Options options = DioUtil.getDefOptions();
129 | options.baseUrl = "http://www.wanandroid.com/";
130 | HttpConfig config = new HttpConfig(options: options);
131 | DioUtil().setConfig(config);
132 |
133 | // 两种单例请求方式.
134 | DioUtil().request(Method.get, "banner/json");
135 | DioUtil.getInstance().request(Method.get, "banner/json");
136 |
137 | //示例
138 | LoginReq req = new LoginReq('username', 'password');
139 | DioUtil().request(Method.post, "user/login",data: req.toJson());
140 |
141 | //示例
142 | FormData formData = new FormData.from({
143 | "username": "username",
144 | "password": "password",
145 | });
146 | DioUtil().requestR(Method.post, "user/login",data: rformData);
147 |
148 | //解析示例
149 | class WanRepository {
150 | Future> getBanner() async {
151 | BaseResp baseResp = await DioUtil().request(
152 | Method.get, WanAndroidApi.getPath(path: WanAndroidApi.BANNER));
153 | List bannerList;
154 | if (baseResp.code != Constant.status_success) {
155 | return new Future.error(baseResp.msg);
156 | }
157 | if (baseResp.data != null) {
158 | bannerList = baseResp.data.map((value) {
159 | return BannerModel.fromJson(value);
160 | }).toList();
161 | }
162 | return bannerList;
163 | }
164 | }
165 |
166 | // 网络请求日志
167 | I/flutter ( 5922): ----------------Http Log----------------
168 | I/flutter ( 5922): [statusCode]: 200
169 | I/flutter ( 5922): [request ]: method: GET baseUrl: http://www.wanandroid.com/ path: lg/collect/list/0/json
170 | I/flutter ( 5922): [reqdata ]: null
171 | I/flutter ( 5922): [response ]: {data: {curPage: 1, datas: [], offset: 0, over: true, pageCount: 0, size: 20, total: 0}, errorCode: 0, errorMsg: }
172 | ```
173 |
174 |
175 | [flutter_demos_github]: https://github.com/Sky24n/flutter_demos
176 | [flustars_github]: https://github.com/Sky24n/flustars
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 2-Clause License
2 |
3 | Copyright (c) 2018, Sky24n
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 |
--------------------------------------------------------------------------------
/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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 29
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.thl.flutterwanandroid"
37 | minSdkVersion 16
38 | targetSdkVersion 29
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
13 |
20 |
24 |
27 |
32 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/thl/flutterwanandroid/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.thl.flutterwanandroid;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 | -
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_new.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/splash_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-xxhdpi/splash_bg.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.5.0'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/assets/images/3.0x/ali_connors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/ali_connors.png
--------------------------------------------------------------------------------
/assets/images/3.0x/ali_connors_sml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/ali_connors_sml.png
--------------------------------------------------------------------------------
/assets/images/3.0x/guide1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/guide1.png
--------------------------------------------------------------------------------
/assets/images/3.0x/guide2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/guide2.png
--------------------------------------------------------------------------------
/assets/images/3.0x/guide3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/guide3.png
--------------------------------------------------------------------------------
/assets/images/3.0x/guide4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/guide4.png
--------------------------------------------------------------------------------
/assets/images/3.0x/ic_launcher_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/ic_launcher_news.png
--------------------------------------------------------------------------------
/assets/images/3.0x/icon_wan_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/icon_wan_android.png
--------------------------------------------------------------------------------
/assets/images/3.0x/qrcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/qrcode.png
--------------------------------------------------------------------------------
/assets/images/3.0x/splash_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/assets/images/3.0x/splash_bg.png
--------------------------------------------------------------------------------
/flutter_wanandroid.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/flutter_wanandroid_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/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 | 8.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/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/Users/thl/Library/Android/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/Users/thl/AndroidStudioProjects/test workspace/flutter_wanandroid"
5 | export "FLUTTER_TARGET=lib/main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9 | export "FLUTTER_FRAMEWORK_DIR=/Users/thl/Library/Android/flutter/bin/cache/artifacts/engine/ios"
10 | export "FLUTTER_BUILD_NAME=0.2.6"
11 | export "FLUTTER_BUILD_NUMBER=26"
12 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.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 parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | end
62 |
63 | post_install do |installer|
64 | installer.pods_project.targets.each do |target|
65 | target.build_configurations.each do |config|
66 | config.build_settings['ENABLE_BITCODE'] = 'NO'
67 | end
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - device_info (0.0.1):
3 | - Flutter
4 | - flustars (0.0.1):
5 | - Flutter
6 | - Flutter (1.0.0)
7 | - FMDB (2.7.5):
8 | - FMDB/standard (= 2.7.5)
9 | - FMDB/standard (2.7.5)
10 | - path_provider (0.0.1):
11 | - Flutter
12 | - shared_preferences (0.0.1):
13 | - Flutter
14 | - sqflite (0.0.1):
15 | - Flutter
16 | - FMDB (~> 2.7.2)
17 | - url_launcher (0.0.1):
18 | - Flutter
19 | - webview_flutter (0.0.1):
20 | - Flutter
21 |
22 | DEPENDENCIES:
23 | - device_info (from `.symlinks/plugins/device_info/ios`)
24 | - flustars (from `.symlinks/plugins/flustars/ios`)
25 | - Flutter (from `.symlinks/flutter/ios`)
26 | - path_provider (from `.symlinks/plugins/path_provider/ios`)
27 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
28 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
29 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
30 | - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
31 |
32 | SPEC REPOS:
33 | https://github.com/cocoapods/specs.git:
34 | - FMDB
35 |
36 | EXTERNAL SOURCES:
37 | device_info:
38 | :path: ".symlinks/plugins/device_info/ios"
39 | flustars:
40 | :path: ".symlinks/plugins/flustars/ios"
41 | Flutter:
42 | :path: ".symlinks/flutter/ios"
43 | path_provider:
44 | :path: ".symlinks/plugins/path_provider/ios"
45 | shared_preferences:
46 | :path: ".symlinks/plugins/shared_preferences/ios"
47 | sqflite:
48 | :path: ".symlinks/plugins/sqflite/ios"
49 | url_launcher:
50 | :path: ".symlinks/plugins/url_launcher/ios"
51 | webview_flutter:
52 | :path: ".symlinks/plugins/webview_flutter/ios"
53 |
54 | SPEC CHECKSUMS:
55 | device_info: 76ce0b32e13034d1883be4a382433648f9dcee63
56 | flustars: 0e81b1510ccac786ec044db1565e499b83e65da1
57 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
58 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
59 | path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
60 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53
61 | sqflite: d1612813fa7db7c667bed9f1d1b508deffc56999
62 | url_launcher: 92b89c1029a0373879933c21642958c874539095
63 | webview_flutter: 9bd234c07e99632356cba112df56fd1d47d6b6e3
64 |
65 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09
66 |
67 | COCOAPODS: 1.5.3
68 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/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 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/flutter_wanandroid/51061b34a4923bfeaad02f9d1fa53f296391d9e7/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 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_wanandroid
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | io.flutter.embedded_views_preview
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | NSAppTransportSecurity
47 |
48 | NSAllowsArbitraryLoads
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hans-CN.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hans-CN.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/blocs/application_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_wanandroid/blocs/bloc_provider.dart';
2 | import 'package:rxdart/rxdart.dart';
3 |
4 | class ApplicationBloc implements BlocBase {
5 | BehaviorSubject _appEvent = BehaviorSubject();
6 |
7 | Sink get _appEventSink => _appEvent.sink;
8 |
9 | Stream get appEventStream => _appEvent.stream;
10 |
11 | @override
12 | void dispose() {
13 | _appEvent.close();
14 | }
15 |
16 | @override
17 | Future getData({String labelId, int page}) {
18 | // TODO: implement getData
19 | return null;
20 | }
21 |
22 | @override
23 | Future onLoadMore({String labelId}) {
24 | // TODO: implement onLoadMore
25 | return null;
26 | }
27 |
28 | @override
29 | Future onRefresh({String labelId}) {
30 | // TODO: implement onRefresh
31 | return null;
32 | }
33 |
34 | void sendAppEvent(int type) {
35 | _appEventSink.add(type);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/blocs/bloc_index.dart:
--------------------------------------------------------------------------------
1 | export 'bloc_provider.dart';
2 | export 'application_bloc.dart';
3 | export 'main_bloc.dart';
4 | export 'com_list_bloc.dart';
5 | export 'tab_bloc.dart';
6 | export 'collect_bloc.dart';
7 |
--------------------------------------------------------------------------------
/lib/blocs/bloc_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | abstract class BlocBase {
4 | Future getData({String labelId, int page});
5 |
6 | Future onRefresh({String labelId});
7 |
8 | Future onLoadMore({String labelId});
9 |
10 | void dispose();
11 | }
12 |
13 | class BlocProvider extends StatefulWidget {
14 | BlocProvider({
15 | Key key,
16 | @required this.child,
17 | @required this.bloc,
18 | this.userDispose: true,
19 | }) : super(key: key);
20 |
21 | final T bloc;
22 | final Widget child;
23 | final bool userDispose;
24 |
25 | @override
26 | _BlocProviderState createState() => _BlocProviderState();
27 |
28 | static T of(BuildContext context) {
29 | BlocProvider provider =
30 | context.findAncestorWidgetOfExactType>();
31 | return provider.bloc;
32 | }
33 | }
34 |
35 | class _BlocProviderState extends State> {
36 | @override
37 | void dispose() {
38 | if (widget.userDispose) widget.bloc.dispose();
39 | super.dispose();
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return widget.child;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/blocs/collect_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:collection';
2 |
3 | import 'package:flutter_wanandroid/blocs/bloc_provider.dart';
4 | import 'package:flutter_wanandroid/data/protocol/models.dart';
5 | import 'package:flutter_wanandroid/data/repository/collect_repository.dart';
6 | import 'package:flutter_wanandroid/event/event.dart';
7 | import 'package:flutter_wanandroid/utils/util_index.dart';
8 | import 'package:pull_to_refresh/pull_to_refresh.dart';
9 | import 'package:rxdart/rxdart.dart';
10 |
11 | class CollectBloc implements BlocBase {
12 | BehaviorSubject> _collectListBs =
13 | BehaviorSubject>();
14 |
15 | Sink> get _collectListSink => _collectListBs.sink;
16 |
17 | Stream> get collectListStream =>
18 | _collectListBs.stream.asBroadcastStream();
19 |
20 | List _collectList;
21 | int _collectPage = 0;
22 |
23 | CollectRepository _collectRepository = new CollectRepository();
24 |
25 | @override
26 | Future getData({String labelId, int page}) {
27 | return getCollectList(labelId, page);
28 | }
29 |
30 | @override
31 | Future onLoadMore({String labelId}) {
32 | int _page = ++_collectPage;
33 | return getData(labelId: labelId, page: _page);
34 | }
35 |
36 | @override
37 | Future onRefresh({String labelId, bool isReload}) {
38 | LogUtil.e("CollectBloc onRefresh...... $labelId");
39 | _collectPage = 0;
40 | if (isReload == true) {
41 | _collectListSink.add(null);
42 | }
43 | return getData(labelId: labelId, page: _collectPage);
44 | }
45 |
46 | Future getCollectList(String labelId, int page) {
47 | return _collectRepository.getCollectList(page).then((list) {
48 | if (_collectList == null) {
49 | _collectList = new List();
50 | }
51 | if (page == 0) {
52 | _collectList.clear();
53 | }
54 | _collectList.addAll(list);
55 | _collectListSink.add(UnmodifiableListView(_collectList));
56 | _homeEventSink?.add(new StatusEvent(
57 | labelId,
58 | ObjectUtil.isEmpty(list)
59 | ? RefreshStatus.noMore
60 | : RefreshStatus.idle));
61 | }).catchError((_) {
62 | if (ObjectUtil.isEmpty(_collectList)) {
63 | _collectListBs.sink.addError("error");
64 | }
65 | _collectPage--;
66 | _homeEventSink?.add(new StatusEvent(labelId, RefreshStatus.failed));
67 | });
68 | }
69 |
70 | Sink _homeEventSink;
71 |
72 | void setHomeEventSink(Sink eventSink) {
73 | _homeEventSink = eventSink;
74 | }
75 |
76 | @override
77 | void dispose() {
78 | _collectListBs.close();
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/blocs/com_list_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:collection';
2 |
3 | import 'package:flutter_wanandroid/common/component_index.dart';
4 | import 'package:flutter_wanandroid/data/repository/wan_repository.dart';
5 |
6 | class ComListBloc implements BlocBase {
7 | BehaviorSubject> _comListData =
8 | BehaviorSubject>();
9 |
10 | Sink> get _comListSink => _comListData.sink;
11 |
12 | Stream> get comListStream => _comListData.stream;
13 |
14 | List comList;
15 | int _comListPage = 0;
16 |
17 | BehaviorSubject _comListEvent = BehaviorSubject();
18 |
19 | Sink get _comListEventSink => _comListEvent.sink;
20 |
21 | Stream get comListEventStream =>
22 | _comListEvent.stream.asBroadcastStream();
23 |
24 | WanRepository wanRepository = new WanRepository();
25 |
26 | @override
27 | Future getData({String labelId, int cid, int page}) {
28 | switch (labelId) {
29 | case Ids.titleReposTree:
30 | return getRepos(labelId, cid, page);
31 | break;
32 | case Ids.titleWxArticleTree:
33 | return getWxArticle(labelId, cid, page);
34 | break;
35 | case Ids.titleSystemTree:
36 | return getArticle(labelId, cid, page);
37 | break;
38 | default:
39 | return Future.delayed(new Duration(seconds: 1));
40 | break;
41 | }
42 | }
43 |
44 | @override
45 | Future onLoadMore({String labelId, int cid}) {
46 | int _page = 0;
47 | _page = ++_comListPage;
48 | return getData(labelId: labelId, cid: cid, page: _page);
49 | }
50 |
51 | @override
52 | Future onRefresh({String labelId, int cid}) {
53 | switch (labelId) {
54 | case Ids.titleReposTree:
55 | _comListPage = 1;
56 | break;
57 | case Ids.titleWxArticleTree:
58 | _comListPage = 1;
59 | break;
60 | case Ids.titleSystemTree:
61 | _comListPage = 0;
62 | break;
63 | default:
64 | break;
65 | }
66 |
67 | return getData(labelId: labelId, cid: cid, page: _comListPage);
68 | }
69 |
70 | Future getRepos(String labelId, int cid, int page) async {
71 | ComReq _comReq = new ComReq(cid);
72 | return wanRepository
73 | .getProjectList(page: page, data: _comReq.toJson())
74 | .then((list) {
75 | if (comList == null) comList = new List();
76 | if (page == 1) {
77 | comList.clear();
78 | }
79 | comList.addAll(list);
80 | _comListSink.add(UnmodifiableListView(comList));
81 | _comListEventSink.add(new StatusEvent(labelId,
82 | ObjectUtil.isEmpty(list) ? RefreshStatus.noMore : RefreshStatus.idle,
83 | cid: cid));
84 | }).catchError((_) {
85 | _comListPage--;
86 | _comListEventSink.add(new StatusEvent(labelId, RefreshStatus.failed));
87 | });
88 | }
89 |
90 | Future getWxArticle(String labelId, int cid, int page) async {
91 | return wanRepository.getWxArticleList(id: cid, page: page).then((list) {
92 | if (comList == null) comList = new List();
93 | if (page == 1) {
94 | comList.clear();
95 | }
96 | comList.addAll(list);
97 | _comListSink.add(UnmodifiableListView(comList));
98 | _comListEventSink.add(new StatusEvent(labelId,
99 | ObjectUtil.isEmpty(list) ? RefreshStatus.noMore : RefreshStatus.idle,
100 | cid: cid));
101 | }).catchError((_) {
102 | _comListPage--;
103 | _comListEventSink.add(new StatusEvent(labelId, RefreshStatus.failed));
104 | });
105 | }
106 |
107 | Future getArticle(String labelId, int cid, int page) async {
108 | ComReq _comReq = new ComReq(cid);
109 | return wanRepository
110 | .getArticleList(page: page, data: _comReq.toJson())
111 | .then((list) {
112 | if (comList == null) comList = new List();
113 | if (page == 0) {
114 | comList.clear();
115 | }
116 | comList.addAll(list);
117 | _comListSink.add(UnmodifiableListView(comList));
118 | _comListEventSink.add(new StatusEvent(labelId,
119 | ObjectUtil.isEmpty(list) ? RefreshStatus.noMore : RefreshStatus.idle,
120 | cid: cid));
121 | }).catchError((_) {
122 | _comListPage--;
123 | _comListEventSink.add(new StatusEvent(labelId, RefreshStatus.failed));
124 | });
125 | }
126 |
127 | @override
128 | void dispose() {
129 | _comListData.close();
130 | _comListEvent.close();
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/lib/blocs/tab_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:collection';
2 |
3 | import 'package:flutter_wanandroid/common/component_index.dart';
4 | import 'package:flutter_wanandroid/data/repository/wan_repository.dart';
5 |
6 | class TabBloc implements BlocBase {
7 | BehaviorSubject> _tabTree =
8 | BehaviorSubject>();
9 |
10 | Sink> get _tabTreeSink => _tabTree.sink;
11 |
12 | Stream> get tabTreeStream => _tabTree.stream;
13 |
14 | List treeList;
15 |
16 | WanRepository wanRepository = new WanRepository();
17 |
18 | @override
19 | Future getData({String labelId, int page}) {
20 | switch (labelId) {
21 | case Ids.titleReposTree:
22 | return getProjectTree(labelId);
23 | break;
24 | case Ids.titleWxArticleTree:
25 | return getWxArticleTree(labelId);
26 | break;
27 | case Ids.titleSystemTree:
28 | return getSystemTree(labelId);
29 | break;
30 | default:
31 | return Future.delayed(new Duration(seconds: 1));
32 | break;
33 | }
34 | }
35 |
36 | @override
37 | Future onLoadMore({String labelId}) {
38 | return null;
39 | }
40 |
41 | @override
42 | Future onRefresh({String labelId}) {
43 | return getData(labelId: labelId);
44 | }
45 |
46 | void bindSystemData(TreeModel model) {
47 | if (model == null) return;
48 | treeList = model.children;
49 | }
50 |
51 | Future getProjectTree(String labelId) {
52 | return wanRepository.getProjectTree().then((list) {
53 | _tabTreeSink.add(UnmodifiableListView(list));
54 | });
55 | }
56 |
57 | Future getWxArticleTree(String labelId) {
58 | return wanRepository.getWxArticleChapters().then((list) {
59 | _tabTreeSink.add(UnmodifiableListView(list));
60 | });
61 | }
62 |
63 | Future getSystemTree(String labelId) {
64 | return Future.delayed(new Duration(milliseconds: 500)).then((_) {
65 | _tabTreeSink.add(UnmodifiableListView(treeList));
66 | });
67 | }
68 |
69 | Future getTree(String labelId) {
70 | return wanRepository.getProjectTree().then((list) {
71 | if (treeList == null) {
72 | treeList = new List();
73 | }
74 | treeList.clear();
75 | treeList.addAll(list);
76 | _tabTreeSink.add(UnmodifiableListView(treeList));
77 | // _homeEventSink.add(new StatusEvent(
78 | // labelId,
79 | // ObjectUtil.isEmpty(list)
80 | // ? RefreshStatus.noMore
81 | // : RefreshStatus.idle));
82 | }).catchError((_) {
83 | // _homeEventSink.add(new StatusEvent(labelId, RefreshStatus.failed));
84 | });
85 | }
86 |
87 | @override
88 | void dispose() {
89 | _tabTree.close();
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/lib/common/common.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 |
3 | class Constant {
4 | static const String keyLanguage = 'key_language';
5 |
6 | static const int status_success = 0;
7 |
8 | static const String server_address = wan_android;
9 |
10 | static const String wan_android = "https://www.wanandroid.com/";
11 |
12 | static const int type_sys_update = 1;
13 | static const int type_refresh_all = 5;
14 |
15 | static const String key_theme_color = 'key_theme_color';
16 | static const String key_guide = 'key_guide';
17 | static const String key_splash_model = 'key_splash_models';
18 | }
19 |
20 | class AppConfig {
21 | static const String appId = 'com.thl.flutterwanandroid';
22 | static const String appName = 'flutter_wanandroid';
23 | static const String version = '0.2.5';
24 | static const bool isDebug = kDebugMode;
25 | }
26 |
27 | class LoadStatus {
28 | static const int fail = -1;
29 | static const int loading = 0;
30 | static const int success = 1;
31 | static const int empty = 2;
32 | }
33 |
--------------------------------------------------------------------------------
/lib/common/component_index.dart:
--------------------------------------------------------------------------------
1 | export 'dart:convert';
2 |
3 | export 'package:flutter_wanandroid/blocs/bloc_index.dart';
4 | export 'package:flutter_wanandroid/ui/widgets/widget_index.dart';
5 | export 'package:flutter_wanandroid/res/index.dart';
6 | export 'package:flutter_wanandroid/utils/util_index.dart';
7 |
8 | export 'package:base_library/base_library.dart';
9 |
10 | export 'package:flutter_wanandroid/common/common.dart';
11 | export 'package:flutter_wanandroid/common/sp_helper.dart';
12 | export 'package:flutter_wanandroid/event/event.dart';
13 |
14 | export 'package:flutter_wanandroid/data/protocol/models.dart';
15 | export 'package:flutter_wanandroid/models/models.dart';
16 |
17 | export 'package:rxdart/rxdart.dart';
18 |
19 | export 'package:flukit/flukit.dart';
20 | export 'package:cached_network_image/cached_network_image.dart';
21 | export 'package:pull_to_refresh/pull_to_refresh.dart';
22 |
--------------------------------------------------------------------------------
/lib/common/global.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 | import 'package:flutter/widgets.dart';
6 | import 'package:flustars/flustars.dart';
7 |
8 | class Global {
9 | //初始化全局信息
10 | static Future init(VoidCallback callback) async {
11 | WidgetsFlutterBinding.ensureInitialized();
12 | await SpUtil.getInstance();
13 | callback();
14 | if (Platform.isAndroid) {
15 | // 以下两行 设置android状态栏为透明的沉浸。写在组件渲染之后,是为了在渲染后进行set赋值,覆盖状态栏,写在渲染之前MaterialApp组件会覆盖掉这个值。
16 | SystemUiOverlayStyle systemUiOverlayStyle =
17 | SystemUiOverlayStyle(statusBarColor: Colors.transparent);
18 | SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/common/sp_helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:common_utils/common_utils.dart';
4 | import 'package:flustars/flustars.dart';
5 | import 'package:flutter_wanandroid/common/common.dart';
6 | import 'package:flutter_wanandroid/data/protocol/models.dart';
7 | import 'package:flutter_wanandroid/models/models.dart';
8 |
9 | class SpHelper {
10 | /// T 用于区分存储类型
11 | /// Example.
12 | /// SpHelper.putObject(key, value);
13 | /// SpHelper.putObject(key, value);
14 | /// SpHelper.putObject(key, value);
15 | /// SpHelper.putObject(key, value);
16 | /// SpHelper.putObject(key, value);
17 | ///
18 | /// SpHelper.putObject(key, UserModel);
19 | ///
20 | static void _putObject(String key, Object value) {
21 | switch (T) {
22 | case int:
23 | SpUtil.putInt(key, value);
24 | break;
25 | case double:
26 | SpUtil.putDouble(key, value);
27 | break;
28 | case bool:
29 | SpUtil.putBool(key, value);
30 | break;
31 | case String:
32 | SpUtil.putString(key, value);
33 | break;
34 | case List:
35 | SpUtil.putStringList(key, value);
36 | break;
37 | default:
38 | SpUtil.putObject(key, value);
39 | break;
40 | }
41 | }
42 |
43 | static String getThemeColor() {
44 | return SpUtil.getString(Constant.key_theme_color,
45 | defValue: 'deepPurpleAccent');
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/data/api/apis.dart:
--------------------------------------------------------------------------------
1 | class WanAndroidApi {
2 | /// 首页banner http://www.wanandroid.com/banner/json
3 | static const String BANNER = "banner";
4 |
5 | /// 最新项目tab (首页的第二个tab) http://wanandroid.com/article/listproject/0/json
6 | static const String ARTICLE_LISTPROJECT = "article/listproject";
7 |
8 | /// 项目分类 http://www.wanandroid.com/project/tree/json
9 | static const String PROJECT_TREE = "project/tree";
10 |
11 | /// 项目列表数据 http://www.wanandroid.com/project/list/1/json?cid=294
12 | static const String PROJECT_LIST = "project/list";
13 |
14 | /// 体系数据 http://www.wanandroid.com/tree/json
15 | static const String TREE = "tree";
16 |
17 | /// 首页文章列表 http://www.wanandroid.com/article/list/0/json
18 | /// 知识体系下的文章 http://www.wanandroid.com/article/list/0/json?cid=60
19 | static const String ARTICLE_LIST = "article/list";
20 |
21 | /// 获取公众号列表 http://wanandroid.com/wxarticle/chapters/json
22 | static const String WXARTICLE_CHAPTERS = "wxarticle/chapters";
23 |
24 | /// 查看某个公众号历史数据 http://wanandroid.com/wxarticle/list/405/1/json
25 | /// 在某个公众号中搜索历史文章 http://wanandroid.com/wxarticle/list/405/1/json?k=Java
26 | static const String WXARTICLE_LIST = "wxarticle/list";
27 |
28 | static const String user_register = "user/register"; //注册
29 | static const String user_login = "user/login"; //登录
30 | static const String user_logout = "user/logout"; //退出
31 |
32 | static const String lg_collect_list = "lg/collect/list"; //收藏文章列表
33 | static const String lg_collect = "lg/collect"; //收藏站内文章
34 | static const String lg_uncollect_originid = "lg/uncollect_originId"; //取消收藏
35 |
36 | static String getPath({String path: '', int page, String resType: 'json'}) {
37 | StringBuffer sb = new StringBuffer(path);
38 | if (page != null) {
39 | sb.write('/$page');
40 | }
41 | if (resType != null && resType.isNotEmpty) {
42 | sb.write('/$resType');
43 | }
44 | return sb.toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/data/repository/collect_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:base_library/base_library.dart';
2 | import 'package:flutter_wanandroid/common/common.dart';
3 | import 'package:flutter_wanandroid/data/api/apis.dart';
4 | import 'package:flutter_wanandroid/data/protocol/models.dart';
5 |
6 | class CollectRepository {
7 | Future> getCollectList(int page) async {
8 | BaseResp