├── android
├── settings_aar.gradle
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── 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
│ │ │ │ ├── xml
│ │ │ │ │ └── network_security_config.xml
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── nsapp
│ │ │ │ │ └── dmzj
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── profile
│ │ │ └── AndroidManifest.xml
│ │ └── debug
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── ios
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── icon-29.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-1024.png
│ │ │ ├── icon-20@2x.png
│ │ │ ├── icon-20@3x.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-76@2x.png
│ │ │ ├── icon-20-ipad.png
│ │ │ ├── icon-29-ipad.png
│ │ │ ├── icon-83.5@2x.png
│ │ │ ├── icon-20@2x-ipad.png
│ │ │ ├── icon-29@2x-ipad.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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ │ └── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ ├── flutter_export_environment.sh
│ └── AppFrameworkInfo.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── Podfile
└── Podfile.lock
├── assets
├── qq.png
├── weibo.png
├── weixin.png
├── ic_launcher.png
└── img_ucenter_def_bac.jpg
├── README.md
├── new_version.json
├── .metadata
├── .vscode
└── launch.json
├── lib
├── views
│ ├── user
│ │ ├── user_bind_phone.dart
│ │ ├── my_comment_page.dart
│ │ └── user_page.dart
│ ├── other
│ │ ├── comment_detail_page.dart
│ │ └── web_page.dart
│ ├── novel
│ │ ├── novel_home.dart
│ │ └── novel_category.dart
│ ├── comic
│ │ ├── comic_home.dart
│ │ ├── comic_category.dart
│ │ ├── comic_author.dart
│ │ └── comic_special.dart
│ ├── download
│ │ └── comic_download.dart
│ ├── reader
│ │ └── comic_tc.dart
│ └── settings
│ │ └── comic_reader_settings.dart
├── protobuf
│ ├── novel
│ │ ├── novel_chapter_response.proto
│ │ └── novel_detail_response.proto
│ ├── comic
│ │ ├── update_list_response.proto
│ │ ├── rank_list_response.proto
│ │ └── detail_response.proto
│ └── news
│ │ └── news_list_response.proto
├── models
│ ├── news
│ │ ├── news_tag_model.dart
│ │ ├── news_stat_detail.dart
│ │ ├── news_banner_model.dart
│ │ └── new_list_item_model.dart
│ ├── search_hot_word.dart
│ ├── comic
│ │ ├── comic_category_item.dart
│ │ ├── comic_home_new_item.dart
│ │ ├── comic_home_item.dart
│ │ ├── comic_chapter_view_point.dart
│ │ ├── comic_home_comic_item.dart
│ │ ├── comic_home_banner_item.dart
│ │ ├── comic_category_detail_item.dart
│ │ ├── comic_special_item.dart
│ │ ├── comic_category_detail_filter.dart
│ │ ├── comic_chapter_detail.dart
│ │ ├── comic_history_item.dart
│ │ ├── comic_author_model.dart
│ │ ├── comic_ns_search_item.dart
│ │ ├── comic_specia_datail_model.dart
│ │ ├── comic_rank_item.dart
│ │ └── comic_related_model.dart
│ ├── novel
│ │ ├── novel_category_detail_item.dart
│ │ ├── novel_history_item.dart
│ │ ├── novel_search_result_item.dart
│ │ ├── novel_rank_item.dart
│ │ ├── novel_volume_item.dart
│ │ └── novel_update_item.dart
│ ├── version_info.dart
│ ├── user
│ │ ├── user_subscribe_item.dart
│ │ ├── user_model.dart
│ │ └── user_profile.dart
│ └── user_comment_model.dart
├── widgets
│ ├── image_view.dart
│ ├── icon_text_button.dart
│ ├── user_subscribe_widget.dart
│ └── app_banner.dart
├── app
│ ├── api
│ │ ├── news.dart
│ │ ├── api_util.dart
│ │ ├── novel.dart
│ │ └── comic.dart
│ ├── comic_download_helper.dart
│ ├── http_util.dart
│ ├── user_info.dart
│ ├── commnet_helper.dart
│ ├── app_theme.dart
│ └── app_setting.dart
└── sql
│ ├── test.dart
│ ├── comic_history.dart
│ ├── novel_history.dart
│ └── comic_down.dart
├── Untitled-1.json
├── test
└── widget_test.dart
├── .gitignore
├── api.md
└── pubspec.yaml
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/assets/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/assets/qq.png
--------------------------------------------------------------------------------
/assets/weibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/assets/weibo.png
--------------------------------------------------------------------------------
/assets/weixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/assets/weixin.png
--------------------------------------------------------------------------------
/assets/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/assets/ic_launcher.png
--------------------------------------------------------------------------------
/assets/img_ucenter_def_bac.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/assets/img_ucenter_def_bac.jpg
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 | android.enableR8=true
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 动漫之家 Flutter
2 |
3 | 使用Flutter编写的动漫之家第三方客户端
4 |
5 | ## 截图
6 |
7 | 
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/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/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brillgone/dmzj_flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/new_version.json:
--------------------------------------------------------------------------------
1 | {
2 | "version":"1.2.0",
3 | "version_code":"210616",
4 | "message":"更新API",
5 | "android_url":"https://xiaoyaocz.lanzoux.com/s/dmzj",
6 | "ios_url":"",
7 | "hide_banner":false
8 | }
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/nsapp/dmzj/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.nsapp.dmzj
2 |
3 | import dev.darttools.flutter_android_volume_keydown.FlutterAndroidVolumeKeydownActivity
4 |
5 | class MainActivity: FlutterAndroidVolumeKeydownActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/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-7.2-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.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: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/.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": "Flutter",
9 | "request": "launch",
10 | "type": "dart"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
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: [UIApplicationLaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/views/user/user_bind_phone.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class UserBindPhoneWidget extends StatefulWidget {
4 | UserBindPhoneWidget({Key key}) : super(key: key);
5 |
6 | @override
7 | _UserBindPhoneWidgetState createState() => _UserBindPhoneWidgetState();
8 | }
9 |
10 | class _UserBindPhoneWidgetState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Column(
14 | children: [
15 |
16 | ],
17 | );
18 | }
19 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/lib/protobuf/novel/novel_chapter_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.novel;
4 |
5 |
6 | message NovelChapterResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | repeated NovelChapterVolumeResponse Data= 3;
10 | }
11 |
12 | message NovelChapterVolumeResponse {
13 | int32 VolumeId = 1;
14 | string VolumeName = 2;
15 | int32 VolumeOrder=3;
16 | repeated NovelChapterItemResponse Chapters=4;
17 | }
18 |
19 | message NovelChapterItemResponse {
20 | int32 ChapterId = 1;
21 | string ChapterName=2;
22 | int32 ChapterOrder = 3;
23 | }
24 |
--------------------------------------------------------------------------------
/lib/protobuf/comic/update_list_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.comic;
4 |
5 |
6 | message ComicUpdateListResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | repeated ComicUpdateListItemResponse Data= 3;
10 | }
11 |
12 | message ComicUpdateListItemResponse {
13 | int32 ComicId = 1;
14 | string Title = 2;
15 | bool Islong = 3;
16 | string Authors=4;
17 | string Types=5;
18 | string Cover=6;
19 | string Status=7;
20 | string LastUpdateChapterName=8;
21 | int32 LastUpdateChapterId=9;
22 | int64 LastUpdatetime=10;
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=D:\workspace\dmzj_flutter\flutter"
4 | export "FLUTTER_APPLICATION_PATH=D:\workspace\dmzj_flutter\dmzj_flutter"
5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true"
6 | export "FLUTTER_TARGET=lib\main.dart"
7 | export "FLUTTER_BUILD_DIR=build"
8 | export "FLUTTER_BUILD_NAME=1.2.0"
9 | export "FLUTTER_BUILD_NUMBER=210616"
10 | export "DART_OBFUSCATION=false"
11 | export "TRACK_WIDGET_CREATION=false"
12 | export "TREE_SHAKE_ICONS=false"
13 | export "PACKAGE_CONFIG=.packages"
14 |
--------------------------------------------------------------------------------
/lib/models/news/news_tag_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NewsTagItemModel {
4 | int tag_id;
5 | String tag_name;
6 |
7 | NewsTagItemModel({
8 | this.tag_id,
9 | this.tag_name,
10 | });
11 |
12 |
13 | factory NewsTagItemModel.fromJson(jsonRes)=>jsonRes == null? null:NewsTagItemModel( tag_id : jsonRes['tag_id'],
14 | tag_name : jsonRes['tag_name'],
15 | );
16 | Map toJson() => {
17 | 'tag_id': tag_id,
18 | 'tag_name': tag_name,
19 | };
20 |
21 | @override
22 | String toString() {
23 | return json.encode(this);
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/lib/models/search_hot_word.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class SearchHotWord {
4 | int _id;
5 | int get id => _id;
6 | String _name;
7 | String get name => _name;
8 |
9 | SearchHotWord({
10 | int id,
11 | String name,
12 | }):_id=id,_name=name;
13 | factory SearchHotWord.fromJson(jsonRes)=>jsonRes == null? null:SearchHotWord( id : jsonRes['id'],
14 | name : jsonRes['name'],
15 | );
16 | Map toJson() => {
17 | 'id': _id,
18 | 'name': _name,
19 | };
20 |
21 | @override
22 | String toString() {
23 | return json.encode(this);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/views/other/comment_detail_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CommnetDetailPage extends StatefulWidget {
4 | final int commentId;
5 |
6 | CommnetDetailPage(this.commentId, {Key key}) : super(key: key);
7 |
8 | @override
9 | _CommnetDetailPageState createState() => _CommnetDetailPageState();
10 | }
11 |
12 | class _CommnetDetailPageState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: AppBar(
17 | title: Text('评论详情'),
18 | ),
19 | body: Text(widget.commentId.toString()),
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/protobuf/comic/rank_list_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.comic;
4 |
5 |
6 | message ComicRankListResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | repeated ComicRankListItemResponse Data= 3;
10 | }
11 |
12 | message ComicRankListItemResponse {
13 | int32 ComicId = 1;
14 | string Title = 2;
15 | string Authors=3;
16 | string Status=4;
17 | string Cover=5;
18 | string Types=6;
19 | int64 LastUpdatetime=7;
20 | string LastUpdateChapterName=8;
21 | string ComicPy=9;
22 | int32 Num=10;
23 | int32 TagId=11;
24 | string ChapterName=12;
25 | int32 ChapterId=13;
26 | }
27 |
--------------------------------------------------------------------------------
/lib/protobuf/news/news_list_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.news;
4 |
5 |
6 | message NewsListResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | repeated NewsListItemResponse Data= 3;
10 | }
11 |
12 | message NewsListItemResponse {
13 | int32 ArticleId = 1;
14 | string Title = 2;
15 | string FromName = 3;
16 | string FromUrl=4;
17 | int64 CreateTime=5;
18 | int32 IsForeign=6;
19 | string ForeignUrl=7;
20 | string Intro=8;
21 | int32 AuthorId=9;
22 | int32 Status=10;
23 | string RowPicUrl=11;
24 | string ColPicUrl=12;
25 | int32 QchatShow=13;
26 | string PageUrl=14;
27 | int32 CommentAmount=15;
28 | int32 AuthorUid=16;
29 | string Cover=17;
30 | string Nickname=18;
31 | int32 MoodAmount=19;
32 | }
--------------------------------------------------------------------------------
/lib/widgets/image_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:photo_view/photo_view.dart';
3 |
4 | class ImageView extends StatefulWidget {
5 | ImageView({Key key}) : super(key: key);
6 |
7 | _ImageViewState createState() => _ImageViewState();
8 | }
9 |
10 | class _ImageViewState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: AppBar(
15 | title: Text("2333"),
16 | ),
17 | bottomNavigationBar: FlatButton(
18 | onPressed: ()=>print("object"),
19 | textColor: Colors.white,
20 | child: Text("下载"),
21 | ),
22 | body: Container(
23 | child: PhotoView(
24 | imageProvider: AssetImage("assets/large-image.jpg"),
25 | )),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_category_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicCategoryItem {
4 | int _tag_id;
5 | int get tag_id => _tag_id;
6 | String _title;
7 | String get title => _title;
8 | String _cover;
9 | String get cover => _cover;
10 |
11 | ComicCategoryItem({
12 | int tag_id,
13 | String title,
14 | String cover,
15 | }):_tag_id=tag_id,_title=title,_cover=cover;
16 | factory ComicCategoryItem.fromJson(jsonRes)=>jsonRes == null? null:ComicCategoryItem( tag_id : jsonRes['tag_id'],
17 | title : jsonRes['title'],
18 | cover : jsonRes['cover'],
19 | );
20 | Map toJson() => {
21 | 'tag_id': _tag_id,
22 | 'title': _title,
23 | 'cover': _cover,
24 | };
25 |
26 | @override
27 | String toString() {
28 | return json.encode(this);
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/app/api/news.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_dmzj/app/http_util.dart';
2 | import 'package:flutter_dmzj/protobuf/news/news_list_response.pb.dart';
3 |
4 | import 'api_util.dart';
5 |
6 | class NewsApi {
7 | static NewsApi _comicApi;
8 | static NewsApi get instance {
9 | if (_comicApi == null) {
10 | _comicApi = NewsApi();
11 | }
12 | return _comicApi;
13 | }
14 |
15 | /// 新闻列表
16 | Future> getNewsList(int id, {int page = 1}) async {
17 | var path = "${ApiUtil.BASE_URL_V4}/news/list/$id/${id == 0 ? 2 : 3}/$page";
18 | var result = await HttpUtil.instance.httpGet(
19 | path,
20 | queryParameters: ApiUtil.defaultParameter(),
21 | );
22 | var resultBytes = ApiUtil.decrypt(result);
23 |
24 | var data = NewsListResponse.fromBuffer(resultBytes);
25 | if (data.errno != 0) {
26 | throw AppError(data.errmsg);
27 | }
28 | return data.data;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_home_new_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicHomeNewItem {
4 | int id;
5 | String title;
6 | String authors;
7 | String status;
8 | String cover;
9 | int get type => 1;
10 | String get url => "";
11 | ComicHomeNewItem({
12 | this.id,
13 | this.title,
14 | this.authors,
15 | this.status,
16 | this.cover,
17 | });
18 |
19 |
20 | factory ComicHomeNewItem.fromJson(jsonRes)=>jsonRes == null? null:ComicHomeNewItem( id : jsonRes['id'],
21 | title : jsonRes['title'],
22 | authors : jsonRes['authors'],
23 | status : jsonRes['status'],
24 | cover : jsonRes['cover'],
25 | );
26 | Map toJson() => {
27 | 'id': id,
28 | 'title': title,
29 | 'authors': authors,
30 | 'status': status,
31 | 'cover': cover,
32 | };
33 |
34 | @override
35 | String toString() {
36 | return json.encode(this);
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/lib/models/novel/novel_category_detail_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NovelCategoryDetailItem {
4 | String _cover;
5 | String get cover => _cover;
6 | String _name;
7 | String get name => _name;
8 | String _authors;
9 | String get authors => _authors;
10 | int _id;
11 | int get id => _id;
12 |
13 | NovelCategoryDetailItem({
14 | String cover,
15 | String name,
16 | String authors,
17 | int id,
18 | }):_cover=cover,_name=name,_authors=authors,_id=id;
19 | factory NovelCategoryDetailItem.fromJson(jsonRes)=>jsonRes == null? null:NovelCategoryDetailItem( cover : jsonRes['cover'],
20 | name : jsonRes['name'],
21 | authors : jsonRes['authors'],
22 | id : jsonRes['id'],
23 | );
24 | Map toJson() => {
25 | 'cover': _cover,
26 | 'name': _name,
27 | 'authors': _authors,
28 | 'id': _id,
29 | };
30 |
31 | @override
32 | String toString() {
33 | return json.encode(this);
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_home_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicHomeItem {
4 | int category_id;
5 | String title;
6 | int sort;
7 | List data;
8 |
9 | ComicHomeItem({
10 | this.category_id,
11 | this.title,
12 | this.sort,
13 | this.data,
14 | });
15 |
16 |
17 | factory ComicHomeItem.fromJson(jsonRes){ if(jsonRes == null) return null;
18 | List data = jsonRes['data'] is List ? []: null;
19 | if(data!=null) {
20 | for (var item in jsonRes['data']) { if (item != null) { data.add(item); }
21 | }
22 | }
23 |
24 |
25 | return ComicHomeItem( category_id : jsonRes['category_id'],
26 | title : jsonRes['title'],
27 | sort : jsonRes['sort'],
28 | data:data,
29 | );}
30 | Map toJson() => {
31 | 'category_id': category_id,
32 | 'title': title,
33 | 'sort': sort,
34 | 'data': data,
35 | };
36 |
37 | @override
38 | String toString() {
39 | return json.encode(this);
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/app/comic_download_helper.dart:
--------------------------------------------------------------------------------
1 | import 'package:event_bus/event_bus.dart';
2 | import 'package:flutter_dmzj/sql/comic_down.dart';
3 | // 章节ID
4 | // 漫画ID
5 | // 漫画名称
6 | // 当前页数
7 | // 总页数
8 | // 下载状态 是否下载完成
9 | // 文件夹
10 |
11 | // 队列
12 | // List
13 | // 当前下载
14 | // List Downloading
15 |
16 | // Status:
17 | // 等待下载
18 | // 下载中
19 | // 暂停中
20 | // 下载失败
21 |
22 |
23 | // 保存至数据库
24 | // 加入队列
25 | // 下载队列获取信息
26 | // 开始下载
27 | // 下载封面
28 | // 获取图片信息
29 | // 开始下载图片
30 | // 更新数据库
31 |
32 |
33 | class ComicDownloadHelper{
34 | static EventBus downloadEvent=EventBus();
35 | static List dwonloadQueues=[];
36 | static ComicDownloadSqlItem currentDownload;
37 | static bool downloading;
38 | static void addDownload(ComicDownloadSqlItem info) async{
39 | //保存数据库
40 | var item=await ComicDownloadProvider.getItem(info.chapterID);
41 | if(item==null){
42 | await ComicDownloadProvider.insert(info);
43 | }
44 | //加入队列
45 | dwonloadQueues.add(info);
46 |
47 |
48 | }
49 |
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/lib/protobuf/novel/novel_detail_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.novel;
4 |
5 |
6 | message NovelDetailResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | NovelDetailInfoResponse Data= 3;
10 | }
11 |
12 | message NovelDetailInfoResponse {
13 | int32 NovelId = 1;
14 | string Name = 2;
15 | string Zone=3;
16 | string Status=4;
17 | string LastUpdateVolumeName=5;
18 | string LastUpdateChapterName=6;
19 | int32 LastUpdateVolumeId=7;
20 | int32 LastUpdateChapterId=8;
21 | int64 LastUpdateTime=9;
22 | string Cover=10;
23 | int32 HotHits=11;
24 | string Introduction=12;
25 | repeated string Types=13;
26 | string Authors=14;
27 | string FirstLetter=15;
28 | int32 SubscribeNum=16;
29 | int64 RedisUpdateTime=17;
30 | repeated NovelDetailInfoVolumeResponse Volume=18;
31 | }
32 |
33 | message NovelDetailInfoVolumeResponse {
34 | int32 VolumeId = 1;
35 | int32 LnovelId = 2;
36 | string VolumeName=3;
37 | int32 VolumeOrder=4;
38 | int64 Addtime=5;
39 | int32 SumChapters=6;
40 | }
41 |
--------------------------------------------------------------------------------
/lib/widgets/icon_text_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class IconTextButton extends StatefulWidget {
4 | final Icon icon;
5 | final String title;
6 | final Function onTap;
7 | IconTextButton(this.icon, this.title, this.onTap, {Key key})
8 | : super(key: key);
9 |
10 | _IconTextButtonState createState() => _IconTextButtonState();
11 | }
12 |
13 | class _IconTextButtonState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return Container(
17 | child: Expanded(
18 | child: InkWell(
19 | onTap: widget.onTap,
20 | child: Container(
21 | padding: EdgeInsets.fromLTRB(8, 16, 8, 16),
22 | child: Row(
23 | mainAxisAlignment: MainAxisAlignment.center,
24 | children: [
25 | widget.icon,
26 | Padding(
27 | padding: EdgeInsets.only(left: 8.0),
28 | child: Text(widget.title))
29 | ],
30 | ),
31 | ),
32 | )),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_chapter_view_point.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicChapterViewPoint {
4 | int _id;
5 | int get id => _id;
6 | int _uid;
7 | int get uid => _uid;
8 | String _content;
9 | String get content => _content;
10 | int _num;
11 | int get num => _num;
12 | set num(value) {
13 | _num = value;
14 | }
15 |
16 | int _page;
17 | int get page => _page;
18 |
19 | ComicChapterViewPoint({
20 | int id,
21 | int uid,
22 | String content,
23 | int num,
24 | int page,
25 | }):_id=id,_uid=uid,_content=content,_num=num,_page=page;
26 | factory ComicChapterViewPoint.fromJson(jsonRes)=>jsonRes == null? null:ComicChapterViewPoint( id : jsonRes['id'],
27 | uid : jsonRes['uid'],
28 | content : jsonRes['content'],
29 | num : jsonRes['num'],
30 | page : jsonRes['page'],
31 | );
32 | Map toJson() => {
33 | 'id': _id,
34 | 'uid': _uid,
35 | 'content': _content,
36 | 'num': _num,
37 | 'page': _page,
38 | };
39 |
40 | @override
41 | String toString() {
42 | return json.encode(this);
43 | }
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_home_comic_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicHomeComicItem {
4 | String cover;
5 | String title;
6 | String sub_title;
7 | int type;
8 | String url;
9 | int obj_id;
10 | String status;
11 | int get id => obj_id;
12 | ComicHomeComicItem({
13 | this.cover,
14 | this.title,
15 | this.sub_title,
16 | this.type,
17 | this.url,
18 | this.obj_id,
19 | this.status,
20 | });
21 |
22 |
23 | factory ComicHomeComicItem.fromJson(jsonRes)=>jsonRes == null? null:ComicHomeComicItem( cover : jsonRes['cover'],
24 | title : jsonRes['title'],
25 | sub_title : jsonRes['sub_title'],
26 | type : jsonRes['type'],
27 | url : jsonRes['url'],
28 | obj_id : jsonRes['obj_id'],
29 | status : jsonRes['status'],
30 | );
31 | Map toJson() => {
32 | 'cover': cover,
33 | 'title': title,
34 | 'sub_title': sub_title,
35 | 'type': type,
36 | 'url': url,
37 | 'obj_id': obj_id,
38 | 'status': status,
39 | };
40 |
41 | @override
42 | String toString() {
43 | return json.encode(this);
44 | }
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_home_banner_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicHomeBannerItem {
4 | String cover;
5 | String title;
6 | String sub_title;
7 | int type;
8 | String url;
9 | int obj_id;
10 | String status;
11 |
12 | int get id => obj_id;
13 |
14 |
15 | ComicHomeBannerItem({
16 | this.cover,
17 | this.title,
18 | this.sub_title,
19 | this.type,
20 | this.url,
21 | this.obj_id,
22 | this.status,
23 | });
24 |
25 |
26 | factory ComicHomeBannerItem.fromJson(jsonRes)=>jsonRes == null? null:ComicHomeBannerItem( cover : jsonRes['cover'],
27 | title : jsonRes['title'],
28 | sub_title : jsonRes['sub_title'],
29 | type : jsonRes['type'],
30 | url : jsonRes['url'],
31 | obj_id : jsonRes['obj_id'],
32 | status : jsonRes['status'],
33 | );
34 | Map toJson() => {
35 | 'cover': cover,
36 | 'title': title,
37 | 'sub_title': sub_title,
38 | 'type': type,
39 | 'url': url,
40 | 'obj_id': obj_id,
41 | 'status': status,
42 | };
43 |
44 | @override
45 | String toString() {
46 | return json.encode(this);
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/Untitled-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "old_api":false,
3 | "comic_id":1,
4 | "title":"",
5 | "authors":[ {
6 | "author_name":"",
7 | "author_id":0
8 | }],
9 | "cover":"",
10 | "tags":[
11 | {
12 | "tag_name":"",
13 | "tag_id":0
14 | }
15 | ],
16 | "click_num":0,
17 | "collection_num":0,
18 | "status":"连载中",
19 | "last_update":"",
20 | "description":"",
21 | "volume":[
22 | {
23 | "volume_id":0,
24 | "volume_title":"",
25 | "reverse":false,
26 | "chapters":[
27 | {
28 | "chpater_id":0,
29 | "chapter_title":"",
30 | "chapter_order":0,
31 | "updatetime":"",
32 | "comic_id":0,
33 | "volume_id":0,
34 | "volume_title":""
35 | }
36 |
37 | ]
38 | }
39 | ],
40 | "similar":[
41 | {
42 | "comic_id":0,
43 | "title":"",
44 | "last_update_chapter_name":"",
45 | "cover":""
46 | }
47 | ]
48 | }
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | maven { url 'https://maven.aliyun.com/repository/public' }
5 | // maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
6 | maven { url 'https://maven.aliyun.com/repository/google' }
7 | // jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:7.1.0' // 3.5.0
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | maven { url 'https://maven.aliyun.com/repository/public' }
19 | // maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
20 | maven { url 'https://maven.aliyun.com/repository/google' }
21 | // google()
22 | // jcenter()
23 | }
24 | }
25 |
26 | rootProject.buildDir = '../build'
27 | subprojects {
28 | project.buildDir = "${rootProject.buildDir}/${project.name}"
29 | }
30 | subprojects {
31 | project.evaluationDependsOn(':app')
32 | }
33 |
34 | task clean(type: Delete) {
35 | delete rootProject.buildDir
36 | }
37 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:flutter_dmzj/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/lib/models/version_info.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class VersionInfo {
4 | String version;
5 | String version_code;
6 | String message;
7 | String android_url;
8 | String ios_url;
9 | bool hide_banner;
10 |
11 | VersionInfo({
12 | this.version,
13 | this.version_code,
14 | this.message,
15 | this.android_url,
16 | this.ios_url,
17 | this.hide_banner,
18 | });
19 |
20 | factory VersionInfo.fromJson(jsonRes) => jsonRes == null
21 | ? null
22 | : VersionInfo(
23 | version: jsonRes['version'],
24 | version_code: jsonRes['version_code'],
25 | message: jsonRes['message'],
26 | android_url: jsonRes['android_url'],
27 | ios_url: jsonRes['ios_url'],
28 | hide_banner: jsonRes['hide_banner'],
29 | );
30 | Map toJson() => {
31 | 'version': version,
32 | 'version_code': version_code,
33 | 'message': message,
34 | 'android_url': android_url,
35 | 'ios_url': ios_url,
36 | 'hide_banner': hide_banner,
37 | };
38 |
39 | @override
40 | String toString() {
41 | return json.encode(this);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/views/user/my_comment_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_dmzj/app/user_info.dart';
3 | import 'package:flutter_dmzj/widgets/user_comment_widget.dart';
4 | import 'package:provider/provider.dart';
5 |
6 | class MyCommentPage extends StatefulWidget {
7 | MyCommentPage({Key key}) : super(key: key);
8 |
9 | @override
10 | _MyCommentPageState createState() => _MyCommentPageState();
11 | }
12 |
13 | class _MyCommentPageState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return DefaultTabController(
17 | length: 3,
18 | child: Scaffold(
19 | appBar: AppBar(
20 | title: Text("我的评论"),
21 | bottom: TabBar(tabs: [
22 | Tab(text: "漫画"),
23 | Tab(text: "小说"),
24 | Tab(text: "新闻"),
25 | ]),
26 | ),
27 | body: TabBarView(children: [
28 | UserCommentWidget(
29 | int.parse(Provider.of(context).loginInfo.uid ?? 0),
30 | type: 0,
31 | ),
32 | UserCommentWidget(
33 | int.parse(Provider.of(context).loginInfo.uid ?? 0),
34 | type: 1,
35 | ),
36 | UserCommentWidget(
37 | int.parse(Provider.of(context).loginInfo.uid ?? 0),
38 | type: 2,
39 | )
40 | ]),
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/models/news/news_stat_detail.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NewsStatDetail {
4 | String _comment_amount="0";
5 | String get comment_amount => _comment_amount;
6 | set comment_amount(value) {
7 | var v= int.tryParse(value,radix: 0);
8 | _comment_amount = v.toString();
9 | }
10 |
11 | int _mood_amount=0;
12 | int get mood_amount => _mood_amount;
13 | set mood_amount(value) {
14 | _mood_amount = value;
15 | }
16 |
17 | String _row_pic_url;
18 | String get row_pic_url => _row_pic_url;
19 | set row_pic_url(value) {
20 | _row_pic_url = value;
21 | }
22 |
23 | String _title;
24 | String get title => _title;
25 | set title(value) {
26 | _title = value;
27 | }
28 |
29 |
30 | NewsStatDetail({
31 | String comment_amount,
32 | int mood_amount,
33 | String row_pic_url,
34 | String title,
35 | }):_comment_amount=comment_amount,_mood_amount=mood_amount,_row_pic_url=row_pic_url,_title=title;
36 | factory NewsStatDetail.fromJson(jsonRes)=>jsonRes == null? null:NewsStatDetail( comment_amount : jsonRes['comment_amount'],
37 | mood_amount : jsonRes['mood_amount'],
38 | row_pic_url : jsonRes['row_pic_url'],
39 | title : jsonRes['title'],
40 | );
41 | Map toJson() => {
42 | 'comment_amount': _comment_amount,
43 | 'mood_amount': _mood_amount,
44 | 'row_pic_url': _row_pic_url,
45 | 'title': _title,
46 | };
47 |
48 | @override
49 | String toString() {
50 | return json.encode(this);
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/lib/protobuf/comic/detail_response.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package dmzj.comic;
4 |
5 |
6 | message ComicDetailResponse {
7 | int32 Errno = 1;
8 | string Errmsg = 2;
9 | ComicDetailInfoResponse Data= 3;
10 | }
11 |
12 | message ComicDetailInfoResponse {
13 | int32 Id = 1;
14 | string Title = 2;
15 | int32 Direction=3;
16 | int32 Islong=4;
17 | int32 IsDmzj=5;
18 | string Cover=6;
19 | string Description=7;
20 | int64 LastUpdatetime=8;
21 | string LastUpdateChapterName=9;
22 | int32 Copyright=10;
23 | string FirstLetter=11;
24 | string ComicPy=12;
25 | int32 Hidden=13;
26 | int32 HotNum=14;
27 | int32 HitNum=15;
28 | int32 Uid=16;
29 | int32 IsLock=17;
30 | int32 LastUpdateChapterId=18;
31 | repeated ComicDetailTypeItemResponse Types=19;
32 | repeated ComicDetailTypeItemResponse Status=20;
33 | repeated ComicDetailTypeItemResponse Authors=21;
34 | int32 SubscribeNum=22;
35 | repeated ComicDetailChapterResponse Chapters=23;
36 | int32 IsNeedLogin=24;
37 | //object UrlLinks=25;
38 | int32 IsHideChapter=26;
39 | //object DhUrlLinks=27;
40 |
41 | }
42 |
43 | message ComicDetailTypeItemResponse {
44 | int32 TagId = 1;
45 | string TagName = 2;
46 | }
47 |
48 | message ComicDetailChapterResponse {
49 | string Title = 1;
50 | repeated ComicDetailChapterInfoResponse Data=2;
51 | }
52 | message ComicDetailChapterInfoResponse {
53 | int32 ChapterId = 1;
54 | string ChapterTitle = 2;
55 | int64 Updatetime=3;
56 | int32 Filesize=4;
57 | int32 ChapterOrder=5;
58 | }
59 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_category_detail_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicCategoryDetailItem {
4 | int _id;
5 | int get id => _id;
6 | String _title;
7 | String get title => _title;
8 | String _authors;
9 | String get authors => _authors;
10 | String _status;
11 | String get status => _status;
12 | String _cover;
13 | String get cover => _cover;
14 | String _types;
15 | String get types => _types;
16 | int _last_updatetime;
17 | int get last_updatetime => _last_updatetime;
18 | int _num;
19 | int get num => _num;
20 |
21 | ComicCategoryDetailItem({
22 | int id,
23 | String title,
24 | String authors,
25 | String status,
26 | String cover,
27 | String types,
28 | int last_updatetime,
29 | int num,
30 | }):_id=id,_title=title,_authors=authors,_status=status,_cover=cover,_types=types,_last_updatetime=last_updatetime,_num=num;
31 | factory ComicCategoryDetailItem.fromJson(jsonRes)=>jsonRes == null? null:ComicCategoryDetailItem( id : jsonRes['id'],
32 | title : jsonRes['title'],
33 | authors : jsonRes['authors'],
34 | status : jsonRes['status'],
35 | cover : jsonRes['cover'],
36 | types : jsonRes['types'],
37 | last_updatetime : jsonRes['last_updatetime'],
38 | num : jsonRes['num'],
39 | );
40 | Map toJson() => {
41 | 'id': _id,
42 | 'title': _title,
43 | 'authors': _authors,
44 | 'status': _status,
45 | 'cover': _cover,
46 | 'types': _types,
47 | 'last_updatetime': _last_updatetime,
48 | 'num': _num,
49 | };
50 |
51 | @override
52 | String toString() {
53 | return json.encode(this);
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_special_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicSpecialItem {
4 | int _id;
5 | int get id => _id;
6 | String _title;
7 | String get title => _title;
8 | String _short_title;
9 | String get short_title => _short_title;
10 | int _create_time;
11 | int get create_time => _create_time;
12 | String _small_cover;
13 | String get small_cover => _small_cover;
14 | int _page_type;
15 | int get page_type => _page_type;
16 | int _sort;
17 | int get sort => _sort;
18 | String _page_url;
19 | String get page_url => _page_url;
20 |
21 | ComicSpecialItem({
22 | int id,
23 | String title,
24 | String short_title,
25 | int create_time,
26 | String small_cover,
27 | int page_type,
28 | int sort,
29 | String page_url,
30 | }):_id=id,_title=title,_short_title=short_title,_create_time=create_time,_small_cover=small_cover,_page_type=page_type,_sort=sort,_page_url=page_url;
31 | factory ComicSpecialItem.fromJson(jsonRes)=>jsonRes == null? null:ComicSpecialItem( id : jsonRes['id'],
32 | title : jsonRes['title'],
33 | short_title : jsonRes['short_title'],
34 | create_time : jsonRes['create_time'],
35 | small_cover : jsonRes['small_cover'],
36 | page_type : jsonRes['page_type'],
37 | sort : jsonRes['sort'],
38 | page_url : jsonRes['page_url'],
39 | );
40 | Map toJson() => {
41 | 'id': _id,
42 | 'title': _title,
43 | 'short_title': _short_title,
44 | 'create_time': _create_time,
45 | 'small_cover': _small_cover,
46 | 'page_type': _page_type,
47 | 'sort': _sort,
48 | 'page_url': _page_url,
49 | };
50 |
51 | @override
52 | String toString() {
53 | return json.encode(this);
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/lib/models/user/user_subscribe_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class SubscribeItem {
4 | String _name;
5 | String get name => _name;
6 | String _sub_update;
7 | String get sub_update => _sub_update;
8 | String _sub_img;
9 | String get sub_img => _sub_img;
10 | int _sub_uptime;
11 | int get sub_uptime => _sub_uptime;
12 | String _sub_first_letter;
13 | String get sub_first_letter => _sub_first_letter;
14 | int _sub_readed;
15 | int get sub_readed => _sub_readed;
16 | int _id;
17 | int get id => _id;
18 | String _status;
19 | String get status => _status;
20 |
21 | SubscribeItem({
22 | String name,
23 | String sub_update,
24 | String sub_img,
25 | int sub_uptime,
26 | String sub_first_letter,
27 | int sub_readed,
28 | int id,
29 | String status,
30 | }):_name=name,_sub_update=sub_update,_sub_img=sub_img,_sub_uptime=sub_uptime,_sub_first_letter=sub_first_letter,_sub_readed=sub_readed,_id=id,_status=status;
31 | factory SubscribeItem.fromJson(jsonRes)=>jsonRes == null? null:SubscribeItem( name : jsonRes['name'],
32 | sub_update : jsonRes['sub_update'],
33 | sub_img : jsonRes['sub_img'],
34 | sub_uptime : jsonRes['sub_uptime'],
35 | sub_first_letter : jsonRes['sub_first_letter'],
36 | sub_readed : jsonRes['sub_readed'],
37 | id : jsonRes['id'],
38 | status : jsonRes['status'],
39 | );
40 | Map toJson() => {
41 | 'name': _name,
42 | 'sub_update': _sub_update,
43 | 'sub_img': _sub_img,
44 | 'sub_uptime': _sub_uptime,
45 | 'sub_first_letter': _sub_first_letter,
46 | 'sub_readed': _sub_readed,
47 | 'id': _id,
48 | 'status': _status,
49 | };
50 |
51 | @override
52 | String toString() {
53 | return json.encode(this);
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/lib/models/novel/novel_history_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NovelHistoryItem {
4 | int uid;
5 | int type;
6 | String lnovel_id;
7 | int volume_id;
8 | int chapter_id;
9 | int record;
10 | int viewing_time;
11 | int total_num;
12 | String cover;
13 | String novel_name;
14 | String volume_name;
15 | String chapter_name;
16 |
17 | NovelHistoryItem({
18 | this.uid,
19 | this.type,
20 | this.lnovel_id,
21 | this.volume_id,
22 | this.chapter_id,
23 | this.record,
24 | this.viewing_time,
25 | this.total_num,
26 | this.cover,
27 | this.novel_name,
28 | this.volume_name,
29 | this.chapter_name,
30 | });
31 |
32 |
33 | factory NovelHistoryItem.fromJson(jsonRes)=>jsonRes == null? null:NovelHistoryItem( uid : jsonRes['uid'],
34 | type : jsonRes['type'],
35 | lnovel_id : jsonRes['lnovel_id'],
36 | volume_id : jsonRes['volume_id'],
37 | chapter_id : jsonRes['chapter_id'],
38 | record : jsonRes['record'],
39 | viewing_time : jsonRes['viewing_time'],
40 | total_num : jsonRes['total_num'],
41 | cover : jsonRes['cover'],
42 | novel_name : jsonRes['novel_name'],
43 | volume_name : jsonRes['volume_name'],
44 | chapter_name : jsonRes['chapter_name'],
45 | );
46 | Map toJson() => {
47 | 'uid': uid,
48 | 'type': type,
49 | 'lnovel_id': lnovel_id,
50 | 'volume_id': volume_id,
51 | 'chapter_id': chapter_id,
52 | 'record': record,
53 | 'viewing_time': viewing_time,
54 | 'total_num': total_num,
55 | 'cover': cover,
56 | 'novel_name': novel_name,
57 | 'volume_name': volume_name,
58 | 'chapter_name': chapter_name,
59 | };
60 |
61 | @override
62 | String toString() {
63 | return json.encode(this);
64 | }
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/lib/models/user/user_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class UserLgoinModel {
4 | final int result;
5 | final String msg;
6 | final UserInfo data;
7 |
8 | UserLgoinModel({
9 | this.result,
10 | this.msg,
11 | this.data,
12 | });
13 |
14 |
15 | factory UserLgoinModel.fromJson(jsonRes)=>jsonRes == null? null:UserLgoinModel( result : jsonRes['result'],
16 | msg : jsonRes['msg'],
17 | data : UserInfo.fromJson(jsonRes['data']),
18 | );
19 | Map toJson() => {
20 | 'result': result,
21 | 'msg': msg,
22 | 'data': data,
23 | };
24 |
25 | @override
26 | String toString() {
27 | return json.encode(this);
28 | }
29 | }
30 | class UserInfo {
31 | final String uid;
32 | final String nickname;
33 | final String dmzj_token;
34 | final String photo;
35 | final String bind_phone;
36 | final String email;
37 | final String passwd;
38 |
39 | UserInfo({
40 | this.uid,
41 | this.nickname,
42 | this.dmzj_token,
43 | this.photo,
44 | this.bind_phone,
45 | this.email,
46 | this.passwd,
47 | });
48 |
49 |
50 | factory UserInfo.fromJson(jsonRes)=>jsonRes == null? null:UserInfo( uid : jsonRes['uid'],
51 | nickname : jsonRes['nickname'],
52 | dmzj_token : jsonRes['dmzj_token'],
53 | photo : jsonRes['photo'],
54 | bind_phone : jsonRes['bind_phone'],
55 | email : jsonRes['email'],
56 | passwd : jsonRes['passwd'],
57 | );
58 | Map toJson() => {
59 | 'uid': uid,
60 | 'nickname': nickname,
61 | 'dmzj_token': dmzj_token,
62 | 'photo': photo,
63 | 'bind_phone': bind_phone,
64 | 'email': email,
65 | 'passwd': passwd,
66 | };
67 |
68 | @override
69 | String toString() {
70 | return json.encode(this);
71 | }
72 | }
73 |
74 |
75 |
--------------------------------------------------------------------------------
/lib/models/news/news_banner_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NewsBannerModel {
4 | int code;
5 | String msg;
6 | List data;
7 |
8 | NewsBannerModel({
9 | this.code,
10 | this.msg,
11 | this.data,
12 | });
13 |
14 |
15 | factory NewsBannerModel.fromJson(jsonRes){ if(jsonRes == null) return null;
16 | List data = jsonRes['data'] is List ? []: null;
17 | if(data!=null) {
18 | for (var item in jsonRes['data']) { if (item != null) { data.add(NewsBannerItemModel.fromJson(item)); }
19 | }
20 | }
21 |
22 |
23 | return NewsBannerModel( code : jsonRes['code'],
24 | msg : jsonRes['msg'],
25 | data:data,
26 | );}
27 | Map toJson() => {
28 | 'code': code,
29 | 'msg': msg,
30 | 'data': data,
31 | };
32 |
33 | @override
34 | String toString() {
35 | return json.encode(this);
36 | }
37 | }
38 | class NewsBannerItemModel {
39 | int id;
40 | String title;
41 | String pic_url;
42 | int object_id;
43 | String object_url;
44 |
45 | NewsBannerItemModel({
46 | this.id,
47 | this.title,
48 | this.pic_url,
49 | this.object_id,
50 | this.object_url,
51 | });
52 |
53 |
54 | factory NewsBannerItemModel.fromJson(jsonRes)=>jsonRes == null? null:NewsBannerItemModel( id : jsonRes['id'],
55 | title : jsonRes['title'],
56 | pic_url : jsonRes['pic_url'],
57 | object_id : jsonRes['object_id'],
58 | object_url : jsonRes['object_url'],
59 | );
60 | Map toJson() => {
61 | 'id': id,
62 | 'title': title,
63 | 'pic_url': pic_url,
64 | 'object_id': object_id,
65 | 'object_url': object_url,
66 | };
67 |
68 | @override
69 | String toString() {
70 | return json.encode(this);
71 | }
72 | }
73 |
74 |
75 |
--------------------------------------------------------------------------------
/lib/views/other/web_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:share/share.dart';
3 | import 'package:url_launcher/url_launcher.dart';
4 | import 'package:webview_flutter/webview_flutter.dart';
5 |
6 | class WebViewPage extends StatefulWidget {
7 | final String url;
8 | WebViewPage(this.url, {Key key}) : super(key: key);
9 |
10 | @override
11 | _WebViewPageState createState() => _WebViewPageState();
12 | }
13 |
14 | class _WebViewPageState extends State {
15 | WebViewController _controller;
16 | String _title = "网页加载中...";
17 |
18 | @override
19 | void setState(fn) {
20 | if (mounted) {
21 | super.setState(fn);
22 | }
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | appBar: AppBar(
29 | title: Text(_title),
30 | actions: [
31 | IconButton(
32 | icon: Icon(Icons.share),
33 | onPressed: () async {
34 | Share.share(
35 | "${await _controller.getTitle()}\r\n${await _controller.currentUrl()}");
36 | }),
37 | IconButton(
38 | icon: Icon(Icons.open_in_browser),
39 | onPressed: () async {
40 | launch(await _controller.currentUrl());
41 | })
42 | ],
43 | ),
44 | body: WebView(
45 | onWebViewCreated: (c) {
46 | _controller = c;
47 | },
48 | initialUrl: widget.url,
49 | javascriptMode: JavascriptMode.unrestricted,
50 | userAgent: "",
51 | onPageFinished: (e) async {
52 | var title = await _controller.getTitle();
53 | setState(() {
54 | _title = title;
55 | });
56 | },
57 | ),
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/app/http_util.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | class HttpUtil {
4 | static HttpUtil _httpUtil;
5 | static HttpUtil get instance {
6 | if (_httpUtil == null) {
7 | _httpUtil = HttpUtil();
8 | }
9 | return _httpUtil;
10 | }
11 |
12 | Dio dio;
13 | HttpUtil() {
14 | dio = Dio(
15 | BaseOptions(),
16 | );
17 | }
18 | Future httpGet(
19 | String url, {
20 | Map queryParameters,
21 | bool needLogin = false,
22 | }) async {
23 | try {
24 | var result = await dio.get(
25 | url,
26 | queryParameters: queryParameters,
27 | options: Options(
28 | responseType: ResponseType.plain,
29 | //headers: header,
30 | ),
31 | );
32 |
33 | return result.data;
34 | } catch (e) {
35 | if (e is DioError) {
36 | dioErrorHandle(e);
37 | } else {
38 | throw AppError("网络请求失败");
39 | }
40 | return null;
41 | }
42 | }
43 |
44 | void dioErrorHandle(DioError e) {
45 | switch (e.type) {
46 | case DioErrorType.cancel:
47 | throw AppError("请求被取消");
48 | break;
49 | case DioErrorType.response:
50 | throw AppError("请求失败:${e.response.statusCode}");
51 | break;
52 | case DioErrorType.connectTimeout:
53 | case DioErrorType.sendTimeout:
54 | case DioErrorType.receiveTimeout:
55 | throw AppError("网络连接超时,请稍后再试");
56 | break;
57 | default:
58 | throw AppError("请求失败,无法连接至服务器");
59 | break;
60 | }
61 | }
62 | }
63 |
64 | class AppError implements Exception {
65 | final int code;
66 | final String message;
67 | AppError(
68 | this.message, {
69 | this.code,
70 | });
71 |
72 | @override
73 | String toString() {
74 | return message ?? "出现问题";
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | *.jks
7 | *.p12
8 | .DS_Store
9 | .atom/
10 | .buildlog/
11 | .history
12 | .svn/
13 |
14 | # IntelliJ related
15 | *.iml
16 | *.ipr
17 | *.iws
18 | .idea/
19 |
20 | # The .vscode folder contains launch configuration and tasks you configure in
21 | # VS Code which you may wish to be included in version control, so this line
22 | # is commented out by default.
23 | #.vscode/
24 |
25 | # Flutter/Dart/Pub related
26 | **/doc/api/
27 | .dart_tool/
28 | .flutter-plugins
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Android related
35 | **/android/**/gradle-wrapper.jar
36 | **/android/.gradle
37 | **/android/captures/
38 | **/android/gradlew
39 | **/android/gradlew.bat
40 | **/android/local.properties
41 | **/android/**/GeneratedPluginRegistrant.java
42 |
43 | # iOS/XCode related
44 | **/ios/**/*.mode1v3
45 | **/ios/**/*.mode2v3
46 | **/ios/**/*.moved-aside
47 | **/ios/**/*.pbxuser
48 | **/ios/**/*.perspectivev3
49 | **/ios/**/*sync/
50 | **/ios/**/.sconsign.dblite
51 | **/ios/**/.tags*
52 | **/ios/**/.vagrant/
53 | **/ios/**/DerivedData/
54 | **/ios/**/Icon?
55 | **/ios/**/Pods/
56 | **/ios/**/.symlinks/
57 | **/ios/**/profile
58 | **/ios/**/xcuserdata
59 | **/ios/.generated/
60 | **/ios/Flutter/App.framework
61 | **/ios/Flutter/Flutter.framework
62 | **/ios/Flutter/Generated.xcconfig
63 | **/ios/Flutter/app.flx
64 | **/ios/Flutter/app.zip
65 | **/ios/Flutter/flutter_assets/
66 | **/ios/ServiceDefinitions.json
67 | **/ios/Runner/GeneratedPluginRegistrant.*
68 |
69 | # Exceptions to above rules.
70 | !**/ios/**/default.mode1v3
71 | !**/ios/**/default.mode2v3
72 | !**/ios/**/default.pbxuser
73 | !**/ios/**/default.perspectivev3
74 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
75 | # key.jks
76 | android/key.properties
77 | pubspec.lock
78 | .flutter-plugins-dependencies
79 | **/linux
80 | **/windows
81 |
82 |
--------------------------------------------------------------------------------
/lib/models/comic/comic_category_detail_filter.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class ComicCategoryDetailFilter {
4 | String _title;
5 | String get title => _title;
6 | List _items;
7 | List get items => _items;
8 |
9 | ComicCategoryDetailFilterItem _item;
10 | ComicCategoryDetailFilterItem get item => _item;
11 | set item(value) {
12 | _item = value;
13 | }
14 |
15 | ComicCategoryDetailFilter({
16 | String title,
17 | List items,
18 | }):_title=title,_items=items;
19 | factory ComicCategoryDetailFilter.fromJson(jsonRes){ if(jsonRes == null) return null;
20 | List items = jsonRes['items'] is List ? []: null;
21 | if(items!=null) {
22 | for (var item in jsonRes['items']) { if (item != null) { items.add(ComicCategoryDetailFilterItem.fromJson(item)); }
23 | }
24 | }
25 |
26 |
27 | return ComicCategoryDetailFilter( title : jsonRes['title'],
28 | items:items,
29 | );}
30 | Map toJson() => {
31 | 'title': _title,
32 | 'items': _items,
33 | };
34 |
35 | @override
36 | String toString() {
37 | return json.encode(this);
38 | }
39 | }
40 | class ComicCategoryDetailFilterItem {
41 | int _tag_id;
42 | int get tag_id => _tag_id;
43 | String _tag_name;
44 | String get tag_name => _tag_name;
45 |
46 | ComicCategoryDetailFilterItem({
47 | int tag_id,
48 | String tag_name,
49 | }):_tag_id=tag_id,_tag_name=tag_name;
50 | factory ComicCategoryDetailFilterItem.fromJson(jsonRes)=>jsonRes == null? null:ComicCategoryDetailFilterItem( tag_id : jsonRes['tag_id'],
51 | tag_name : jsonRes['tag_name'],
52 | );
53 | Map toJson() => {
54 | 'tag_id': _tag_id,
55 | 'tag_name': _tag_name,
56 | };
57 |
58 | @override
59 | String toString() {
60 | return json.encode(this);
61 | }
62 | }
63 |
64 |
65 |
--------------------------------------------------------------------------------
/lib/models/novel/novel_search_result_item.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert' show json;
2 |
3 | class NovelSearchResultItem {
4 |
5 | int _addtime;
6 | int get addtime => _addtime;
7 | String _authors;
8 | String get authors => _authors;
9 | int _copyright;
10 | int get copyright => _copyright;
11 | String _cover;
12 | String get cover => _cover;
13 | int _hot_hits;
14 | int get hot_hits => _hot_hits;
15 | String _last_name;
16 | String get last_name => _last_name;
17 | int _status;
18 | int get status => _status;
19 | String _title;
20 | String get title => _title;
21 | String _types;
22 | String get types => _types;
23 | int _id;
24 | int get id => _id;
25 |
26 | NovelSearchResultItem({
27 |
28 | int addtime,
29 | String authors,
30 | int copyright,
31 | String cover,
32 | int hot_hits,
33 | String last_name,
34 | int status,
35 | String title,
36 | String types,
37 | int id,
38 | }):_addtime=addtime,_authors=authors,_copyright=copyright,_cover=cover,_hot_hits=hot_hits,_last_name=last_name,_status=status,_title=title,_types=types,_id=id;
39 | factory NovelSearchResultItem.fromJson(jsonRes)=>jsonRes == null? null:NovelSearchResultItem(
40 | addtime : jsonRes['addtime'],
41 | authors : jsonRes['authors'],
42 | copyright : jsonRes['copyright'],
43 | cover : jsonRes['cover'],
44 | hot_hits : jsonRes['hot_hits'],
45 | last_name : jsonRes['last_name'],
46 | status : jsonRes['status'],
47 | title : jsonRes['title'],
48 | types : jsonRes['types'],
49 | id : jsonRes['id'],
50 | );
51 | Map toJson() => {
52 | 'addtime': _addtime,
53 | 'authors': _authors,
54 | 'copyright': _copyright,
55 | 'cover': _cover,
56 | 'hot_hits': _hot_hits,
57 | 'last_name': _last_name,
58 | 'status': _status,
59 | 'title': _title,
60 | 'types': _types,
61 | 'id': _id,
62 | };
63 |
64 | @override
65 | String toString() {
66 | return json.encode(this);
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/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 | 动漫之家
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | ITSAppUsesNonExemptEncryption
24 |
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSAllowsArbitraryLoadsInWebContent
32 |
33 |
34 | UILaunchStoryboardName
35 | LaunchScreen
36 | UIMainStoryboardFile
37 | Main
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UISupportedInterfaceOrientations~ipad
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationPortraitUpsideDown
48 | UIInterfaceOrientationLandscapeLeft
49 | UIInterfaceOrientationLandscapeRight
50 |
51 | UIViewControllerBasedStatusBarAppearance
52 |
53 | io.flutter.embedded_views_preview
54 | YES
55 |
56 |
57 |
--------------------------------------------------------------------------------
/lib/sql/test.dart:
--------------------------------------------------------------------------------
1 | import 'package:sqflite/sqflite.dart';
2 |
3 | final String testTableName = 'Test';
4 | final String testColumnId = 'Id';
5 | final String testColumnName = 'Name';
6 | final String testColumnDesc = 'Desc';
7 |
8 |
9 | class TestSqlItem {
10 | String id;
11 | String name;
12 | String desc;
13 |
14 |
15 | Map toMap() {
16 | var map = {
17 | testColumnId: id,
18 | testColumnName: name,
19 | testColumnDesc: desc,
20 |
21 | };
22 | return map;
23 | }
24 |
25 | TestSqlItem.fromMap(Map map) {
26 | id = map[testColumnId];
27 | name = map[testColumnName];
28 | desc = map[testColumnDesc];
29 |
30 | }
31 |
32 |
33 | }
34 |
35 | class TestProvider {
36 | static Database db;
37 | static Future insert(TestSqlItem item) async {
38 | await db.insert(testTableName, item.toMap());
39 | return item;
40 | }
41 |
42 | static Future getItem(String id) async {
43 |
44 | List