├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── README-ZH.md
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── shuqi
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── img
├── 2.0x
│ ├── actionbar_checkin.png
│ ├── actionbar_search.png
│ ├── aliuser_title_back_normal.9.png
│ ├── arrow_right.png
│ ├── bookshelf_add.png
│ ├── bookshelf_bg.png
│ ├── bookshelf_cloud_0.png
│ ├── bookshelf_cloud_1.png
│ ├── bookshelf_cloud_2.png
│ ├── bookshelf_cloud_3.png
│ ├── bookshelf_continue_read.png
│ ├── detail_chapter.png
│ ├── detail_down.png
│ ├── detail_fold_bg.png
│ ├── detail_latest.png
│ ├── detail_star.png
│ ├── detail_star_half.png
│ ├── detail_up.png
│ ├── detail_write_comment.png
│ ├── home_search.png
│ ├── home_tip.png
│ ├── icon_menu_catalog.png
│ ├── icon_menu_share.png
│ ├── me_action.png
│ ├── me_buy.png
│ ├── me_comment.png
│ ├── me_coupon.png
│ ├── me_date.png
│ ├── me_favorite.png
│ ├── me_feedback.png
│ ├── me_gift.png
│ ├── me_night.png
│ ├── me_record.png
│ ├── me_setting.png
│ ├── me_theme.png
│ ├── me_vip.png
│ ├── me_wallet.png
│ ├── menu_category.png
│ ├── menu_complete.png
│ ├── menu_publish.png
│ ├── menu_rank.png
│ ├── menu_vip.png
│ ├── placeholder_avatar.png
│ ├── pub_back_gray.png
│ ├── pub_back_white.png
│ ├── read_bg.png
│ ├── read_icon_brightness.png
│ ├── read_icon_catalog.png
│ ├── read_icon_chapter_next.png
│ ├── read_icon_chapter_previous.png
│ ├── read_icon_font.png
│ ├── read_icon_more.png
│ ├── read_icon_setting.png
│ ├── read_icon_vip.png
│ ├── read_icon_voice.png
│ ├── read_more_detail.png
│ ├── reader_battery.png
│ ├── tab_bookshelf_n.png
│ ├── tab_bookshelf_p.png
│ ├── tab_bookstore_n.png
│ ├── tab_bookstore_p.png
│ ├── tab_me_n.png
│ ├── tab_me_p.png
│ ├── tab_writer_n.png
│ └── tab_writer_p.png
├── actionbar_checkin.png
├── actionbar_search.png
├── aliuser_title_back_normal.9.png
├── arrow_right.png
├── bookshelf_add.png
├── bookshelf_bg.png
├── bookshelf_cloud_0.png
├── bookshelf_cloud_1.png
├── bookshelf_cloud_2.png
├── bookshelf_cloud_3.png
├── bookshelf_continue_read.png
├── detail_chapter.png
├── detail_down.png
├── detail_fold_bg.png
├── detail_latest.png
├── detail_star.png
├── detail_star_half.png
├── detail_up.png
├── detail_write_comment.png
├── home_search.png
├── home_tip.png
├── icon_menu_catalog.png
├── icon_menu_share.png
├── me_action.png
├── me_buy.png
├── me_comment.png
├── me_coupon.png
├── me_date.png
├── me_favorite.png
├── me_feedback.png
├── me_gift.png
├── me_night.png
├── me_record.png
├── me_setting.png
├── me_theme.png
├── me_vip.png
├── me_wallet.png
├── menu_category.png
├── menu_complete.png
├── menu_publish.png
├── menu_rank.png
├── menu_vip.png
├── placeholder_avatar.png
├── pub_back_gray.png
├── pub_back_white.png
├── read_bg.png
├── read_icon_brightness.png
├── read_icon_catalog.png
├── read_icon_chapter_next.png
├── read_icon_chapter_previous.png
├── read_icon_font.png
├── read_icon_more.png
├── read_icon_setting.png
├── read_icon_vip.png
├── read_icon_voice.png
├── read_more_detail.png
├── reader_battery.png
├── tab_bookshelf_n.png
├── tab_bookshelf_p.png
├── tab_bookstore_n.png
├── tab_bookstore_p.png
├── tab_me_n.png
├── tab_me_p.png
├── tab_writer_n.png
└── tab_writer_p.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
│ │ ├── img_app-1.png
│ │ └── img_app.png
│ ├── Contents.json
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@3x.png
│ │ └── img_loading.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── app
│ ├── app_navigator.dart
│ ├── app_scene.dart
│ ├── constant.dart
│ ├── request.dart
│ ├── root_scene.dart
│ ├── sq_color.dart
│ └── user_manager.dart
├── bookshelf
│ ├── bookshelf_cloud_widget.dart
│ ├── bookshelf_header.dart
│ ├── bookshelf_item_view.dart
│ └── bookshelf_scene.dart
├── global.dart
├── home
│ ├── home_banner.dart
│ ├── home_list_view.dart
│ ├── home_menu.dart
│ ├── home_model.dart
│ ├── home_novel_cover_view.dart
│ ├── home_scene.dart
│ ├── home_section_view.dart
│ ├── novel_cell.dart
│ ├── novel_first_hybird_card.dart
│ ├── novel_four_grid_view.dart
│ ├── novel_grid_item.dart
│ ├── novel_normal_card.dart
│ └── novel_second_hybird_card.dart
├── main.dart
├── me
│ ├── login_page.dart
│ ├── me_cell.dart
│ ├── me_header.dart
│ ├── me_page.dart
│ ├── setting_page.dart
│ └── web_page.dart
├── model
│ ├── article.dart
│ ├── chapter.dart
│ ├── novel.dart
│ └── novel_comment.dart
├── novel_detail
│ ├── novel_comment_cell.dart
│ ├── novel_detail_cell.dart
│ ├── novel_detail_header.dart
│ ├── novel_detail_page.dart
│ ├── novel_detail_recommend_view.dart
│ ├── novel_detail_toolbar.dart
│ └── novel_summary_view.dart
├── public.dart
├── reader
│ ├── article_provider.dart
│ ├── battery_view.dart
│ ├── reader_config.dart
│ ├── reader_menu.dart
│ ├── reader_overlayer.dart
│ ├── reader_page.dart
│ ├── reader_page_agent.dart
│ ├── reader_utils.dart
│ └── reader_view.dart
├── utility
│ ├── event_bus.dart
│ └── styles.dart
└── widget
│ ├── novel_cover_image.dart
│ └── novel_cover_view.dart
├── mock
├── article_1000.json
├── article_1001.json
├── article_1002.json
├── article_1003.json
├── article_1004.json
├── article_1005.json
├── article_1006.json
├── bookshelf.json
├── catalog.json
├── home_cartoon.json
├── home_excellent.json
├── home_female.json
├── home_male.json
├── login.json
├── novel_comment.json
├── novel_detail.json
├── novel_recommend.json
└── sms.json
├── pubspec.lock
├── pubspec.yaml
└── screenshot
├── android_0.png
├── android_1.png
├── android_2.png
├── ios_0.png
├── ios_1.png
└── ios_2.png
/.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 |
--------------------------------------------------------------------------------
/.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: 4d7946a68d26794349189cf21b3f68cc6fe61dcb
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "shuqi",
9 | "request": "launch",
10 | "type": "dart"
11 | },
12 | {
13 | "name": "shuqi (profile mode)",
14 | "request": "launch",
15 | "type": "dart",
16 | "flutterMode": "profile"
17 | },
18 | {
19 | "name": "shuqi (release mode)",
20 | "request": "launch",
21 | "type": "dart",
22 | "flutterMode": "release"
23 | },
24 | ]
25 | }
--------------------------------------------------------------------------------
/README-ZH.md:
--------------------------------------------------------------------------------
1 | # 高仿书旗小说 Flutter 版
2 |
3 | Language: [English](README.md) | 中文
4 |
5 | 如果你对SwiftUI也感兴趣,欢迎关注[swiftui-shuqi-reader](https://github.com/huanxsd/swiftui-shuqi-reader)
6 |
7 | ## iOS截图
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | ## Android截图
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | ## 简介
24 |
25 | 这是一个用Flutter写的书旗小说客户端。
26 |
27 | 主要实现的功能有:
28 | * 框架:App常用的Tab框架,UI根据系统字体设定自适应;
29 | * 书城:3D轮播、菜单、五种通过API配置的卡片样式;
30 | * 小说详情:导航栏样式切换动效、高斯模糊效果、文字伸缩;
31 | * 书架:顶部云彩动效、导航栏样式切换动效、书籍展示;
32 | * 我的:未登录/登录状态切换,菜单展示;
33 | * 登录:获取验证码、用户登录、用户状态缓存、用户注销;
34 | * 阅读:文章加载、横向翻页、菜单展示。
35 |
36 | 所有功能都是用Dart写的,iOS和Android的代码复用率达到了100%
37 |
38 | 我试着让这个Demo的结构尽量接近实际项目,同时使用比较简单方式去实现功能。这样可以让刚接触Flutter的人更够容易理解代码。
39 |
40 | App中的网络请求均通过一个名为**Request**的工具类。在Request内部,通过**本地mock**方式,获取模拟数据。
41 |
42 | ## 第三方依赖
43 |
44 | * [je_kit](https://github.com/jayden320/je_kit)
45 |
46 | ## 安装
47 |
48 | 1. **Clone the repo**
49 |
50 | ```
51 | $ git clone https://github.com/huanxsd/flutter_shuqi.git
52 | $ cd flutter_shuqi
53 | ```
54 |
55 | 2. **Running:**
56 |
57 | ```
58 | $ flutter run
59 | ```
60 |
61 | ## 联系
62 |
63 | 如果有任何建议,可以在简书上给我留言
64 | [简书](https://www.jianshu.com/p/aed5e319b313)
65 |
66 | ## License
67 |
68 | MIT
69 |
70 | ## 最后
71 |
72 | 如果你喜欢这个项目,欢迎给我一个star。我将持续更新这个项目 :)
73 |
74 | 也欢迎在[Github主页](https://github.com/huanxsd)关注我的其他项目。
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 高仿书旗小说 Flutter 版
2 |
3 | Language: English | [中文](README-ZH.md)
4 |
5 | If you are also interested in SwiftUI, welcome to follow [swiftui-shuqi-reader](https://github.com/huanxsd/swiftui-shuqi-reader)
6 |
7 | ## screen shot for iOS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | ## screen shot for Android
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | ## Setup
24 |
25 | 1. **Clone the repo**
26 |
27 | ```
28 | $ git clone https://github.com/huanxsd/flutter_shuqi.git
29 | $ cd flutter_shuqi
30 | ```
31 |
32 | 2. **Running:**
33 |
34 | ```
35 | $ flutter run
36 | ```
37 |
38 | ## Dependency
39 |
40 | * [je_kit](https://github.com/jayden320/je_kit)
41 |
42 | ## Contact
43 |
44 | If you have any suggestions, leave a message here
45 | [简书](https://www.jianshu.com/p/aed5e319b313)
46 |
47 | ## License
48 |
49 |
50 | ```
51 | MIT License
52 |
53 | Copyright (c) 2018 Jpeng
54 |
55 | Permission is hereby granted, free of charge, to any person obtaining a copy
56 | of this software and associated documentation files (the "Software"), to deal
57 | in the Software without restriction, including without limitation the rights
58 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
59 | copies of the Software, and to permit persons to whom the Software is
60 | furnished to do so, subject to the following conditions:
61 |
62 | The above copyright notice and this permission notice shall be included in all
63 | copies or substantial portions of the Software.
64 |
65 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
66 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
67 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
68 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
69 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
70 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
71 | SOFTWARE.
72 | ```
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.shuqi"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
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 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/shuqi/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.shuqi
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/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-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/img/2.0x/actionbar_checkin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/actionbar_checkin.png
--------------------------------------------------------------------------------
/img/2.0x/actionbar_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/actionbar_search.png
--------------------------------------------------------------------------------
/img/2.0x/aliuser_title_back_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/aliuser_title_back_normal.9.png
--------------------------------------------------------------------------------
/img/2.0x/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/arrow_right.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_add.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_bg.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_cloud_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_cloud_0.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_cloud_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_cloud_1.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_cloud_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_cloud_2.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_cloud_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_cloud_3.png
--------------------------------------------------------------------------------
/img/2.0x/bookshelf_continue_read.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/bookshelf_continue_read.png
--------------------------------------------------------------------------------
/img/2.0x/detail_chapter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_chapter.png
--------------------------------------------------------------------------------
/img/2.0x/detail_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_down.png
--------------------------------------------------------------------------------
/img/2.0x/detail_fold_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_fold_bg.png
--------------------------------------------------------------------------------
/img/2.0x/detail_latest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_latest.png
--------------------------------------------------------------------------------
/img/2.0x/detail_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_star.png
--------------------------------------------------------------------------------
/img/2.0x/detail_star_half.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_star_half.png
--------------------------------------------------------------------------------
/img/2.0x/detail_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_up.png
--------------------------------------------------------------------------------
/img/2.0x/detail_write_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/detail_write_comment.png
--------------------------------------------------------------------------------
/img/2.0x/home_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/home_search.png
--------------------------------------------------------------------------------
/img/2.0x/home_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/home_tip.png
--------------------------------------------------------------------------------
/img/2.0x/icon_menu_catalog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/icon_menu_catalog.png
--------------------------------------------------------------------------------
/img/2.0x/icon_menu_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/icon_menu_share.png
--------------------------------------------------------------------------------
/img/2.0x/me_action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_action.png
--------------------------------------------------------------------------------
/img/2.0x/me_buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_buy.png
--------------------------------------------------------------------------------
/img/2.0x/me_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_comment.png
--------------------------------------------------------------------------------
/img/2.0x/me_coupon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_coupon.png
--------------------------------------------------------------------------------
/img/2.0x/me_date.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_date.png
--------------------------------------------------------------------------------
/img/2.0x/me_favorite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_favorite.png
--------------------------------------------------------------------------------
/img/2.0x/me_feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_feedback.png
--------------------------------------------------------------------------------
/img/2.0x/me_gift.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_gift.png
--------------------------------------------------------------------------------
/img/2.0x/me_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_night.png
--------------------------------------------------------------------------------
/img/2.0x/me_record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_record.png
--------------------------------------------------------------------------------
/img/2.0x/me_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_setting.png
--------------------------------------------------------------------------------
/img/2.0x/me_theme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_theme.png
--------------------------------------------------------------------------------
/img/2.0x/me_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_vip.png
--------------------------------------------------------------------------------
/img/2.0x/me_wallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/me_wallet.png
--------------------------------------------------------------------------------
/img/2.0x/menu_category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/menu_category.png
--------------------------------------------------------------------------------
/img/2.0x/menu_complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/menu_complete.png
--------------------------------------------------------------------------------
/img/2.0x/menu_publish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/menu_publish.png
--------------------------------------------------------------------------------
/img/2.0x/menu_rank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/menu_rank.png
--------------------------------------------------------------------------------
/img/2.0x/menu_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/menu_vip.png
--------------------------------------------------------------------------------
/img/2.0x/placeholder_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/placeholder_avatar.png
--------------------------------------------------------------------------------
/img/2.0x/pub_back_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/pub_back_gray.png
--------------------------------------------------------------------------------
/img/2.0x/pub_back_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/pub_back_white.png
--------------------------------------------------------------------------------
/img/2.0x/read_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_bg.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_brightness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_brightness.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_catalog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_catalog.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_chapter_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_chapter_next.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_chapter_previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_chapter_previous.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_font.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_font.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_more.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_setting.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_vip.png
--------------------------------------------------------------------------------
/img/2.0x/read_icon_voice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_icon_voice.png
--------------------------------------------------------------------------------
/img/2.0x/read_more_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/read_more_detail.png
--------------------------------------------------------------------------------
/img/2.0x/reader_battery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/reader_battery.png
--------------------------------------------------------------------------------
/img/2.0x/tab_bookshelf_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_bookshelf_n.png
--------------------------------------------------------------------------------
/img/2.0x/tab_bookshelf_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_bookshelf_p.png
--------------------------------------------------------------------------------
/img/2.0x/tab_bookstore_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_bookstore_n.png
--------------------------------------------------------------------------------
/img/2.0x/tab_bookstore_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_bookstore_p.png
--------------------------------------------------------------------------------
/img/2.0x/tab_me_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_me_n.png
--------------------------------------------------------------------------------
/img/2.0x/tab_me_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_me_p.png
--------------------------------------------------------------------------------
/img/2.0x/tab_writer_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_writer_n.png
--------------------------------------------------------------------------------
/img/2.0x/tab_writer_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/2.0x/tab_writer_p.png
--------------------------------------------------------------------------------
/img/actionbar_checkin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/actionbar_checkin.png
--------------------------------------------------------------------------------
/img/actionbar_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/actionbar_search.png
--------------------------------------------------------------------------------
/img/aliuser_title_back_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/aliuser_title_back_normal.9.png
--------------------------------------------------------------------------------
/img/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/arrow_right.png
--------------------------------------------------------------------------------
/img/bookshelf_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_add.png
--------------------------------------------------------------------------------
/img/bookshelf_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_bg.png
--------------------------------------------------------------------------------
/img/bookshelf_cloud_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_cloud_0.png
--------------------------------------------------------------------------------
/img/bookshelf_cloud_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_cloud_1.png
--------------------------------------------------------------------------------
/img/bookshelf_cloud_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_cloud_2.png
--------------------------------------------------------------------------------
/img/bookshelf_cloud_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_cloud_3.png
--------------------------------------------------------------------------------
/img/bookshelf_continue_read.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/bookshelf_continue_read.png
--------------------------------------------------------------------------------
/img/detail_chapter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_chapter.png
--------------------------------------------------------------------------------
/img/detail_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_down.png
--------------------------------------------------------------------------------
/img/detail_fold_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_fold_bg.png
--------------------------------------------------------------------------------
/img/detail_latest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_latest.png
--------------------------------------------------------------------------------
/img/detail_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_star.png
--------------------------------------------------------------------------------
/img/detail_star_half.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_star_half.png
--------------------------------------------------------------------------------
/img/detail_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_up.png
--------------------------------------------------------------------------------
/img/detail_write_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/detail_write_comment.png
--------------------------------------------------------------------------------
/img/home_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/home_search.png
--------------------------------------------------------------------------------
/img/home_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/home_tip.png
--------------------------------------------------------------------------------
/img/icon_menu_catalog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/icon_menu_catalog.png
--------------------------------------------------------------------------------
/img/icon_menu_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/icon_menu_share.png
--------------------------------------------------------------------------------
/img/me_action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_action.png
--------------------------------------------------------------------------------
/img/me_buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_buy.png
--------------------------------------------------------------------------------
/img/me_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_comment.png
--------------------------------------------------------------------------------
/img/me_coupon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_coupon.png
--------------------------------------------------------------------------------
/img/me_date.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_date.png
--------------------------------------------------------------------------------
/img/me_favorite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_favorite.png
--------------------------------------------------------------------------------
/img/me_feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_feedback.png
--------------------------------------------------------------------------------
/img/me_gift.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_gift.png
--------------------------------------------------------------------------------
/img/me_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_night.png
--------------------------------------------------------------------------------
/img/me_record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_record.png
--------------------------------------------------------------------------------
/img/me_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_setting.png
--------------------------------------------------------------------------------
/img/me_theme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_theme.png
--------------------------------------------------------------------------------
/img/me_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_vip.png
--------------------------------------------------------------------------------
/img/me_wallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/me_wallet.png
--------------------------------------------------------------------------------
/img/menu_category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/menu_category.png
--------------------------------------------------------------------------------
/img/menu_complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/menu_complete.png
--------------------------------------------------------------------------------
/img/menu_publish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/menu_publish.png
--------------------------------------------------------------------------------
/img/menu_rank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/menu_rank.png
--------------------------------------------------------------------------------
/img/menu_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/menu_vip.png
--------------------------------------------------------------------------------
/img/placeholder_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/placeholder_avatar.png
--------------------------------------------------------------------------------
/img/pub_back_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/pub_back_gray.png
--------------------------------------------------------------------------------
/img/pub_back_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/pub_back_white.png
--------------------------------------------------------------------------------
/img/read_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_bg.png
--------------------------------------------------------------------------------
/img/read_icon_brightness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_brightness.png
--------------------------------------------------------------------------------
/img/read_icon_catalog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_catalog.png
--------------------------------------------------------------------------------
/img/read_icon_chapter_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_chapter_next.png
--------------------------------------------------------------------------------
/img/read_icon_chapter_previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_chapter_previous.png
--------------------------------------------------------------------------------
/img/read_icon_font.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_font.png
--------------------------------------------------------------------------------
/img/read_icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_more.png
--------------------------------------------------------------------------------
/img/read_icon_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_setting.png
--------------------------------------------------------------------------------
/img/read_icon_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_vip.png
--------------------------------------------------------------------------------
/img/read_icon_voice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_icon_voice.png
--------------------------------------------------------------------------------
/img/read_more_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/read_more_detail.png
--------------------------------------------------------------------------------
/img/reader_battery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/reader_battery.png
--------------------------------------------------------------------------------
/img/tab_bookshelf_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_bookshelf_n.png
--------------------------------------------------------------------------------
/img/tab_bookshelf_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_bookshelf_p.png
--------------------------------------------------------------------------------
/img/tab_bookstore_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_bookstore_n.png
--------------------------------------------------------------------------------
/img/tab_bookstore_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_bookstore_p.png
--------------------------------------------------------------------------------
/img/tab_me_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_me_n.png
--------------------------------------------------------------------------------
/img/tab_me_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_me_p.png
--------------------------------------------------------------------------------
/img/tab_writer_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_writer_n.png
--------------------------------------------------------------------------------
/img/tab_writer_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/img/tab_writer_p.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 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | 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 | - battery (0.0.1):
3 | - Flutter
4 | - device_info (0.0.1):
5 | - Flutter
6 | - Flutter (1.0.0)
7 | - fluttertoast (0.0.2):
8 | - Flutter
9 | - Toast
10 | - FMDB (2.7.5):
11 | - FMDB/standard (= 2.7.5)
12 | - FMDB/standard (2.7.5)
13 | - image_gallery_saver (1.5.0):
14 | - Flutter
15 | - package_info_plus (0.4.5):
16 | - Flutter
17 | - path_provider_foundation (0.0.1):
18 | - Flutter
19 | - FlutterMacOS
20 | - permission_handler_apple (9.0.4):
21 | - Flutter
22 | - share (0.0.1):
23 | - Flutter
24 | - shared_preferences_foundation (0.0.1):
25 | - Flutter
26 | - FlutterMacOS
27 | - sqflite (0.0.2):
28 | - Flutter
29 | - FMDB (>= 2.7.5)
30 | - Toast (4.0.0)
31 | - url_launcher_ios (0.0.1):
32 | - Flutter
33 | - webview_flutter_wkwebview (0.0.1):
34 | - Flutter
35 |
36 | DEPENDENCIES:
37 | - battery (from `.symlinks/plugins/battery/ios`)
38 | - device_info (from `.symlinks/plugins/device_info/ios`)
39 | - Flutter (from `Flutter`)
40 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
41 | - image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
42 | - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
43 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
44 | - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
45 | - share (from `.symlinks/plugins/share/ios`)
46 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
47 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
48 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
49 | - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
50 |
51 | SPEC REPOS:
52 | trunk:
53 | - FMDB
54 | - Toast
55 |
56 | EXTERNAL SOURCES:
57 | battery:
58 | :path: ".symlinks/plugins/battery/ios"
59 | device_info:
60 | :path: ".symlinks/plugins/device_info/ios"
61 | Flutter:
62 | :path: Flutter
63 | fluttertoast:
64 | :path: ".symlinks/plugins/fluttertoast/ios"
65 | image_gallery_saver:
66 | :path: ".symlinks/plugins/image_gallery_saver/ios"
67 | package_info_plus:
68 | :path: ".symlinks/plugins/package_info_plus/ios"
69 | path_provider_foundation:
70 | :path: ".symlinks/plugins/path_provider_foundation/ios"
71 | permission_handler_apple:
72 | :path: ".symlinks/plugins/permission_handler_apple/ios"
73 | share:
74 | :path: ".symlinks/plugins/share/ios"
75 | shared_preferences_foundation:
76 | :path: ".symlinks/plugins/shared_preferences_foundation/ios"
77 | sqflite:
78 | :path: ".symlinks/plugins/sqflite/ios"
79 | url_launcher_ios:
80 | :path: ".symlinks/plugins/url_launcher_ios/ios"
81 | webview_flutter_wkwebview:
82 | :path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
83 |
84 | SPEC CHECKSUMS:
85 | battery: 6b19dafdbba590f03b1f0cd2f1224e3ffedadbe6
86 | device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
87 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
88 | fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0
89 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
90 | image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
91 | package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
92 | path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
93 | permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
94 | share: 0b2c3e82132f5888bccca3351c504d0003b3b410
95 | shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
96 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
97 | Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
98 | url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
99 | webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
100 |
101 | PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
102 |
103 | COCOAPODS: 1.12.1
104 |
--------------------------------------------------------------------------------
/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 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "1x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "2x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "3x",
26 | "size" : "29x29"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "2x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "3x",
36 | "size" : "40x40"
37 | },
38 | {
39 | "filename" : "img_app.png",
40 | "idiom" : "iphone",
41 | "scale" : "2x",
42 | "size" : "60x60"
43 | },
44 | {
45 | "filename" : "img_app-1.png",
46 | "idiom" : "iphone",
47 | "scale" : "3x",
48 | "size" : "60x60"
49 | },
50 | {
51 | "idiom" : "ios-marketing",
52 | "scale" : "1x",
53 | "size" : "1024x1024"
54 | }
55 | ],
56 | "info" : {
57 | "author" : "xcode",
58 | "version" : 1
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/img_app-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/ios/Runner/Assets.xcassets/AppIcon.appiconset/img_app-1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/img_app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/ios/Runner/Assets.xcassets/AppIcon.appiconset/img_app.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "LaunchImage.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "filename" : "img_loading.png",
10 | "idiom" : "universal",
11 | "scale" : "2x"
12 | },
13 | {
14 | "filename" : "LaunchImage@3x.png",
15 | "idiom" : "universal",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "author" : "xcode",
21 | "version" : 1
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/img_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayden320/flutter_shuqi/2455285b8c26347fd5f144b3634e3b08b12eb761/ios/Runner/Assets.xcassets/LaunchImage.imageset/img_loading.png
--------------------------------------------------------------------------------
/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 | shuqi
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 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UISupportedInterfaceOrientations
35 |
36 | UIInterfaceOrientationPortrait
37 |
38 | UISupportedInterfaceOrientations~ipad
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationPortraitUpsideDown
42 | UIInterfaceOrientationLandscapeLeft
43 | UIInterfaceOrientationLandscapeRight
44 |
45 | UIViewControllerBasedStatusBarAppearance
46 |
47 | CADisableMinimumFrameDurationOnPhone
48 |
49 | UIApplicationSupportsIndirectInputEvents
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/app/app_navigator.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | import 'package:shuqi/novel_detail/novel_detail_page.dart';
6 | import 'package:shuqi/me/login_page.dart';
7 | import 'package:shuqi/me/web_page.dart';
8 | import 'package:shuqi/reader/reader_page.dart';
9 |
10 | class AppNavigator {
11 | static push(BuildContext context, Widget scene) {
12 | Navigator.push(
13 | context,
14 | MaterialPageRoute(
15 | builder: (BuildContext context) => scene,
16 | ),
17 | );
18 | }
19 |
20 | static pushNovelDetail(BuildContext context, Novel novel) {
21 | AppNavigator.push(context, NovelDetailPage(novel.id));
22 | }
23 |
24 | static pushLogin(BuildContext context) {
25 | Navigator.push(context, MaterialPageRoute(builder: (context) {
26 | return LoginPage();
27 | }));
28 | }
29 |
30 | static pushWeb(BuildContext context, String url, String title) {
31 | Navigator.push(context, MaterialPageRoute(builder: (context) {
32 | return WebPage(url: url, title: title);
33 | }));
34 | }
35 |
36 | static pushReader(BuildContext context, int articleId) {
37 | Navigator.push(context, MaterialPageRoute(builder: (context) {
38 | return ReaderPage(articleId: articleId);
39 | }));
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/app/app_scene.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shuqi/public.dart';
3 | import 'package:shuqi/app/root_scene.dart';
4 | import 'package:oktoast/oktoast.dart';
5 |
6 | final RouteObserver routeObserver = RouteObserver();
7 |
8 | class AppPage extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 | return MaterialApp(
12 | title: '书旗小说',
13 | navigatorObservers: [routeObserver],
14 | debugShowCheckedModeBanner: false,
15 | theme: ThemeData(
16 | primaryColor: SQColor.primary,
17 | dividerColor: SQColor.lightGray,
18 | scaffoldBackgroundColor: SQColor.paper,
19 | textTheme: TextTheme(bodyLarge: TextStyle(color: SQColor.darkGray)),
20 | ),
21 | home: OKToast(child: RootPage()),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/app/constant.dart:
--------------------------------------------------------------------------------
1 | const String EventToggleTabBarIndex = 'EventToggleTabBarIndex';
2 |
--------------------------------------------------------------------------------
/lib/app/request.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:flutter/services.dart' show rootBundle;
3 | import 'dart:convert';
4 |
5 | class Request {
6 | static const String baseUrl = 'http://www.shuqi.com/';
7 |
8 | static Future get({required String action, Map? params}) async {
9 | return Request.mock(action: action, params: params);
10 | }
11 |
12 | static Future post({required String action, Map? params}) async {
13 | return Request.mock(action: action, params: params);
14 | }
15 |
16 | static Future mock({required String action, Map? params}) async {
17 | var responseStr = await rootBundle.loadString('mock/$action.json');
18 | var responseJson = json.decode(responseStr);
19 | return responseJson['data'];
20 | }
21 | }
--------------------------------------------------------------------------------
/lib/app/root_scene.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:shared_preferences/shared_preferences.dart';
4 |
5 | import 'package:shuqi/public.dart';
6 |
7 | import 'package:shuqi/home/home_scene.dart';
8 | import 'package:shuqi/bookshelf/bookshelf_scene.dart';
9 | import 'package:shuqi/me/me_page.dart';
10 |
11 | class RootPage extends StatefulWidget {
12 | @override
13 | State createState() => RootPageState();
14 | }
15 |
16 | class RootPageState extends State {
17 | int _tabIndex = 1;
18 | bool isFinishSetup = false;
19 | List _tabImages = [
20 | Image.asset('img/tab_bookshelf_n.png'),
21 | Image.asset('img/tab_bookstore_n.png'),
22 | Image.asset('img/tab_me_n.png'),
23 | ];
24 | List _tabSelectedImages = [
25 | Image.asset('img/tab_bookshelf_p.png'),
26 | Image.asset('img/tab_bookstore_p.png'),
27 | Image.asset('img/tab_me_p.png'),
28 | ];
29 |
30 | @override
31 | void initState() {
32 | super.initState();
33 |
34 | setupApp();
35 |
36 | eventBus.on(EventUserLogin, (arg) {
37 | setState(() {});
38 | });
39 |
40 | eventBus.on(EventUserLogout, (arg) {
41 | setState(() {});
42 | });
43 |
44 | eventBus.on(EventToggleTabBarIndex, (arg) {
45 | setState(() {
46 | _tabIndex = arg;
47 | });
48 | });
49 | }
50 |
51 | @override
52 | void dispose() {
53 | eventBus.off(EventUserLogin);
54 | eventBus.off(EventUserLogout);
55 | eventBus.off(EventToggleTabBarIndex);
56 | super.dispose();
57 | }
58 |
59 | setupApp() async {
60 | preferences = await SharedPreferences.getInstance();
61 | setState(() {
62 | isFinishSetup = true;
63 | });
64 | }
65 |
66 | @override
67 | Widget build(BuildContext context) {
68 | if (!isFinishSetup) {
69 | return Container();
70 | }
71 |
72 | return Scaffold(
73 | body: IndexedStack(
74 | children: [
75 | BookshelfPage(),
76 | HomePage(),
77 | MePage(),
78 | ],
79 | index: _tabIndex,
80 | ),
81 | bottomNavigationBar: CupertinoTabBar(
82 | backgroundColor: Colors.white,
83 | activeColor: SQColor.primary,
84 | items: [
85 | BottomNavigationBarItem(icon: getTabIcon(0), label: '书架'),
86 | BottomNavigationBarItem(icon: getTabIcon(1), label: '书城'),
87 | BottomNavigationBarItem(icon: getTabIcon(2), label: '我的'),
88 | ],
89 | currentIndex: _tabIndex,
90 | onTap: (index) {
91 | setState(() {
92 | _tabIndex = index;
93 | });
94 | },
95 | ),
96 | );
97 | }
98 |
99 | Image getTabIcon(int index) {
100 | if (index == _tabIndex) {
101 | return _tabSelectedImages[index];
102 | } else {
103 | return _tabImages[index];
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/lib/app/sq_color.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SQColor {
4 | static Color primary = Color(0xFF23B38E);
5 | static Color secondary = Color(0xFF51DEC6);
6 | static Color red = Color(0xFFFF2B45);
7 | static Color orange = Color(0xFFF67264);
8 | static Color white = Color(0xFFFFFFFF);
9 | static Color paper = Color(0xFFF5F5F5);
10 | static Color lightGray = Color(0xFFBBBBBB);
11 | static Color darkGray = Color(0xFF333333);
12 | static Color gray = Color(0xFF888888);
13 | static Color blue = Color(0xFF3688FF);
14 | static Color golden = Color(0xff8B7961);
15 | }
16 |
--------------------------------------------------------------------------------
/lib/app/user_manager.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:shuqi/utility/event_bus.dart';
4 | import 'package:shuqi/global.dart';
5 |
6 | const String EventUserLogin = 'EventUserLogin';
7 | const String EventUserLogout = 'EventUserLogout';
8 |
9 | class UserManager {
10 | static UserManager instance = UserManager();
11 |
12 | User? user;
13 | static User? get currentUser {
14 | return UserManager.instance.user;
15 | }
16 |
17 | logout() {
18 | this.user = null;
19 | preferences.remove('user');
20 | eventBus.emit(EventUserLogout);
21 | }
22 |
23 | login(Map userJson) {
24 | var user = User.fromJson(userJson);
25 | this.user = user;
26 | saveUser();
27 |
28 | eventBus.emit(EventUserLogin);
29 | }
30 |
31 | bool get isLogin {
32 | return user != null;
33 | }
34 |
35 | loadUserFromLocal() {
36 | String? userJson = preferences.getString('user');
37 | if (userJson != null) {
38 | user = User.fromJson(json.decode(userJson));
39 | }
40 | }
41 |
42 | void saveUser() async {
43 | var data = json.encode(user);
44 | preferences.setString('user', data);
45 | }
46 | }
47 |
48 | class User {
49 | late String token;
50 | late int id;
51 | late String nickname;
52 | late String avatarUrl;
53 | late bool isVip;
54 | late double wealth;
55 | late int coupon;
56 | late int monthlyTicket;
57 |
58 | User.fromJson(Map json) {
59 | token = json['token'];
60 | id = json['id'];
61 | nickname = json['nickname'];
62 | avatarUrl = json['avatar'];
63 | isVip = json['is_vip'] == 1;
64 | wealth = json['wealth'];
65 | coupon = json['coupon'];
66 | monthlyTicket = json['ticket'];
67 | }
68 |
69 | Map toJson() {
70 | return {
71 | 'token': token,
72 | 'id': id,
73 | 'nickname': nickname,
74 | 'avatar': avatarUrl,
75 | 'is_vip': isVip ? 1 : 0,
76 | 'wealth': wealth,
77 | 'coupon': coupon,
78 | 'ticket': monthlyTicket,
79 | };
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lib/bookshelf/bookshelf_cloud_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shuqi/public.dart';
3 |
4 | class BookshelfCloudWidget extends AnimatedWidget {
5 | final double width;
6 | BookshelfCloudWidget({required Animation animation, required this.width}) : super(listenable: animation);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | var width = Screen.width;
11 | final Animation animation = listenable as Animation;
12 | return Container(
13 | width: width,
14 | height: width * 0.73,
15 | child: Stack(
16 | alignment: AlignmentDirectional.bottomStart,
17 | children: [
18 | Positioned(
19 | bottom: -30,
20 | child: Image.asset(
21 | 'img/bookshelf_cloud_0.png',
22 | fit: BoxFit.cover,
23 | width: width,
24 | ),
25 | ),
26 | Positioned(
27 | bottom: animation.value * -5,
28 | child: Opacity(
29 | opacity: animation.value,
30 | child: Image.asset(
31 | 'img/bookshelf_cloud_1.png',
32 | fit: BoxFit.cover,
33 | width: width,
34 | ),
35 | ),
36 | ),
37 | Positioned(
38 | bottom: (1 - animation.value) * -10,
39 | child: Opacity(
40 | opacity: animation.value,
41 | child: Image.asset(
42 | 'img/bookshelf_cloud_2.png',
43 | fit: BoxFit.cover,
44 | width: width,
45 | ),
46 | ),
47 | ),
48 | Positioned(
49 | bottom: (animation.value - 0.5).abs() * -15,
50 | child: Opacity(
51 | opacity: (1.0 - animation.value),
52 | child: Image.asset(
53 | 'img/bookshelf_cloud_3.png',
54 | fit: BoxFit.cover,
55 | width: width,
56 | ),
57 | ),
58 | ),
59 | ],
60 | ),
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/bookshelf/bookshelf_header.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | import 'bookshelf_cloud_widget.dart';
6 |
7 | class BookshelfHeader extends StatefulWidget {
8 | final Novel novel;
9 |
10 | BookshelfHeader(this.novel);
11 |
12 | @override
13 | _BookshelfHeaderState createState() => _BookshelfHeaderState();
14 | }
15 |
16 | class _BookshelfHeaderState extends State with SingleTickerProviderStateMixin {
17 | late AnimationController controller;
18 | late Animation animation;
19 |
20 | @override
21 | initState() {
22 | super.initState();
23 | controller = AnimationController(duration: const Duration(milliseconds: 2000), vsync: this);
24 | animation = Tween(begin: 0.0, end: 1.0).animate(controller);
25 |
26 | animation.addStatusListener((status) {
27 | if (status == AnimationStatus.completed) {
28 | controller.reverse();
29 | } else if (status == AnimationStatus.dismissed) {
30 | controller.forward();
31 | }
32 | });
33 | controller.forward();
34 | }
35 |
36 | dispose() {
37 | controller.dispose();
38 | super.dispose();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | var width = Screen.width;
44 | var bgHeight = width / 0.9;
45 | var height = Screen.topSafeHeight + 250;
46 | return Container(
47 | width: width,
48 | height: height,
49 | child: Stack(
50 | children: [
51 | Positioned(
52 | top: height - bgHeight,
53 | child: Image.asset(
54 | 'img/bookshelf_bg.png',
55 | fit: BoxFit.cover,
56 | width: width,
57 | height: bgHeight,
58 | ),
59 | ),
60 | Positioned(
61 | bottom: 0,
62 | child: BookshelfCloudWidget(
63 | animation: animation,
64 | width: width,
65 | ),
66 | ),
67 | buildContent(context),
68 | ],
69 | ),
70 | );
71 | }
72 |
73 | Widget buildContent(BuildContext context) {
74 | Novel novel = this.widget.novel;
75 |
76 | var width = Screen.width;
77 | return Container(
78 | width: width,
79 | padding: EdgeInsets.fromLTRB(15, 54 + Screen.topSafeHeight, 10, 0),
80 | color: Colors.transparent,
81 | child: GestureDetector(
82 | onTap: () {
83 | AppNavigator.pushNovelDetail(context, novel);
84 | },
85 | child: Row(
86 | crossAxisAlignment: CrossAxisAlignment.start,
87 | children: [
88 | DecoratedBox(
89 | child: NovelCoverImage(novel.imgUrl, width: 120, height: 160),
90 | decoration: BoxDecoration(boxShadow: Styles.borderShadow),
91 | ),
92 | SizedBox(width: 20),
93 | Expanded(
94 | child: Column(
95 | crossAxisAlignment: CrossAxisAlignment.start,
96 | children: [
97 | SizedBox(height: 40),
98 | Text(novel.name, style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold)),
99 | SizedBox(height: 20),
100 | Row(
101 | children: [
102 | Text('读至0.2% 继续阅读 ', style: TextStyle(fontSize: 14, color: SQColor.paper)),
103 | Image.asset('img/bookshelf_continue_read.png'),
104 | ],
105 | ),
106 | ],
107 | ),
108 | )
109 | ],
110 | ),
111 | ),
112 | );
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/lib/bookshelf/bookshelf_item_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | class BookshelfItemView extends StatelessWidget {
6 | final Novel novel;
7 | BookshelfItemView(this.novel);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | var width = (Screen.width - 15 * 2 - 24 * 2) / 3;
12 | return GestureDetector(
13 | onTap: () {
14 | AppNavigator.pushNovelDetail(context, novel);
15 | },
16 | child: Container(
17 | width: width,
18 | child: Column(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: [
21 | DecoratedBox(
22 | child: NovelCoverImage(
23 | novel.imgUrl,
24 | width: width,
25 | height: width / 0.75,
26 | ),
27 | decoration: BoxDecoration(boxShadow: [BoxShadow(color: Color(0x22000000), blurRadius: 5)]),
28 | ),
29 | SizedBox(height: 10),
30 | Text(novel.name, style: TextStyle(fontSize: 14), maxLines: 1, overflow: TextOverflow.ellipsis),
31 | SizedBox(height: 25),
32 | ],
33 | ),
34 | ),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/bookshelf/bookshelf_scene.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | import 'package:shuqi/public.dart';
5 |
6 | import 'bookshelf_item_view.dart';
7 | import 'bookshelf_header.dart';
8 |
9 | class BookshelfPage extends StatefulWidget {
10 | @override
11 | State createState() => BookshelfState();
12 | }
13 |
14 | class BookshelfState extends State with RouteAware {
15 | List favoriteNovels = [];
16 | ScrollController scrollController = ScrollController();
17 | double navAlpha = 0;
18 |
19 | @override
20 | void initState() {
21 | super.initState();
22 | fetchData();
23 |
24 | scrollController.addListener(() {
25 | var offset = scrollController.offset;
26 | if (offset < 0) {
27 | if (navAlpha != 0) {
28 | setState(() {
29 | navAlpha = 0;
30 | });
31 | }
32 | } else if (offset < 50) {
33 | setState(() {
34 | navAlpha = 1 - (50 - offset) / 50;
35 | });
36 | } else if (navAlpha != 1) {
37 | setState(() {
38 | navAlpha = 1;
39 | });
40 | }
41 | });
42 | }
43 |
44 | Future fetchData() async {
45 | try {
46 | List favoriteNovels = [];
47 | List favoriteResponse = await Request.get(action: 'bookshelf');
48 | favoriteResponse.forEach((data) {
49 | favoriteNovels.add(Novel.fromJson(data));
50 | });
51 |
52 | setState(() {
53 | this.favoriteNovels = favoriteNovels;
54 | });
55 | } catch (e) {
56 | Toast.show(e.toString());
57 | }
58 | }
59 |
60 | Widget buildActions(Color iconColor) {
61 | return Row(children: [
62 | Container(
63 | height: kToolbarHeight,
64 | width: 44,
65 | child: Image.asset('img/actionbar_checkin.png', color: iconColor),
66 | ),
67 | Container(
68 | height: kToolbarHeight,
69 | width: 44,
70 | child: Image.asset('img/actionbar_search.png', color: iconColor),
71 | ),
72 | SizedBox(width: 15)
73 | ]);
74 | }
75 |
76 | Widget buildNavigationBar() {
77 | return Stack(
78 | children: [
79 | Positioned(
80 | right: 0,
81 | child: Container(
82 | margin: EdgeInsets.fromLTRB(5, Screen.topSafeHeight, 0, 0),
83 | child: buildActions(SQColor.white),
84 | ),
85 | ),
86 | Opacity(
87 | opacity: navAlpha,
88 | child: Container(
89 | padding: EdgeInsets.fromLTRB(5, Screen.topSafeHeight, 0, 0),
90 | height: Screen.navigationBarHeight,
91 | color: SQColor.white,
92 | child: Row(
93 | children: [
94 | SizedBox(width: 103),
95 | Expanded(
96 | child: Text(
97 | '书架',
98 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
99 | textAlign: TextAlign.center,
100 | ),
101 | ),
102 | buildActions(SQColor.darkGray),
103 | ],
104 | ),
105 | ),
106 | )
107 | ],
108 | );
109 | }
110 |
111 | Widget buildFavoriteView() {
112 | if (favoriteNovels.length <= 1) {
113 | return Container();
114 | }
115 |
116 | List children = [];
117 | var novels = favoriteNovels.sublist(1);
118 | novels.forEach((novel) {
119 | children.add(BookshelfItemView(novel));
120 | });
121 | var width = (Screen.width - 15 * 2 - 24 * 2) / 3;
122 | children.add(GestureDetector(
123 | onTap: () {
124 | eventBus.emit(EventToggleTabBarIndex, 1);
125 | },
126 | child: Container(
127 | color: SQColor.paper,
128 | width: width,
129 | height: width / 0.75,
130 | child: Image.asset('img/bookshelf_add.png'),
131 | ),
132 | ));
133 | return Container(
134 | padding: EdgeInsets.fromLTRB(15, 20, 15, 15),
135 | child: Wrap(
136 | spacing: 23,
137 | children: children,
138 | ),
139 | );
140 | }
141 |
142 | @override
143 | Widget build(BuildContext context) {
144 | return Scaffold(
145 | backgroundColor: SQColor.white,
146 | body: AnnotatedRegion(
147 | value: navAlpha > 0.5 ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light,
148 | child: Stack(children: [
149 | RefreshIndicator(
150 | onRefresh: fetchData,
151 | child: ListView(
152 | padding: EdgeInsets.only(top: 0),
153 | controller: scrollController,
154 | children: [
155 | favoriteNovels.length > 0 ? BookshelfHeader(favoriteNovels[0]) : Container(),
156 | buildFavoriteView(),
157 | ],
158 | ),
159 | ),
160 | buildNavigationBar(),
161 | ]),
162 | ),
163 | );
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/lib/global.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 |
3 | late SharedPreferences preferences;
4 |
--------------------------------------------------------------------------------
/lib/home/home_banner.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:carousel_slider/carousel_slider.dart';
3 |
4 | import 'package:shuqi/public.dart';
5 | import 'home_model.dart';
6 |
7 | class HomeBanner extends StatelessWidget {
8 | final List carouselInfos;
9 |
10 | HomeBanner(this.carouselInfos);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | if (carouselInfos.length == 0) {
15 | return SizedBox();
16 | }
17 |
18 | return Container(
19 | color: Colors.white,
20 | child: CarouselSlider(
21 | items: carouselInfos.map((info) {
22 | return Builder(
23 | builder: (BuildContext context) {
24 | return Container(
25 | width: Screen.width,
26 | margin: EdgeInsets.symmetric(horizontal: 5.0),
27 | child: Image.network(
28 | info.imageUrl ?? '',
29 | fit: BoxFit.cover,
30 | ),
31 | );
32 | },
33 | );
34 | }).toList(),
35 | options: CarouselOptions(
36 | aspectRatio: 2,
37 | autoPlay: true,
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/home/home_list_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | import 'home_model.dart';
6 | import 'home_banner.dart';
7 | import 'home_menu.dart';
8 | import 'novel_normal_card.dart';
9 | import 'novel_four_grid_view.dart';
10 | import 'novel_first_hybird_card.dart';
11 | import 'novel_second_hybird_card.dart';
12 |
13 | enum HomeListType {
14 | excellent,
15 | male,
16 | female,
17 | cartoon,
18 | }
19 |
20 | class HomeListView extends StatefulWidget {
21 | final HomeListType type;
22 |
23 | HomeListView(this.type);
24 |
25 | @override
26 | State createState() {
27 | return HomeListViewState();
28 | }
29 | }
30 |
31 | class HomeListViewState extends State with AutomaticKeepAliveClientMixin {
32 | List carouselInfos = [];
33 | int pageIndex = 1;
34 | List modules = [];
35 |
36 | @override
37 | void initState() {
38 | super.initState();
39 | fetchData();
40 | }
41 |
42 | @override
43 | bool get wantKeepAlive => true;
44 |
45 | Future fetchData() async {
46 | try {
47 | late var action;
48 | switch (this.widget.type) {
49 | case HomeListType.excellent:
50 | action = 'home_excellent';
51 | break;
52 | case HomeListType.female:
53 | action = 'home_female';
54 | break;
55 | case HomeListType.male:
56 | action = 'home_male';
57 | break;
58 | case HomeListType.cartoon:
59 | action = 'home_cartoon';
60 | break;
61 | default:
62 | break;
63 | }
64 | var responseJson = await Request.get(action: action);
65 | List moduleData = responseJson['module'];
66 | List modules = [];
67 | moduleData.forEach((data) {
68 | modules.add(HomeModule.fromJson(data));
69 | });
70 |
71 | setState(() {
72 | this.modules = modules;
73 | this.carouselInfos = carouselInfos;
74 | });
75 | } catch (e) {
76 | Toast.show(e.toString());
77 | }
78 | }
79 |
80 | Widget bookCardWithInfo(HomeModule module) {
81 | Widget? card;
82 | switch (module.style) {
83 | case 1:
84 | card = NovelFourGridView(module);
85 | break;
86 | case 2:
87 | card = NovelSecondHybirdCard(module);
88 | break;
89 | case 3:
90 | card = NovelFirstHybirdCard(module);
91 | break;
92 | case 4:
93 | card = NovelNormalCard(module);
94 | break;
95 | }
96 | return card ?? SizedBox();
97 | }
98 |
99 | Widget buildModule(BuildContext context, HomeModule module) {
100 | if (module.carousels != null) {
101 | return HomeBanner(module.carousels!);
102 | } else if (module.menus != null) {
103 | return HomeMenu(module.menus!);
104 | } else if (module.books != null) {
105 | return bookCardWithInfo(module);
106 | }
107 |
108 | return Container();
109 | }
110 |
111 | @override
112 | Widget build(BuildContext context) {
113 | super.build(context);
114 | return Container(
115 | child: RefreshIndicator(
116 | onRefresh: fetchData,
117 | child: ListView.builder(
118 | itemCount: modules.length,
119 | itemBuilder: (BuildContext context, int index) {
120 | return buildModule(context, modules[index]);
121 | },
122 | ),
123 | ),
124 | );
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/lib/home/home_menu.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | import 'home_model.dart';
6 |
7 | class HomeMenu extends StatelessWidget {
8 | final List infos;
9 |
10 | HomeMenu(this.infos);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | color: Colors.white,
16 | padding: EdgeInsets.symmetric(vertical: 10),
17 | child: Row(
18 | mainAxisAlignment: MainAxisAlignment.spaceAround,
19 | children: infos.map((info) => menuItem(info)).toList(),
20 | ),
21 | );
22 | }
23 |
24 | Widget menuItem(MenuInfo info) {
25 | return Column(
26 | children: [
27 | Image.asset(info.icon),
28 | SizedBox(height: 5),
29 | Text(info.title, style: TextStyle(fontSize: 12, color: SQColor.gray)),
30 | ],
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/home/home_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:shuqi/model/novel.dart';
2 |
3 | class HomeModule {
4 | late String id;
5 | late String name;
6 | late int style;
7 | late List content;
8 |
9 | List? carousels;
10 | List? menus;
11 | List? books;
12 |
13 | HomeModule.fromJson(Map data) {
14 | id = data['id'];
15 | name = data['m_s_name'];
16 | content = data['content'];
17 |
18 | if (name == '顶部banner') {
19 | carousels = [];
20 | content.forEach((data) {
21 | carousels!.add(CarouselInfo.fromJson(data));
22 | });
23 | }
24 |
25 | if (name == '顶部导航') {
26 | menus = [];
27 | content.forEach((data) {
28 | menus!.add(MenuInfo.fromJson(data));
29 | });
30 | }
31 |
32 | if (data['m_s_style'] != null) {
33 | style = data['m_s_style'];
34 | books = [];
35 | content.forEach((data) {
36 | books!.add(Novel.fromJson(data));
37 | });
38 | }
39 | }
40 | }
41 |
42 | class MenuInfo {
43 | late String title;
44 | late String icon;
45 |
46 | MenuInfo.fromJson(Map data) {
47 | title = data['toTitle'];
48 | icon = data['icon'];
49 | }
50 | }
51 |
52 | class CarouselInfo {
53 | String? imageUrl;
54 | late String link;
55 |
56 | CarouselInfo.fromJson(Map data) {
57 | imageUrl = data['image_url'];
58 | link = data['link_url'];
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/home/home_novel_cover_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | class HomeNovelCoverView extends StatelessWidget {
6 | final Novel novel;
7 | HomeNovelCoverView(this.novel);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | var width = (Screen.width - 15 * 2 - 15 * 3) / 4;
12 | return GestureDetector(
13 | onTap: () {
14 | AppNavigator.pushNovelDetail(context, novel);
15 | },
16 | child: Container(
17 | width: width,
18 | child: Column(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: [
21 | NovelCoverImage(novel.imgUrl, width: width, height: width / 0.75),
22 | SizedBox(height: 5),
23 | Text(
24 | novel.name,
25 | overflow: TextOverflow.ellipsis,
26 | style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
27 | maxLines: 1,
28 | ),
29 | SizedBox(height: 3),
30 | Text(
31 | novel.author,
32 | style: TextStyle(fontSize: 12, color: SQColor.gray),
33 | maxLines: 1,
34 | ),
35 | ],
36 | ),
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/home/home_scene.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | import 'package:shuqi/public.dart';
5 |
6 | import 'home_list_view.dart';
7 |
8 | class HomePage extends StatefulWidget {
9 | @override
10 | State createState() => HomePageState();
11 | }
12 |
13 | class HomePageState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return DefaultTabController(
17 | length: 4,
18 | child: Scaffold(
19 | appBar: AppBar(
20 | systemOverlayStyle: SystemUiOverlayStyle.dark,
21 | title: Container(
22 | padding: EdgeInsets.symmetric(horizontal: 15),
23 | child: TabBar(
24 | labelColor: SQColor.darkGray,
25 | labelStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
26 | unselectedLabelColor: SQColor.gray,
27 | indicatorColor: SQColor.secondary,
28 | indicatorSize: TabBarIndicatorSize.label,
29 | indicatorWeight: 3,
30 | indicatorPadding: EdgeInsets.fromLTRB(8, 0, 8, 5),
31 | tabs: [
32 | Tab(text: '精选'),
33 | Tab(text: '女生'),
34 | Tab(text: '男生'),
35 | Tab(text: '漫画'),
36 | ],
37 | ),
38 | ),
39 | backgroundColor: SQColor.white,
40 | elevation: 0,
41 | ),
42 | body: TabBarView(children: [
43 | HomeListView(HomeListType.excellent),
44 | HomeListView(HomeListType.female),
45 | HomeListView(HomeListType.male),
46 | HomeListView(HomeListType.cartoon),
47 | ]),
48 | ),
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/home/home_section_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class HomeSectionView extends StatelessWidget {
4 | final String title;
5 | HomeSectionView(this.title);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Container(
10 | color: Colors.white,
11 | padding: EdgeInsets.fromLTRB(15, 15, 0, 5),
12 | child: Row(
13 | children: [
14 | Image.asset('img/home_tip.png'),
15 | SizedBox(width: 10),
16 | Text(
17 | '$title',
18 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
19 | )
20 | ],
21 | ),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/home/novel_cell.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | class NovelCell extends StatelessWidget {
6 | final Novel novel;
7 |
8 | NovelCell(this.novel);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return GestureDetector(
13 | onTap: () {
14 | AppNavigator.pushNovelDetail(context, novel);
15 | },
16 | child: Container(
17 | padding: EdgeInsets.all(15),
18 | child: Row(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: [
21 | NovelCoverImage(novel.imgUrl, width: 70, height: 93),
22 | SizedBox(width: 15),
23 | Expanded(
24 | child: buildRight(),
25 | ),
26 | ],
27 | ),
28 | ),
29 | );
30 | }
31 |
32 | Widget buildRight() {
33 | return Column(
34 | crossAxisAlignment: CrossAxisAlignment.start,
35 | children: [
36 | Text(
37 | novel.name,
38 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
39 | ),
40 | SizedBox(height: 5),
41 | Text(
42 | novel.introduction,
43 | maxLines: 2,
44 | overflow: TextOverflow.ellipsis,
45 | style: TextStyle(
46 | fontSize: 14,
47 | color: SQColor.gray,
48 | ),
49 | ),
50 | SizedBox(height: 5),
51 | Row(
52 | children: [
53 | Text(
54 | novel.author,
55 | style: TextStyle(fontSize: 14, color: SQColor.gray),
56 | ),
57 | Expanded(child: Container()),
58 | buildTag(novel.status, novel.statusColor()),
59 | SizedBox(width: 5),
60 | buildTag(novel.type, SQColor.gray),
61 | ],
62 | )
63 | ],
64 | );
65 | }
66 |
67 | Widget buildTag(String title, Color color) {
68 | return Container(
69 | padding: EdgeInsets.fromLTRB(5, 2, 5, 3),
70 | decoration: BoxDecoration(
71 | border: Border.all(color: Color.fromARGB(99, color.red, color.green, color.blue), width: 0.5),
72 | borderRadius: BorderRadius.circular(3),
73 | ),
74 | child: Text(
75 | title,
76 | style: TextStyle(fontSize: 11, color: color),
77 | ),
78 | );
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/home/novel_first_hybird_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'novel_cell.dart';
4 | import 'novel_grid_item.dart';
5 | import 'home_section_view.dart';
6 | import 'home_model.dart';
7 |
8 | class NovelFirstHybirdCard extends StatelessWidget {
9 | final HomeModule cardInfo;
10 |
11 | NovelFirstHybirdCard(this.cardInfo);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | var novels = cardInfo.books;
16 | if (novels == null || novels.length < 3) {
17 | return Container();
18 | }
19 |
20 | List children = [];
21 | var bottomNovels = novels.sublist(1);
22 | bottomNovels.forEach((novel) {
23 | children.add(NovelGridItem(novel));
24 | });
25 |
26 | return Container(
27 | color: Colors.white,
28 | child: Column(
29 | children: [
30 | HomeSectionView(cardInfo.name),
31 | NovelCell(novels[0]),
32 | Container(
33 | padding: EdgeInsets.fromLTRB(15, 10, 15, 10),
34 | child: Wrap(spacing: 15, runSpacing: 15, children: children),
35 | ),
36 | Container(
37 | height: 10,
38 | color: Color(0xfff5f5f5),
39 | )
40 | ],
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/home/novel_four_grid_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'home_model.dart';
4 | import 'home_section_view.dart';
5 | import 'home_novel_cover_view.dart';
6 |
7 | class NovelFourGridView extends StatelessWidget {
8 | final HomeModule cardInfo;
9 |
10 | NovelFourGridView(this.cardInfo);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | var novels = cardInfo.books;
15 | if (novels == null || novels.length < 8) {
16 | return Container();
17 | }
18 | var children = novels.map((novel) => HomeNovelCoverView(novel)).toList();
19 | return Container(
20 | color: Colors.white,
21 | child: Column(
22 | crossAxisAlignment: CrossAxisAlignment.start,
23 | children: [
24 | HomeSectionView(cardInfo.name),
25 | Container(
26 | padding: EdgeInsets.fromLTRB(15, 10, 15, 10),
27 | child: Wrap(spacing: 15, runSpacing: 20, children: children),
28 | ),
29 | Container(
30 | height: 10,
31 | color: Color(0xfff5f5f5),
32 | )
33 | ],
34 | ),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/home/novel_grid_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | class NovelGridItem extends StatelessWidget {
6 | final Novel novel;
7 |
8 | NovelGridItem(this.novel);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | var width = (Screen.width - 15 * 2 - 15) / 2;
13 | return GestureDetector(
14 | onTap: () {
15 | AppNavigator.pushNovelDetail(context, this.novel);
16 | },
17 | child: Container(
18 | width: width,
19 | child: Row(
20 | children: [
21 | NovelCoverImage(novel.imgUrl, width: 50, height: 66),
22 | SizedBox(width: 10),
23 | Expanded(
24 | child: Column(
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | children: [
27 | Text(
28 | novel.name,
29 | maxLines: 2,
30 | style: TextStyle(fontSize: 16, height: 0.9, fontWeight: FontWeight.bold),
31 | ),
32 | Text(
33 | novel.recommendCountStr(),
34 | style: TextStyle(fontSize: 12, color: SQColor.gray),
35 | )
36 | ],
37 | ),
38 | )
39 | ],
40 | ),
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/home/novel_normal_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'home_model.dart';
4 | import 'novel_cell.dart';
5 | import 'home_section_view.dart';
6 |
7 | class NovelNormalCard extends StatelessWidget {
8 | final HomeModule cardInfo;
9 |
10 | NovelNormalCard(this.cardInfo);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | var novels = cardInfo.books;
15 | if (novels == null || novels.length < 3) {
16 | return SizedBox();
17 | }
18 |
19 | List children = [
20 | HomeSectionView(cardInfo.name),
21 | ];
22 | for (var i = 0; i < novels.length; i++) {
23 | var novel = novels[i];
24 | children.add(NovelCell(novel));
25 | children.add(Divider(height: 1));
26 | }
27 | children.add(Container(height: 10, color: Color(0xfff5f5f5)));
28 |
29 | return Container(
30 | color: Colors.white,
31 | child: Column(
32 | crossAxisAlignment: CrossAxisAlignment.start,
33 | children: children,
34 | ),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/home/novel_second_hybird_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'novel_grid_item.dart';
4 | import 'home_section_view.dart';
5 | import 'home_novel_cover_view.dart';
6 | import 'home_model.dart';
7 |
8 | class NovelSecondHybirdCard extends StatelessWidget {
9 | final HomeModule cardInfo;
10 |
11 | NovelSecondHybirdCard(this.cardInfo);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | var novels = cardInfo.books;
16 | if (novels == null || novels.length < 5) {
17 | return Container();
18 | }
19 |
20 | var topNovels = novels.sublist(0, 4);
21 | List children = [];
22 | topNovels.forEach((novel) {
23 | children.add(HomeNovelCoverView(novel));
24 | });
25 |
26 | var bottomNovels = novels.sublist(4);
27 | bottomNovels.forEach((novel) {
28 | children.add(NovelGridItem(novel));
29 | });
30 |
31 | return Container(
32 | color: Colors.white,
33 | child: Column(
34 | children: [
35 | HomeSectionView(cardInfo.name),
36 | Container(
37 | padding: EdgeInsets.fromLTRB(15, 10, 15, 10),
38 | child: Wrap(spacing: 15, runSpacing: 15, children: children),
39 | ),
40 | Container(
41 | height: 10,
42 | color: Color(0xfff5f5f5),
43 | )
44 | ],
45 | ),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:io';
3 | import 'package:flutter/services.dart';
4 |
5 | import 'package:shuqi/app/app_scene.dart';
6 |
7 | void main() {
8 | runApp(AppPage());
9 |
10 | if (Platform.isAndroid) {
11 | SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
12 | SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/me/login_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 |
4 | import 'package:shuqi/public.dart';
5 |
6 | class LoginPage extends StatefulWidget {
7 | @override
8 | State createState() => LoginPageState();
9 | }
10 |
11 | class LoginPageState extends State {
12 | TextEditingController phoneEditer = TextEditingController();
13 | TextEditingController codeEditer = TextEditingController();
14 | int coldDownSeconds = 0;
15 | Timer? timer;
16 |
17 | Future fetchSmsCode() async {
18 | if (phoneEditer.text.length == 0) {
19 | Toast.show('请输入手机号');
20 | return;
21 | }
22 | try {
23 | setState(() {
24 | coldDownSeconds = 60;
25 | });
26 | coldDown();
27 | } catch (e) {
28 | Toast.show(e.toString());
29 | }
30 | }
31 |
32 | login() async {
33 | var phone = phoneEditer.text;
34 | var code = codeEditer.text;
35 |
36 | try {
37 | var response = await Request.post(action: 'login', params: {
38 | 'phone': phone,
39 | 'code': code,
40 | });
41 | UserManager.instance.login(response);
42 |
43 | Navigator.pop(context);
44 | } catch (e) {
45 | Toast.show(e.toString());
46 | }
47 | }
48 |
49 | @override
50 | void dispose() {
51 | if (timer != null) {
52 | timer!.cancel();
53 | }
54 | super.dispose();
55 | }
56 |
57 | coldDown() {
58 | timer = Timer(Duration(seconds: 1), () {
59 | setState(() {
60 | --coldDownSeconds;
61 | });
62 |
63 | coldDown();
64 | });
65 | }
66 |
67 | Widget buildPhone() {
68 | return Container(
69 | padding: EdgeInsets.symmetric(horizontal: 8),
70 | decoration: BoxDecoration(
71 | color: SQColor.paper,
72 | borderRadius: BorderRadius.circular(5),
73 | ),
74 | child: TextField(
75 | controller: phoneEditer,
76 | keyboardType: TextInputType.phone,
77 | style: TextStyle(fontSize: 14, color: SQColor.darkGray),
78 | decoration: InputDecoration(
79 | hintText: '请输入手机号',
80 | hintStyle: TextStyle(color: SQColor.gray),
81 | border: InputBorder.none,
82 | ),
83 | ),
84 | );
85 | }
86 |
87 | Widget buildCode() {
88 | return Container(
89 | padding: EdgeInsets.only(left: 8),
90 | decoration: BoxDecoration(
91 | color: SQColor.paper,
92 | borderRadius: BorderRadius.circular(5),
93 | ),
94 | child: Row(
95 | children: [
96 | Flexible(
97 | child: TextField(
98 | controller: codeEditer,
99 | keyboardType: TextInputType.phone,
100 | style: TextStyle(fontSize: 14, color: SQColor.darkGray),
101 | decoration: InputDecoration(
102 | hintText: '请输入短信验证码',
103 | hintStyle: TextStyle(color: SQColor.gray),
104 | border: InputBorder.none,
105 | ),
106 | ),
107 | ),
108 | Container(color: Color(0xffdae3f2), width: 1, height: 40),
109 | Theme(
110 | data: ThemeData(primaryColor: SQColor.primary),
111 | child: CodeButton(
112 | onPressed: fetchSmsCode,
113 | coldDownSeconds: coldDownSeconds,
114 | ),
115 | ),
116 | ],
117 | ),
118 | );
119 | }
120 |
121 | Widget buildBody() {
122 | return Column(
123 | children: [
124 | SizedBox(height: 20),
125 | Container(
126 | margin: EdgeInsets.symmetric(horizontal: 15),
127 | child: Column(
128 | crossAxisAlignment: CrossAxisAlignment.stretch,
129 | children: [
130 | buildPhone(),
131 | SizedBox(height: 10),
132 | buildCode(),
133 | SizedBox(height: 10),
134 | Container(
135 | decoration: BoxDecoration(
136 | borderRadius: BorderRadius.circular(5),
137 | color: SQColor.primary,
138 | ),
139 | height: 40,
140 | child: TextButton(
141 | onPressed: login,
142 | child: Text(
143 | '登录',
144 | style: TextStyle(fontSize: 16, color: Color(0xffffffff)),
145 | ),
146 | ),
147 | ),
148 | ],
149 | ),
150 | )
151 | ],
152 | );
153 | }
154 |
155 | @override
156 | Widget build(BuildContext context) {
157 | return Scaffold(
158 | appBar: AppBar(title: Text('登录'), elevation: 0),
159 | backgroundColor: Colors.white,
160 | body: buildBody(),
161 | );
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/lib/me/me_cell.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:shuqi/public.dart';
4 |
5 | class MeCell extends StatelessWidget {
6 | final VoidCallback? onPressed;
7 | final String iconName;
8 | final String title;
9 |
10 | MeCell({required this.title, required this.iconName, this.onPressed});
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return DefaultCell(
15 | title: title,
16 | leftWidget: Image.asset(iconName),
17 | isSeparatorVisible: true,
18 | isArrowVisible: true,
19 | onPressed: onPressed,
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/me/me_header.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:cached_network_image/cached_network_image.dart';
3 |
4 | import 'package:shuqi/public.dart';
5 |
6 | class MeHeader extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | var user = UserManager.currentUser;
10 |
11 | return GestureDetector(
12 | onTap: () {
13 | if (UserManager.instance.isLogin) {
14 | AppNavigator.pushWeb(context, 'https://github.com/huanxsd/flutter_shuqi', 'Github');
15 | } else {
16 | AppNavigator.pushLogin(context);
17 | }
18 | },
19 | child: Container(
20 | color: SQColor.white,
21 | padding: EdgeInsets.fromLTRB(20, 30, 15, 15),
22 | child: Row(
23 | children: [
24 | CircleAvatar(
25 | radius: 40,
26 | backgroundImage: (user?.avatarUrl != null ? CachedNetworkImageProvider(user!.avatarUrl) : AssetImage('img/placeholder_avatar.png')) as ImageProvider