├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-playstore.png
│ │ ├── kotlin
│ │ │ └── cc
│ │ │ │ └── zsakvo
│ │ │ │ └── wenku8x
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ ├── values
│ │ │ ├── ic_launcher_background.xml
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ └── network_security_config.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── image
│ └── akari.jpg
└── svg
│ ├── ic_bottom_bar_font.svg
│ ├── ic_bottom_bar_menu.svg
│ ├── ic_bottom_bar_palette.svg
│ ├── ic_bottom_bar_setting.svg
│ ├── ic_btn_download.svg
│ ├── ic_btn_like.svg
│ ├── ic_btn_like_line.svg
│ ├── ic_btn_read.svg
│ ├── ic_btn_share.svg
│ ├── ic_pannel_calendar.svg
│ ├── ic_pannel_delete.svg
│ ├── ic_pannel_drive.svg
│ ├── ic_pannel_edit_circle.svg
│ ├── ic_pannel_medal.svg
│ ├── ic_pannel_nft.svg
│ ├── ic_pannel_pen.svg
│ ├── ic_pannel_seeding.svg
│ ├── ic_pannel_tent.svg
│ ├── ic_pannel_thumb.svg
│ ├── ic_pannel_vip.svg
│ ├── ic_search_bar_back.svg
│ ├── ic_topbar_add.svg
│ ├── ic_topbar_person_search.svg
│ ├── ic_topbar_search.svg
│ ├── il_page_error.svg
│ ├── il_page_login.svg
│ └── il_page_palette.svg
├── build.yaml
├── images
├── Screenshot_1696606553.png
├── Screenshot_1696606671.png
├── Screenshot_1696606691.png
├── Screenshot_1696606722.png
├── Screenshot_1696606775.png
├── Screenshot_1696606791.png
├── Screenshot_1696606827.png
├── Screenshot_1696606886.png
├── Screenshot_1696606932.png
├── Screenshot_1696606959.png
├── Screenshot_1696607250.png
└── Screenshot_1696607321.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
└── RunnerTests
│ └── RunnerTests.swift
├── lib
├── extension
│ ├── bool.dart
│ ├── int.dart
│ └── string.dart
├── hooks
│ └── brightness.dart
├── http
│ ├── ajax.dart
│ └── api.dart
├── main.dart
├── main.freezed.dart
├── providers
│ ├── download_provider.dart
│ └── download_provider.freezed.dart
├── router.dart
├── screen
│ ├── detail
│ │ ├── detail_provider.dart
│ │ └── detail_screen.dart
│ ├── error
│ │ └── error_screen.dart
│ ├── home
│ │ ├── add_modal.dart
│ │ ├── app_bar.dart
│ │ ├── book_item.dart
│ │ ├── detail_modal.dart
│ │ ├── home_provider.dart
│ │ ├── home_provider.freezed.dart
│ │ ├── home_provider.g.dart
│ │ └── home_screen.dart
│ ├── login
│ │ └── login_screen.dart
│ ├── palette
│ │ ├── palette_provider.dart
│ │ ├── palette_screen.dart
│ │ ├── selectable_palette.dart
│ │ └── svg.dart
│ ├── profile
│ │ ├── profile_provider.dart
│ │ ├── profile_provider.freezed.dart
│ │ ├── profile_screen.dart
│ │ ├── switch_card.dart
│ │ └── tap_card.dart
│ ├── rank
│ │ ├── book_item.dart
│ │ ├── rank_provider.dart
│ │ ├── rank_provider.freezed.dart
│ │ ├── rank_screen.dart
│ │ └── tab_bar.dart
│ ├── reader
│ │ ├── custom_scroll.dart
│ │ ├── menu_bars
│ │ │ ├── menu_bottom.dart
│ │ │ ├── menu_catalog.dart
│ │ │ ├── menu_config.dart
│ │ │ ├── menu_text.dart
│ │ │ ├── menu_theme.dart
│ │ │ ├── menu_top.dart
│ │ │ ├── progress_bar.dart
│ │ │ ├── progress_bar_provider.dart
│ │ │ └── progress_bar_provider.freezed.dart
│ │ ├── reader_provider.dart
│ │ ├── reader_provider.freezed.dart
│ │ ├── reader_provider.g.dart
│ │ ├── reader_screen.dart
│ │ ├── scroll_reader.dart
│ │ └── themes
│ │ │ ├── cherry.dart
│ │ │ ├── glacier.dart
│ │ │ ├── mulberry.dart
│ │ │ ├── spring.dart
│ │ │ ├── theme.dart
│ │ │ └── walnut.dart
│ └── search
│ │ ├── app_bar.dart
│ │ ├── book_item.dart
│ │ ├── search_provider.dart
│ │ ├── search_provider.freezed.dart
│ │ └── search_screen.dart
├── service
│ ├── navigation.dart
│ └── observer.dart
├── theme
│ └── extend.dart
└── utils
│ ├── flash.dart
│ ├── log.dart
│ ├── palette.dart
│ ├── render.dart
│ ├── render_copy.dart
│ ├── splitter.dart
│ ├── util.dart
│ └── widget.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ ├── Base.lproj
│ │ └── MainMenu.xib
│ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
└── RunnerTests
│ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── index.html
└── manifest.json
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.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: "12fccda598477eddd19f93040a1dba24f915b9be"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
17 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
18 | - platform: android
19 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
20 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
21 | - platform: ios
22 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
23 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
24 | - platform: linux
25 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
26 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
27 | - platform: macos
28 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
29 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
30 | - platform: web
31 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
32 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
33 | - platform: windows
34 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
35 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "wenku8x",
9 | "request": "launch",
10 | "type": "dart"
11 | },
12 | {
13 | "name": "wenku8x (profile mode)",
14 | "request": "launch",
15 | "type": "dart",
16 | "flutterMode": "profile"
17 | },
18 | {
19 | "name": "wenku8x (release mode)",
20 | "request": "launch",
21 | "type": "dart",
22 | "flutterMode": "release"
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wenku8x
2 |
3 | 基于 flutter 制作的第三方 `轻小说文库` 客户端.
4 |
5 | ## 功能实现
6 |
7 | - [x] 账号登录(暂时仅支持用户名登入)
8 | - [x] 书架获取
9 | - [x] 排行榜
10 | - [x] 搜索书籍和作者
11 | - [x] 书籍详情
12 | - [x] 图书阅读
13 | - [x] 阅读主题
14 | - [x] 阅读字体
15 | - [x] 目录相关
16 | - [-] 阅读设置(未完善)
17 | - [x] 用户签到
18 | - [x] 书籍缓存
19 | - [x] 颜色跟随系统(低版本系统待适配)
20 | - [x] Material You 配色(低版本系统待适配)
21 | - [x] 主题色选取
22 |
23 | ## 截图
24 |
25 |
26 |

27 |

28 |

29 |

30 |

31 |

32 |

33 |

34 |

35 |

36 |

37 |

38 |
39 |
40 | ## 运行与编译
41 |
42 | > 当前平台信息:Channel stable, 3.13.6, on macOS 13.3.1
43 |
44 | ```shell
45 | flutter pub get
46 | flutter run // 运行
47 | flutter build apk --release --target-platform=android-arm64 // 编译
48 | ```
49 |
50 | ### 平台支持情况
51 |
52 | [x] Android13 —— 主要运行
53 |
54 | [x] iPadOS17 —— 简单测试,大致可运行
55 |
56 | [x] macOS13+ —— 简单测试,可运行
57 |
58 | [ ] Linux —— 未测试,理论可运行
59 |
60 | [ ] Windows —— 未测试,理论可运行
61 |
62 | ## 声明
63 |
64 | - 此项目是个人为了兴趣而开发, 仅供学习交流使用, 无任何商业用途.
65 | - 资源版权仍归原网站或其作者所有.
66 | - 所用 API 皆从官方网站收集, 不含任何非法及破解内容.
67 |
68 | ## 感谢
69 |
70 | - [light-novel-library_Wenku8_Android](https://github.com/MewX/light-novel-library_Wenku8_Android): 轻小说文库既有的公益客户端
71 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | analyzer:
13 | errors:
14 | invalid_annotation_target: ignore
15 | non_constant_identifier_names: ignore
16 |
17 | linter:
18 | # The lint rules applied to this project can be customized in the
19 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
20 | # included above or to enable additional rules. A list of all available lints
21 | # and their documentation is published at https://dart.dev/lints.
22 | #
23 | # Instead of disabling a lint rule for the entire project in the
24 | # section below, it can also be suppressed for a single line of code
25 | # or a specific dart file by using the `// ignore: name_of_lint` and
26 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
27 | # producing the lint.
28 | rules:
29 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
30 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
31 | # Additional information about this file can be found at
32 | # https://dart.dev/guides/language/analysis-options
33 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "cc.zsakvo.wenku8x"
27 | compileSdkVersion flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "cc.zsakvo.wenku8x"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {}
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/cc/zsakvo/wenku8x/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package cc.zsakvo.wenku8x
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-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #A6D9F4
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | wenku8.com
5 | 10.0.2.2
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | plugins {
14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15 | }
16 | }
17 |
18 | include ":app"
19 |
20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
21 |
--------------------------------------------------------------------------------
/assets/image/akari.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/assets/image/akari.jpg
--------------------------------------------------------------------------------
/assets/svg/ic_bottom_bar_font.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_bottom_bar_menu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_bottom_bar_palette.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_bottom_bar_setting.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_btn_download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_btn_like.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_btn_like_line.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_btn_read.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_btn_share.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_calendar.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_delete.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_drive.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_edit_circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_medal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_nft.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_pen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_seeding.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_tent.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_thumb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_pannel_vip.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_search_bar_back.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_topbar_add.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_topbar_person_search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svg/ic_topbar_search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/build.yaml:
--------------------------------------------------------------------------------
1 | global_options:
2 | freezed:freezed:
3 | runs_before:
4 | - isar_generator:isar_generator
5 |
--------------------------------------------------------------------------------
/images/Screenshot_1696606553.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606553.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606671.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606671.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606691.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606691.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606722.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606722.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606775.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606775.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606791.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606791.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606827.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606827.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606886.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606886.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606932.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606932.png
--------------------------------------------------------------------------------
/images/Screenshot_1696606959.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696606959.png
--------------------------------------------------------------------------------
/images/Screenshot_1696607250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696607250.png
--------------------------------------------------------------------------------
/images/Screenshot_1696607321.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/images/Screenshot_1696607321.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 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 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - FMDB (2.7.5):
4 | - FMDB/standard (= 2.7.5)
5 | - FMDB/standard (2.7.5)
6 | - isar_flutter_libs (1.0.0):
7 | - Flutter
8 | - path_provider_foundation (0.0.1):
9 | - Flutter
10 | - FlutterMacOS
11 | - shared_preferences_foundation (0.0.1):
12 | - Flutter
13 | - FlutterMacOS
14 | - sqflite (0.0.3):
15 | - Flutter
16 | - FMDB (>= 2.7.5)
17 | - url_launcher_ios (0.0.1):
18 | - Flutter
19 |
20 | DEPENDENCIES:
21 | - Flutter (from `Flutter`)
22 | - isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`)
23 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
24 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
25 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
26 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
27 |
28 | SPEC REPOS:
29 | trunk:
30 | - FMDB
31 |
32 | EXTERNAL SOURCES:
33 | Flutter:
34 | :path: Flutter
35 | isar_flutter_libs:
36 | :path: ".symlinks/plugins/isar_flutter_libs/ios"
37 | path_provider_foundation:
38 | :path: ".symlinks/plugins/path_provider_foundation/darwin"
39 | shared_preferences_foundation:
40 | :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
41 | sqflite:
42 | :path: ".symlinks/plugins/sqflite/ios"
43 | url_launcher_ios:
44 | :path: ".symlinks/plugins/url_launcher_ios/ios"
45 |
46 | SPEC CHECKSUMS:
47 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
48 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
49 | isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
50 | path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
51 | shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
52 | sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
53 | url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
54 |
55 | PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
56 |
57 | COCOAPODS: 1.11.3
58 |
--------------------------------------------------------------------------------
/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 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/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 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zsakvo/wenku8x/57c6312fb2ec619c399be1360d5d16ccdd2cd23c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Wenku8x
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | wenku8x
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UIApplicationSupportsIndirectInputEvents
30 |
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIMainStoryboardFile
34 | Main
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/extension/bool.dart:
--------------------------------------------------------------------------------
1 | extension BoolExtension on bool {
2 | int toInt() => this ? 1 : 0;
3 | }
4 |
--------------------------------------------------------------------------------
/lib/extension/int.dart:
--------------------------------------------------------------------------------
1 | extension IntExtension on int {
2 | bool toBool() => this == 1;
3 |
4 | int autoToDarkTone(bool isDarkTheme) {
5 | if (!isDarkTheme) return this;
6 | switch (this) {
7 | case 10:
8 | return 99;
9 | case 20:
10 | return 95;
11 | case 25:
12 | return 90;
13 | case 30:
14 | return 90;
15 | case 40:
16 | return 80;
17 | case 50:
18 | return 60;
19 | case 60:
20 | return 50;
21 | case 70:
22 | return 40;
23 | case 80:
24 | return 40;
25 | case 90:
26 | return 30;
27 | case 95:
28 | return 20;
29 | case 98:
30 | return 10;
31 | case 99:
32 | return 10;
33 | case 100:
34 | return 20;
35 | default:
36 | return this;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/extension/string.dart:
--------------------------------------------------------------------------------
1 | extension StringExtension on String {
2 | String hexToJsColor() {
3 | final prefix = substring(0, 2);
4 | return "#${substring(2, 8)}$prefix";
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/lib/hooks/brightness.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | void useBrightnessChanged(BuildContext context,
7 | {required bool autoDarkMode, required bool isDarkMode}) {
8 | late final Brightness statusbarColor;
9 | bool isIOS = Platform.isIOS;
10 | if (autoDarkMode) {
11 | statusbarColor = Theme.of(context).brightness ==
12 | (isIOS ? Brightness.light : Brightness.dark)
13 | ? Brightness.light
14 | : Brightness.dark;
15 | } else {
16 | final needDark = isIOS ? !isDarkMode : isDarkMode;
17 | statusbarColor = needDark ? Brightness.light : Brightness.dark;
18 | }
19 | // 设置顶栏字体颜色
20 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
21 | statusBarBrightness: statusbarColor,
22 | statusBarIconBrightness: statusbarColor,
23 | ));
24 | }
25 |
--------------------------------------------------------------------------------
/lib/http/ajax.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: constant_identifier_names, non_constant_identifier_names
2 |
3 | import 'dart:io';
4 |
5 | import 'package:cookie_jar/cookie_jar.dart';
6 | import 'package:dio/dio.dart';
7 | import 'package:dio_cookie_manager/dio_cookie_manager.dart';
8 | // import 'package:go_router/go_router.dart';
9 | import 'package:path_provider/path_provider.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 | // import 'package:wenku8x/service/navigation.dart';
12 | import 'package:wenku8x/utils/flash.dart';
13 | import 'dart:convert' as convert;
14 |
15 | import 'package:xml/xml.dart';
16 |
17 | import '../utils/log.dart';
18 | import 'api.dart';
19 |
20 | class Ajax {
21 | static String BASEURL = "http://app.wenku8.com/android.php";
22 | static String UA =
23 | "Dalvik/2.1.0 (Linux; U; Android 11; IN2010 Build/RP1A.201005.001)";
24 | static const String _APPVER = "1.13";
25 |
26 | ///超时时间
27 | static const int CONNECT_TIMEOUT = 30000;
28 | static const int RECEIVE_TIMEOUT = 30000;
29 |
30 | static late Dio _client;
31 |
32 | static late final SharedPreferences sp;
33 |
34 | static init() async {
35 | sp = await SharedPreferences.getInstance();
36 | Directory appDocDir = await getApplicationDocumentsDirectory();
37 | final cookieJar = PersistCookieJar(storage: FileStorage(appDocDir.path));
38 | _client = Dio(BaseOptions(
39 | baseUrl: BASEURL,
40 | connectTimeout: const Duration(milliseconds: CONNECT_TIMEOUT),
41 | receiveTimeout: const Duration(milliseconds: RECEIVE_TIMEOUT),
42 | contentType: Headers.formUrlEncodedContentType,
43 | headers: {
44 | "User-Agent": UA,
45 | }))
46 | ..interceptors.add(CookieManager(cookieJar));
47 | }
48 |
49 | static String _encrypt(String param) {
50 | return convert.base64Encode(convert.utf8.encode(param));
51 | }
52 |
53 | static Future post(String param,
54 | {bool isXml = true, download = false, savePath = ""}) async {
55 | // 判断是否是登陆请求
56 | bool isLogin = param.contains("action=login");
57 | FormData formData = FormData.fromMap({
58 | "appver": _APPVER,
59 | "request": _encrypt(param),
60 | "timetoken": DateTime.now().millisecondsSinceEpoch
61 | });
62 | Log.d({
63 | "appver": _APPVER,
64 | "request": param,
65 | "timetoken": DateTime.now().millisecondsSinceEpoch,
66 | "实际参数": _encrypt(param)
67 | }, "请求参数");
68 | try {
69 | var res = download
70 | ? await _client.download("", savePath,
71 | data: formData, options: Options(method: "POST"))
72 | : (await _client.post("", data: formData));
73 | if (isXml) {
74 | try {
75 | return XmlDocument.parse(res.data.toString());
76 | } catch (err) {
77 | Log.e("请求失败,结果为:${res.data}");
78 | if (res.data == "4") {
79 | final username = sp.getString("username") ?? "";
80 | final password = sp.getString("password") ?? "";
81 | if (username.isNotEmpty && password.isNotEmpty) {
82 | var res = await API.login(username, password);
83 | Log.d(res, "relogin");
84 | if (res) {
85 | post(param, isXml: isXml);
86 | }
87 | }
88 | // showErrorToast(NavigationService.navigatorKey.currentContext, "鉴权信息失效,请重新登陆账户");
89 | }
90 | return null;
91 | }
92 | } else {
93 | if (isLogin) {
94 | return res.data.toString() == "1";
95 | } else {
96 | return res.data.toString();
97 | }
98 | }
99 | } catch (err) {
100 | Show.error(err.toString());
101 | // GoRouter.of(NavigationService.navigatorKey.currentContext!)
102 | // .go("/error/$err");
103 | rethrow;
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/lib/router.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:cookie_jar/cookie_jar.dart';
4 | import 'package:go_router/go_router.dart';
5 | import 'package:path_provider/path_provider.dart';
6 | import 'package:wenku8x/screen/detail/detail_screen.dart';
7 | import 'package:wenku8x/screen/error/error_screen.dart';
8 | import 'package:wenku8x/screen/home/home_provider.dart';
9 | import 'package:wenku8x/screen/palette/palette_screen.dart';
10 | import 'package:wenku8x/screen/profile/profile_screen.dart';
11 | import 'package:wenku8x/screen/rank/rank_screen.dart';
12 | import 'package:wenku8x/screen/reader/reader_screen.dart';
13 | import 'package:wenku8x/screen/search/search_screen.dart';
14 | import 'package:wenku8x/service/navigation.dart';
15 |
16 | import 'http/ajax.dart';
17 | import 'screen/home/home_screen.dart';
18 | import 'screen/login/login_screen.dart';
19 |
20 | final router = GoRouter(
21 | navigatorKey: NavigationService.navigatorKey,
22 | routes: [
23 | GoRoute(
24 | path: '/',
25 | builder: (context, state) => const HomeScreen(),
26 | redirect: (context, state) async {
27 | Directory appDocDir = await getApplicationDocumentsDirectory();
28 | final cookieJar =
29 | PersistCookieJar(storage: FileStorage(appDocDir.path));
30 | final cookies = await cookieJar.loadForRequest(Uri.parse(Ajax.BASEURL));
31 | if (cookies.isNotEmpty) {
32 | return "/";
33 | } else {
34 | return "/login";
35 | }
36 | },
37 | ),
38 | GoRoute(
39 | path: '/login',
40 | builder: (context, state) => const LoginScreen(),
41 | ),
42 | GoRoute(
43 | path: '/reader/:name/:aid/:cIndex',
44 | builder: (context, state) {
45 | final name = state.pathParameters["name"] as String;
46 | final aid = state.pathParameters["aid"] as String;
47 | final cIndex = int.parse(state.pathParameters["cIndex"] as String);
48 | return ReaderScreen(name: name, aid: aid, cIndex: cIndex);
49 | },
50 | ),
51 | GoRoute(
52 | path: '/search',
53 | builder: (context, state) {
54 | final searchKey = state.extra as String?;
55 | return SearchScreen(searchKey: searchKey);
56 | },
57 | ),
58 | GoRoute(
59 | path: '/detail',
60 | builder: (context, state) {
61 | final BookItem bookItem = state.extra as BookItem;
62 | return DetailScreen(bookItem);
63 | }),
64 | GoRoute(
65 | path: '/profile',
66 | builder: (context, state) {
67 | return const ProfileScreen();
68 | }),
69 | GoRoute(
70 | path: '/palette',
71 | builder: (context, state) {
72 | return const PaletteScreen();
73 | }),
74 | GoRoute(
75 | path: '/rank/:type/:title',
76 | builder: (context, state) {
77 | final type = state.pathParameters["type"] as String;
78 | return RankScreen(type);
79 | }),
80 | GoRoute(
81 | path: '/error/:err',
82 | builder: (context, state) {
83 | final err = state.pathParameters["err"] as String;
84 | return ErrorScreen(err: err);
85 | },
86 | ),
87 | ],
88 | );
89 |
--------------------------------------------------------------------------------
/lib/screen/detail/detail_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:hooks_riverpod/hooks_riverpod.dart';
2 | import 'package:wenku8x/http/api.dart';
3 | import 'package:wenku8x/screen/home/home_provider.dart';
4 | import 'package:wenku8x/screen/reader/reader_provider.dart';
5 | import 'package:wenku8x/utils/util.dart';
6 | import 'package:xml/xml.dart';
7 |
8 | class DetailNotifier extends AutoDisposeFamilyNotifier {
9 | @override
10 | build(arg) {
11 | Future.delayed(const Duration(milliseconds: 300)).then((_) async {
12 | String intro = await _getIntro(arg.aid);
13 | List catalog = await _getCatalog(arg.aid);
14 | BookItem bookItem = await _getMeta(bookItem: arg);
15 | state = bookItem.copyWith(intro: intro, catalog: catalog);
16 | });
17 | return arg;
18 | }
19 |
20 | _getIntro(aid) async {
21 | return await API.getNovelFullIntro(aid);
22 | }
23 |
24 | _getMeta({required BookItem bookItem}) async {
25 | final value = await API.getNovelFullMeta(bookItem.aid);
26 | if (value != null) {
27 | var eles = value.findAllElements("data").toList();
28 | final aid = eles[0].getAttribute("aid")!;
29 | return BookItem(
30 | aid: aid,
31 | name: eles[0].innerText,
32 | cover: Util.getCover(aid),
33 | author: eles[1].getAttribute("value"),
34 | status: eles[7].getAttribute("value"),
35 | lastUpdate: eles[9].getAttribute("value"),
36 | lastChapterId: eles[11].getAttribute("cid"),
37 | lastChapter: eles[11].innerText);
38 | } else {
39 | return bookItem;
40 | }
41 | }
42 |
43 | Future> _getCatalog(aid) async {
44 | return await API.getNovelIndex(aid);
45 | }
46 | }
47 |
48 | final detailProvider = NotifierProvider.autoDispose
49 | .family(DetailNotifier.new);
50 |
--------------------------------------------------------------------------------
/lib/screen/error/error_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_svg/svg.dart';
3 | import 'package:go_router/go_router.dart';
4 | import 'package:hooks_riverpod/hooks_riverpod.dart';
5 |
6 | class ErrorScreen extends StatefulHookConsumerWidget {
7 | const ErrorScreen({required this.err, super.key});
8 | final String err;
9 |
10 | @override
11 | ConsumerState createState() => _ErrorScreenState();
12 | }
13 |
14 | class _ErrorScreenState extends ConsumerState {
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | body: SafeArea(
19 | child: Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | SvgPicture.asset(
23 | "assets/svg/il_page_error.svg",
24 | width: MediaQuery.of(context).size.width,
25 | ),
26 | const Padding(
27 | padding: EdgeInsets.symmetric(horizontal: 20, vertical: 12),
28 | child: Text(
29 | "出错了",
30 | style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16),
31 | ),
32 | ),
33 | Padding(
34 | padding: const EdgeInsets.symmetric(horizontal: 20),
35 | child: Text(
36 | widget.err,
37 | style: TextStyle(
38 | color: Theme.of(context).colorScheme.secondary, fontSize: 14),
39 | ),
40 | )
41 | ],
42 | )),
43 | floatingActionButton: FloatingActionButton.extended(
44 | onPressed: () {
45 | GoRouter.of(context).go("/");
46 | },
47 | icon: const Icon(Icons.arrow_back),
48 | label: const Text("返回首页")),
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/screen/home/book_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:hooks_riverpod/hooks_riverpod.dart';
4 | import 'package:wenku8x/screen/home/home_provider.dart';
5 | import 'package:wenku8x/service/navigation.dart';
6 |
7 | class BookItemComp extends StatefulHookConsumerWidget {
8 | const BookItemComp(
9 | this.bookItem, {
10 | super.key,
11 | this.onItemTap,
12 | this.onItemLongTap,
13 | });
14 |
15 | final BookItem bookItem;
16 |
17 | final Function(BookItem bookItem)? onItemTap;
18 | final Function(BookItem bookItem)? onItemLongTap;
19 |
20 | @override
21 | ConsumerState createState() => _BookItemCompState();
22 | }
23 |
24 | class _BookItemCompState extends ConsumerState
25 | with AutomaticKeepAliveClientMixin {
26 | @override
27 | Widget build(BuildContext context) {
28 | super.build(context);
29 | final colorScheme = getColorScheme(context);
30 | return InkWell(
31 | // 隐藏点击效果
32 | splashColor: Colors.transparent,
33 | highlightColor: Colors.transparent,
34 | hoverColor: Colors.transparent,
35 | onTap: widget.onItemTap != null
36 | ? () => widget.onItemTap!(widget.bookItem)
37 | : null,
38 | onLongPress: widget.onItemLongTap != null
39 | ? () => widget.onItemLongTap!(widget.bookItem)
40 | : null,
41 | child: Container(
42 | padding: const EdgeInsets.only(left: 16, bottom: 20, right: 16),
43 | child: Row(children: [
44 | Container(
45 | width: 64,
46 | height: 86,
47 | margin: const EdgeInsets.only(right: 16),
48 | decoration: BoxDecoration(
49 | borderRadius: BorderRadius.circular(5),
50 | color: getColorScheme(context).surfaceVariant),
51 | child: ClipRRect(
52 | borderRadius: BorderRadius.circular(5),
53 | child: CachedNetworkImage(
54 | imageUrl: widget.bookItem.cover!,
55 | fit: BoxFit.cover,
56 | ),
57 | ),
58 | ),
59 | Expanded(
60 | child: Container(
61 | constraints: const BoxConstraints(minHeight: 86),
62 | child: Column(
63 | crossAxisAlignment: CrossAxisAlignment.start,
64 | mainAxisAlignment: MainAxisAlignment.center,
65 | children: [
66 | Text(
67 | widget.bookItem.name,
68 | maxLines: 1,
69 | overflow: TextOverflow.ellipsis,
70 | style: TextStyle(
71 | fontSize: 15,
72 | fontWeight: FontWeight.w600,
73 | color: colorScheme.onSurface),
74 | ),
75 | Padding(
76 | padding: const EdgeInsets.only(top: 10, bottom: 6),
77 | child: Text(
78 | widget.bookItem.author ??
79 | "上次更新:${widget.bookItem.lastUpdate!}",
80 | style: TextStyle(
81 | fontSize: 13,
82 | color: colorScheme.onSurface.withOpacity(0.6)),
83 | ),
84 | ),
85 | Text(
86 | widget.bookItem.lastChapter ?? "暂无更新",
87 | maxLines: 1,
88 | overflow: TextOverflow.ellipsis,
89 | style: TextStyle(
90 | fontSize: 13,
91 | color: colorScheme.onSurface.withOpacity(0.6)),
92 | ),
93 | ],
94 | )),
95 | )
96 | ])),
97 | );
98 | }
99 |
100 | @override
101 | bool get wantKeepAlive => true;
102 | }
103 |
--------------------------------------------------------------------------------
/lib/screen/home/detail_modal.dart:
--------------------------------------------------------------------------------
1 | import 'package:flash/flash.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_hooks/flutter_hooks.dart';
4 | import 'package:flutter_svg/svg.dart';
5 | import 'package:go_router/go_router.dart';
6 | import 'package:hooks_riverpod/hooks_riverpod.dart';
7 | import 'package:wenku8x/providers/download_provider.dart';
8 | import 'package:wenku8x/screen/home/home_provider.dart';
9 |
10 | class DetailModal extends HookConsumerWidget {
11 | const DetailModal(this.controller, this.bookItem, {super.key});
12 | final BookItem bookItem;
13 | final FlashController