├── lib ├── lanugages │ ├── en.json │ ├── zh-CHS.json │ └── zh-CHT.json ├── pages │ ├── about.dart │ ├── ruleList.dart │ ├── settings.dart │ ├── bookContent.dart │ ├── ruleEditor.dart │ ├── discover.dart │ ├── bookSearch.dart │ ├── home.dart │ └── home_drawer.dart ├── widgets │ ├── bookDescriptionCard.dart │ ├── home_drawer_header.dart │ ├── home_search_bar.dart │ ├── home_drawer_item.dart │ └── bookListCard.dart ├── common │ ├── localization │ │ ├── language │ │ │ ├── yd_string_base.dart │ │ │ ├── yd_string_en.dart │ │ │ └── yd_string_zh.dart │ │ ├── yd_localizations.dart │ │ └── yd_localizations_delegate.dart │ ├── style │ │ └── themes.dart │ ├── utils │ │ ├── common_utils.dart │ │ └── navigator_utils.dart │ ├── net │ │ ├── result_data.dart │ │ ├── interceptors │ │ │ ├── header_interceptor.dart │ │ │ ├── error_interceptor.dart │ │ │ ├── response_interceptor.dart │ │ │ ├── log_interceptor.dart │ │ │ └── token_interceptor.dart │ │ ├── code.dart │ │ ├── http_manager.dart │ │ └── address.dart │ ├── store │ │ ├── locale_state.dart │ │ ├── theme_data_state.dart │ │ ├── supported_locales_state.dart │ │ └── global_state.dart │ ├── local │ │ └── local_storage.dart │ ├── config │ │ └── config.dart │ └── routers │ │ └── anima_route.dart ├── fonts │ └── KTGB2312.ttf ├── images │ └── launcher-web.png ├── templates │ ├── rulelist.json │ └── booklist.json └── main.dart ├── android ├── 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 │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── reader │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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 │ ├── main.m │ ├── AppDelegate.m │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ ├── xcshareddata │ └── xcschemes │ │ └── Runner.xcscheme │ └── project.pbxproj ├── readme ├── index.jpg ├── launcher-web.png ├── icon_Legado_32px-42px.png └── icon_appstore_32px-42px.png ├── .metadata ├── README.md ├── test └── widget_test.dart ├── .gitignore ├── pubspec.yaml └── pubspec.lock /lib/lanugages/en.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/pages/about.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/pages/ruleList.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/pages/settings.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/lanugages/zh-CHS.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/lanugages/zh-CHT.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/pages/bookContent.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/pages/ruleEditor.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/widgets/bookDescriptionCard.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /lib/common/localization/language/yd_string_base.dart: -------------------------------------------------------------------------------- 1 | abstract class YDStringBase {} 2 | -------------------------------------------------------------------------------- /readme/index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/readme/index.jpg -------------------------------------------------------------------------------- /lib/fonts/KTGB2312.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/lib/fonts/KTGB2312.ttf -------------------------------------------------------------------------------- /readme/launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/readme/launcher-web.png -------------------------------------------------------------------------------- /lib/images/launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/lib/images/launcher-web.png -------------------------------------------------------------------------------- /readme/icon_Legado_32px-42px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/readme/icon_Legado_32px-42px.png -------------------------------------------------------------------------------- /readme/icon_appstore_32px-42px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/readme/icon_appstore_32px-42px.png -------------------------------------------------------------------------------- /lib/common/style/themes.dart: -------------------------------------------------------------------------------- 1 | class DrawerTheme {} 2 | 3 | class Themse { 4 | static final DrawerTheme drawerTheme = DrawerTheme(); 5 | } 6 | -------------------------------------------------------------------------------- /lib/common/localization/language/yd_string_en.dart: -------------------------------------------------------------------------------- 1 | import 'yd_string_base.dart'; 2 | 3 | class YDStringEn extends YDStringBase { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /lib/common/localization/language/yd_string_zh.dart: -------------------------------------------------------------------------------- 1 | import 'yd_string_base.dart'; 2 | 3 | class YDStringZh extends YDStringBase { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gedoor/LegadoFlutter/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/gedoor/LegadoFlutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/pages/discover.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DiscoverPage extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Center( 7 | child: new Text("发现页"), 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/common/utils/common_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class CommonUtils { 6 | static getThemeData(Color color) { 7 | return ThemeData(primarySwatch: color, platform: TargetPlatform.android); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/common/net/result_data.dart: -------------------------------------------------------------------------------- 1 | /** 2 | * 网络结果数据 3 | * Created by guoshuyu 4 | * Date: 2018-07-16 5 | */ 6 | class ResultData { 7 | var data; 8 | bool result; 9 | int code; 10 | var headers; 11 | 12 | ResultData(this.data, this.result, this.code, {this.headers}); 13 | } 14 | -------------------------------------------------------------------------------- /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-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /.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: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/common/net/interceptors/header_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | /** 4 | * header拦截器 5 | * Created by guoshuyu 6 | * on 2019/3/23. 7 | */ 8 | class HeaderInterceptors extends InterceptorsWrapper { 9 | 10 | 11 | @override 12 | onRequest(RequestOptions options) { 13 | ///超时 14 | options.connectTimeout = 15000; 15 | 16 | return options; 17 | } 18 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/reader/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.YueDuFlutter; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/common/store/locale_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:redux/redux.dart'; 3 | 4 | final localeReducer = combineReducers([ 5 | TypedReducer(_refresh), 6 | ]); 7 | 8 | Locale _refresh(Locale locale, RefreshLocaleAction action) { 9 | locale = action.locale; 10 | return locale; 11 | } 12 | 13 | class RefreshLocaleAction { 14 | final Locale locale; 15 | 16 | RefreshLocaleAction(this.locale); 17 | } 18 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /lib/common/net/code.dart: -------------------------------------------------------------------------------- 1 | ///错误编码 2 | class Code { 3 | ///网络错误 4 | static const NETWORK_ERROR = -1; 5 | 6 | ///网络超时 7 | static const NETWORK_TIMEOUT = -2; 8 | 9 | ///网络返回数据格式化一次 10 | static const NETWORK_JSON_EXCEPTION = -3; 11 | 12 | static const SUCCESS = 200; 13 | 14 | static errorHandleFunction(code, message, noTip) { 15 | if (noTip) { 16 | return message; 17 | } 18 | // eventBus.fire(new HttpErrorEvent(code, message)); 19 | return message; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/common/store/theme_data_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:redux/redux.dart'; 3 | 4 | final themeDataReducer = combineReducers([ 5 | TypedReducer(_reflash), 6 | ]); 7 | 8 | ThemeData _reflash(ThemeData themeData, RefreshThemeDataAction action) { 9 | themeData = action.themeData; 10 | return themeData; 11 | } 12 | 13 | class RefreshThemeDataAction { 14 | final ThemeData themeData; 15 | 16 | RefreshThemeDataAction(this.themeData); 17 | } 18 | -------------------------------------------------------------------------------- /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/common/store/supported_locales_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:redux/redux.dart'; 3 | 4 | final supportedLocalesReducer = combineReducers>([ 5 | TypedReducer, RefreshLocaleAction>(_refresh), 6 | ]); 7 | 8 | List _refresh(List supportedLocales, RefreshLocaleAction action) { 9 | supportedLocales = action.supportedLocales; 10 | return supportedLocales; 11 | } 12 | 13 | class RefreshLocaleAction { 14 | final List supportedLocales; 15 | 16 | RefreshLocaleAction(this.supportedLocales); 17 | } 18 | -------------------------------------------------------------------------------- /lib/common/local/local_storage.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | 3 | ///SharedPreferences 本地存储 4 | class LocalStorage { 5 | 6 | static save(String key, value) async { 7 | SharedPreferences prefs = await SharedPreferences.getInstance(); 8 | prefs.setString(key, value); 9 | } 10 | 11 | static get(String key) async { 12 | SharedPreferences prefs = await SharedPreferences.getInstance(); 13 | return prefs.get(key); 14 | } 15 | 16 | static remove(String key) async { 17 | SharedPreferences prefs = await SharedPreferences.getInstance(); 18 | prefs.remove(key); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/common/config/config.dart: -------------------------------------------------------------------------------- 1 | class Config { 2 | static const PAGE_SIZE = 20; 3 | static const DEBUG = true; 4 | 5 | /// //////////////////////////////////////常量////////////////////////////////////// /// 6 | static const TOKEN_KEY = "token"; 7 | static const USER_NAME_KEY = "user-name"; 8 | static const PW_KEY = "user-pw"; 9 | static const USER_BASIC_CODE = "user-basic-code"; 10 | static const USER_INFO = "user-info"; 11 | static const LANGUAGE_SELECT = "language-select"; 12 | static const LANGUAGE_SELECT_NAME = "language-select-name"; 13 | static const REFRESH_LANGUAGE = "refreshLanguageApp"; 14 | static const THEME_COLOR = "theme-color"; 15 | static const LOCALE = "locale"; 16 | } 17 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/common/net/interceptors/error_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/net/code.dart'; 2 | import 'package:YueDuFlutter/common/net/result_data.dart'; 3 | import 'package:connectivity/connectivity.dart'; 4 | import 'package:dio/dio.dart'; 5 | 6 | ///是否需要弹提示 7 | const NOT_TIP_KEY = "noTip"; 8 | 9 | /** 10 | * 错误拦截 11 | * Created by guoshuyu 12 | * on 2019/3/23. 13 | */ 14 | class ErrorInterceptors extends InterceptorsWrapper { 15 | final Dio _dio; 16 | 17 | ErrorInterceptors(this._dio); 18 | 19 | @override 20 | onRequest(RequestOptions options) async { 21 | //没有网络 22 | var connectivityResult = await (new Connectivity().checkConnectivity()); 23 | if (connectivityResult == ConnectivityResult.none) { 24 | return _dio.resolve(new ResultData(Code.errorHandleFunction(Code.NETWORK_ERROR, "", false), false, Code.NETWORK_ERROR)); 25 | } 26 | return options; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/common/net/interceptors/response_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | import '../code.dart'; 4 | import '../result_data.dart'; 5 | 6 | /** 7 | * Token拦截器 8 | * Created by guoshuyu 9 | * on 2019/3/23. 10 | */ 11 | class ResponseInterceptors extends InterceptorsWrapper { 12 | 13 | @override 14 | onResponse(Response response) { 15 | RequestOptions option = response.request; 16 | try { 17 | if (option.contentType != null && option.contentType.primaryType == "text") { 18 | return new ResultData(response.data, true, Code.SUCCESS); 19 | } 20 | if (response.statusCode == 200 || response.statusCode == 201) { 21 | return new ResultData(response.data, true, Code.SUCCESS, headers: response.headers); 22 | } 23 | } catch (e) { 24 | print(e.toString() + option.path); 25 | return new ResultData(response.data, false, response.statusCode, headers: response.headers); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | // google() 4 | // jcenter() 5 | maven { url 'https://maven.aliyun.com/repository/google' } 6 | maven { url 'https://maven.aliyun.com/repository/jcenter' } 7 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.2.1' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | // google() 18 | // jcenter() 19 | maven { url 'https://maven.aliyun.com/repository/google' } 20 | maven { url 'https://maven.aliyun.com/repository/jcenter' } 21 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } 22 | } 23 | } 24 | 25 | rootProject.buildDir = '../build' 26 | subprojects { 27 | project.buildDir = "${rootProject.buildDir}/${project.name}" 28 | } 29 | subprojects { 30 | project.evaluationDependsOn(':app') 31 | } 32 | 33 | task clean(type: Delete) { 34 | delete rootProject.buildDir 35 | } 36 | -------------------------------------------------------------------------------- /lib/common/localization/yd_localizations.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/store/global_state.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_redux/flutter_redux.dart'; 4 | 5 | class YDLocalizations extends StatefulWidget { 6 | final Widget child; 7 | YDLocalizations({Key key, this.child}) : super(key: key); 8 | @override 9 | State createState() => _YDLocalizations(); 10 | } 11 | 12 | class _YDLocalizations extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return new StoreBuilder(builder: (context, store){ 16 | return new Localizations.override( 17 | context: context, 18 | locale: store.state.locale, 19 | child: widget.child, 20 | ); 21 | }); 22 | } 23 | 24 | @override 25 | void initState() { 26 | // TODO: implement initState 27 | super.initState(); 28 | } 29 | 30 | 31 | @override 32 | void dispose() { 33 | // TODO: implement dispose 34 | super.dispose(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /lib/widgets/home_drawer_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HomeDrawerHeader extends StatelessWidget { 4 | final EdgeInsetsGeometry margin; 5 | final EdgeInsetsGeometry padding; 6 | 7 | final double height; 8 | final Widget child; 9 | 10 | const HomeDrawerHeader({ 11 | Key key, 12 | @required this.child, 13 | this.height = 80.0, 14 | this.margin = const EdgeInsets.only(bottom: 8.0), 15 | this.padding = const EdgeInsets.all(16.0), 16 | }) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | final double statusBarHeight = MediaQuery.of(context).padding.top; 21 | 22 | return Container( 23 | height: statusBarHeight + height, 24 | margin: margin, 25 | padding: padding.add(EdgeInsets.only(top: statusBarHeight)), 26 | alignment: Alignment.centerLeft, 27 | // decoration: BoxDecoration( 28 | // border: Border( 29 | // bottom: Divider.createBorderSide(context), 30 | // ), 31 | // ), 32 | child: child, 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/common/net/interceptors/log_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/config/config.dart'; 2 | import 'package:dio/dio.dart'; 3 | 4 | /** 5 | * Log 拦截器 6 | * Created by guoshuyu 7 | * on 2019/3/23. 8 | */ 9 | class LogsInterceptors extends InterceptorsWrapper { 10 | @override 11 | onRequest(RequestOptions options) { 12 | if (Config.DEBUG) { 13 | print("请求url:${options.path}"); 14 | print('请求头: ' + options.headers.toString()); 15 | if (options.data != null) { 16 | print('请求参数: ' + options.data.toString()); 17 | } 18 | } 19 | return options; 20 | } 21 | 22 | @override 23 | onResponse(Response response) { 24 | if (Config.DEBUG) { 25 | if (response != null) { 26 | print('返回参数: ' + response.toString()); 27 | } 28 | } 29 | return response; // continue 30 | } 31 | 32 | @override 33 | onError(DioError err) { 34 | if (Config.DEBUG) { 35 | print('请求异常: ' + err.toString()); 36 | print('请求异常信息: ' + err.response?.toString() ?? ""); 37 | } 38 | return err; 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # 3 | 4 | 5 | [![icon_appstore](./readme/icon_appstore_32px-42px.png)](https://www.apple.com.cn/app-store/) 6 | 7 |
8 | legado 9 | 10 | Legado / 开源阅读 11 |
12 | gedoor.github.io / legado.top 13 |
14 | Legado is a free and open source novel reader for iOS. 15 |
16 | 17 | [![](https://img.shields.io/badge/-Contents:-696969.svg)](#contents) [![](https://img.shields.io/badge/-Interface-F5F5F5.svg)](#Interface-界面-) 18 | 19 | >新用户? 20 | > 21 | >该软件正在开发中,如果您想立即体验,请查看 [Legado for Andorid](https://github.com/gedoor/legado). 22 | 23 | # Interface-界面 [![](https://img.shields.io/badge/-Interface-F5F5F5.svg)](#Interface-界面-) 24 | 25 | -------------------------------------------------------------------------------- /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:YueDuFlutter/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/pages/bookSearch.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/widgets/home_search_bar.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class BookSearchPage extends StatefulWidget { 5 | static final String sName = "/searchPage"; 6 | 7 | @override 8 | State createState() => _BookSearchPage(); 9 | } 10 | 11 | class _BookSearchPage extends State { 12 | List list = []; 13 | bool hadEnter = false; 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: homeSearchBar( 18 | placeholder: "搜索书名、作者", 19 | enabled: true, 20 | onSubmitted: (val) { 21 | if (val.length > 0) { 22 | this.setState(() { 23 | this.list.add("1"); 24 | this.hadEnter = true; 25 | }); 26 | } 27 | }, 28 | onChanged: (val) { 29 | this.setState(() { 30 | this.hadEnter = false; 31 | }); 32 | }, 33 | ), 34 | body: ListView.builder( 35 | itemBuilder: (context, idx) => 36 | list.length > 0 ? new Text("data") : null, 37 | itemCount: list.length, 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/common/localization/yd_localizations_delegate.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'language/yd_string_base.dart'; 5 | import 'language/yd_string_en.dart'; 6 | import 'language/yd_string_zh.dart'; 7 | 8 | class YDLocalizationsDelegate extends LocalizationsDelegate { 9 | @override 10 | bool isSupported(Locale locale) { 11 | return ['zh', 'en'].contains(locale.languageCode); 12 | } 13 | 14 | @override 15 | Future<_YDLocalizations> load(Locale locale) { 16 | return new SynchronousFuture<_YDLocalizations>(new _YDLocalizations(locale)); 17 | } 18 | 19 | @override 20 | bool shouldReload(LocalizationsDelegate old) { 21 | return false; 22 | } 23 | 24 | static YDLocalizationsDelegate delegate = new YDLocalizationsDelegate(); 25 | } 26 | 27 | class _YDLocalizations { 28 | final Locale locale; 29 | _YDLocalizations(this.locale); 30 | 31 | static Map _localizedValues = { 32 | 'en': new YDStringEn(), 33 | 'en': new YDStringZh(), 34 | }; 35 | 36 | YDStringBase get currentLocalized { 37 | if (_localizedValues.containsKey(locale.languageCode)) { 38 | return _localizedValues[locale.languageCode]; 39 | } 40 | return _localizedValues['en']; 41 | } 42 | 43 | static _YDLocalizations of(BuildContext context){ 44 | return Localizations.of(context, _YDLocalizations); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/common/store/global_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/store/locale_state.dart'; 2 | import 'package:YueDuFlutter/common/store/supported_locales_state.dart'; 3 | import 'package:YueDuFlutter/common/store/theme_data_state.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:redux/redux.dart'; 6 | 7 | class GlobalState { 8 | final Locale locale; 9 | Locale platformLocale; 10 | final ThemeData themeData; 11 | List supportedLocales; 12 | List bookList = [ 13 | { 14 | "bookName": "牧神记", 15 | "bookAuthor": "宅猪", 16 | "bookCover": "https://www.biqubao.com/cover/18/18569/18569s.jpg", 17 | "bookMark": "第一章 天黑别出门", 18 | "bookLastChapter": "第一五零五章 道问", 19 | "bookUnreadCount": 1572 - 1, 20 | "hasUpdate": true, 21 | }, 22 | { 23 | "bookName": "牧神记", 24 | "bookAuthor": "宅猪", 25 | "bookCover": "https://www.biqubao.com/cover/18/18569/18569s.jpg", 26 | "bookMark": "第一章 天黑别出门", 27 | "bookLastChapter": "第一五零五章 道问", 28 | "bookUnreadCount": 1572 - 1, 29 | "hasUpdate": true, 30 | } 31 | ]; 32 | GlobalState({this.locale, this.supportedLocales, this.themeData}); 33 | } 34 | 35 | GlobalState appReducer(GlobalState state, action) { 36 | return GlobalState( 37 | locale: localeReducer(state.locale, action), 38 | themeData: themeDataReducer(state.themeData, action), 39 | supportedLocales: supportedLocalesReducer(state.supportedLocales, action), 40 | ); 41 | } 42 | 43 | final List> middleware = []; 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | YueDuFlutter 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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/common/routers/anima_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///动画大小变化打开的路由 4 | class SizeRoute extends PageRouteBuilder { 5 | final Widget widget; 6 | 7 | SizeRoute({this.widget}) 8 | : super( 9 | pageBuilder: ( 10 | BuildContext context, 11 | Animation animation, 12 | Animation secondaryAnimation, 13 | ) => 14 | widget, 15 | transitionsBuilder: ( 16 | BuildContext context, 17 | Animation animation, 18 | Animation secondaryAnimation, 19 | Widget child, 20 | ) => 21 | Align( 22 | child: SizeTransition( 23 | sizeFactor: animation, 24 | child: child, 25 | ), 26 | ), 27 | ); 28 | } 29 | 30 | class NoAnimationRoute extends PageRouteBuilder { 31 | final Widget widget; 32 | 33 | NoAnimationRoute({this.widget}) 34 | : super( 35 | pageBuilder: ( 36 | BuildContext context, 37 | Animation animation, 38 | Animation secondaryAnimation, 39 | ) => 40 | widget, 41 | transitionsBuilder: ( 42 | BuildContext context, 43 | Animation animation, 44 | Animation secondaryAnimation, 45 | Widget child, 46 | ) => 47 | new SlideTransition( 48 | position: new Tween( 49 | begin: const Offset(0.0, 0.0), 50 | end: const Offset(0.0, 0.0), 51 | ).animate(animation), 52 | child: child, 53 | ), 54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /lib/common/utils/navigator_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | /** 7 | * 导航栏 8 | * Created by guoshuyu 9 | * Date: 2018-07-16 10 | */ 11 | class NavigatorUtils { 12 | ///替换 13 | static pushReplacementNamed(BuildContext context, String routeName) { 14 | Navigator.pushReplacementNamed(context, routeName); 15 | } 16 | 17 | ///切换无参数页面 18 | static pushNamed(BuildContext context, String routeName, [dynamic args]) { 19 | Navigator.pushNamed(context, routeName, arguments: args); 20 | } 21 | 22 | ///公共打开方式 23 | static navigatorRouter(BuildContext context, Widget widget) { 24 | return Navigator.push(context, 25 | new CupertinoPageRoute(builder: (context) => pageContainer(widget))); 26 | } 27 | 28 | ///Page页面的容器,做一次通用自定义 29 | static Widget pageContainer(widget) { 30 | ///不受系统字体缩放影响 31 | return MediaQuery( 32 | data: MediaQueryData.fromWindow(WidgetsBinding.instance.window) 33 | .copyWith(textScaleFactor: 1), 34 | child: widget); 35 | } 36 | 37 | ///弹出 dialog 38 | static Future showYDDialog({ 39 | @required BuildContext context, 40 | bool barrierDismissible = true, 41 | WidgetBuilder builder, 42 | }) { 43 | return showDialog( 44 | context: context, 45 | barrierDismissible: barrierDismissible, 46 | builder: (context) { 47 | ///不受系统字体缩放影响 48 | return MediaQuery( 49 | data: MediaQueryData.fromWindow(WidgetsBinding.instance.window) 50 | .copyWith(textScaleFactor: 1), 51 | child: new SafeArea(child: builder(context))); 52 | }); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/templates/rulelist.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "bookSourceName": "笔趣宝", 4 | "bookSourceGroup": "XPath; 优+", 5 | "bookSourceUrl": "https://www.biqubao.com", 6 | "loginUrl": "", 7 | "ruleFindUrl": "", 8 | "ruleSearchUrl": "https://www.biqubao.com/search.php?keyword=searchKey&page=searchPage", 9 | "ruleSearchList": "//*[@class=\"result-list\"]/div", 10 | "ruleSearchName": "//h3/a/@title", 11 | "ruleSearchAuthor": "//*[contains(text(), \"作者\")]/following-sibling::*/text()", 12 | "ruleSearchKind": "//*[contains(text(), \"类型\")]/following-sibling::*/text()", 13 | "ruleSearchLastChapter": "//*[contains(text(), \"最新章节\")]/following-sibling::*/text()", 14 | "ruleSearchCoverUrl": "//img/@src", 15 | "ruleSearchNoteUrl": "//h3/a/@href", 16 | "ruleBookUrlPattern": "", 17 | "ruleBookName": "//*[@property=\"og:title\"]/@content", 18 | "ruleBookAuthor": "//*[@property=\"og:novel:author\"]/@content", 19 | "ruleBookKind": "//*[@property=\"og:novel:category\"]/@content", 20 | "ruleBookLastChapter": "//*[@property=\"og:novel:latest_chapter_name\"]/@content", 21 | "ruleCoverUrl": "//*[@property=\"og:image\"]/@content", 22 | "ruleIntroduce": "//*[@property=\"og:description\"]/@content", 23 | "ruleChapterUrl": "", 24 | "ruleChapterList": "//*[@id=\"list\"]//dd/a", 25 | "ruleChapterUrlNext": "", 26 | "ruleChapterName": "//text()", 27 | "ruleContentUrl": "//@href", 28 | "ruleContentUrlNext": "", 29 | "ruleBookContent": "//*[@id=\"content\"]", 30 | "httpUserAgent": "", 31 | "enable": true, 32 | "serialNumber": 0, 33 | "weight": 0 34 | } 35 | ] -------------------------------------------------------------------------------- /lib/common/net/interceptors/token_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/config/config.dart'; 2 | import 'package:YueDuFlutter/common/local/local_storage.dart'; 3 | import 'package:dio/dio.dart'; 4 | 5 | /** 6 | * Token拦截器 7 | * Created by guoshuyu 8 | * on 2019/3/23. 9 | */ 10 | class TokenInterceptors extends InterceptorsWrapper { 11 | 12 | String _token; 13 | 14 | @override 15 | onRequest(RequestOptions options) async { 16 | //授权码 17 | if (_token == null) { 18 | var authorizationCode = await getAuthorization(); 19 | if (authorizationCode != null) { 20 | _token = authorizationCode; 21 | } 22 | } 23 | options.headers["Authorization"] = _token; 24 | return options; 25 | } 26 | 27 | 28 | @override 29 | onResponse(Response response) async{ 30 | try { 31 | var responseJson = response.data; 32 | if (response.statusCode == 201 && responseJson["token"] != null) { 33 | _token = 'token ' + responseJson["token"]; 34 | await LocalStorage.save(Config.TOKEN_KEY, _token); 35 | } 36 | } catch (e) { 37 | print(e); 38 | } 39 | return response; 40 | } 41 | 42 | ///清除授权 43 | clearAuthorization() { 44 | this._token = null; 45 | LocalStorage.remove(Config.TOKEN_KEY); 46 | } 47 | 48 | ///获取授权token 49 | getAuthorization() async { 50 | String token = await LocalStorage.get(Config.TOKEN_KEY); 51 | if (token == null) { 52 | String basic = await LocalStorage.get(Config.USER_BASIC_CODE); 53 | if (basic == null) { 54 | //提示输入账号密码 55 | } else { 56 | //通过 basic 去获取token,获取到设置,返回token 57 | return "Basic $basic"; 58 | } 59 | } else { 60 | this._token = token; 61 | return token; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/pages/bookSearch.dart'; 2 | import 'package:YueDuFlutter/pages/home.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_localizations/flutter_localizations.dart'; 5 | import 'package:flutter_redux/flutter_redux.dart'; 6 | import 'package:redux/redux.dart'; 7 | 8 | import 'common/localization/yd_localizations.dart'; 9 | import 'common/store/global_state.dart'; 10 | 11 | // App主入口 12 | void main() => runApp(MyApp()); 13 | 14 | class MyApp extends StatelessWidget { 15 | final store = new Store( 16 | appReducer, 17 | middleware: middleware, 18 | initialState: new GlobalState( 19 | themeData: ThemeData( 20 | primaryColor: Color(0xFF666666), 21 | ), 22 | locale: Locale('zh', 'CH'), 23 | ), 24 | ); 25 | 26 | MyApp({Key key}) : super(key: key); 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return new StoreProvider( 31 | store: store, 32 | child: new StoreBuilder(builder: (context, store) { 33 | return MaterialApp( 34 | title: '阅读', 35 | // theme: ThemeData(primaryColor: Color(0xFF666666)), 36 | localizationsDelegates: [ 37 | GlobalMaterialLocalizations.delegate, 38 | GlobalWidgetsLocalizations.delegate 39 | ], 40 | locale: store.state.locale, 41 | supportedLocales: [store.state.locale], 42 | theme: store.state.themeData, 43 | routes: { 44 | HomePage.sName: (context) { 45 | store.state.platformLocale = 46 | WidgetsBinding.instance.window.locale; 47 | return new YDLocalizations(child: HomePage()); 48 | }, 49 | BookSearchPage.sName: (context){ 50 | return new YDLocalizations(child: BookSearchPage()); 51 | } 52 | }, 53 | // home: MainPage(), 54 | ); 55 | }), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.YueDuFlutter" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: YueDuFlutter 2 | description: 致力于优质的阅读体验! 3 | 4 | # 以下定义了应用程序的版本号和内部版本号。 5 | # 版本号是由点分隔的三个数字组成,如 1.2.43 6 | # 后跟一个用 + 分隔的可选构建号。 7 | # 通过分别指定 --build-name 和 --build-number ,可以在 flutter 构建中覆盖版本号和构建器号。 8 | # 在 Android 中,build-name 用作 versionName ,而 build-number 用作 versionCode。 9 | # 阅读更多关于Android版本的信息 https://developer.android.com/studio/publish/versioning 10 | # 在 iOS 中, build-name 用作 CFBundleShortVersionString ,而 build-number 用作 CFBundleVersion 。 11 | # 阅读更多关于iOS版本的信息 12 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 13 | version: 1.0.0+1 14 | 15 | environment: 16 | sdk: ">=2.1.0 <3.0.0" 17 | 18 | dependencies: 19 | flutter: 20 | sdk: flutter 21 | flutter_localizations: 22 | sdk: flutter 23 | # 以下内容将 Cupertino Icons 字体添加到您的应用程序中。 24 | # 与 CupertinoIcons 类一起使用,用于iOS样式图标。 25 | cupertino_icons: ^0.1.2 26 | dio: ^2.1.13 27 | flutter_redux: ^0.5.3 28 | fluttertoast: ^3.1.0 29 | json_annotation: ^3.0.0 30 | shared_preferences: ^0.5.3+4 31 | connectivity: ^0.4.3+7 32 | 33 | dev_dependencies: 34 | flutter_test: 35 | sdk: flutter 36 | flutter_localizations: 37 | sdk: flutter 38 | 39 | 40 | 41 | # 有关此文件的通用Dart部分的信息,请参阅以下页面 42 | # https://www.dartlang.org/tools/pub/pubspec 43 | 44 | # 以下部分专门针对 Flutter 45 | flutter: 46 | 47 | # 以下行确保应用程序中包含“材质图标”字体,以便您可以使用材质“图标”类中的图标。 48 | uses-material-design: true 49 | 50 | # 要向应用程序添加资源,请添加资源部分,如下所示: 51 | assets: 52 | - lib/images/ 53 | # - images/a_dot_ham.jpeg 54 | 55 | # 图像资源可以指一个或多个特定于分辨率的“变体”,请参阅 56 | # https://flutter.io/assets-and-images/#resolution-aware. 57 | 58 | # 有关从包依赖项添加资源的详细信息,请参阅 59 | # https://flutter.io/assets-and-images/#from-packages 60 | 61 | # 要在应用程序中添加自定义字体,请在此处“ flutter ”部分中添加字体部分。 62 | # 此列表中的每个条目都应具有带有字体系列名称的“族”键,以及带有列表的“ fonts ”键, 63 | # 该列表给出该字体的资产和其他描述符。 例如: 64 | fonts: 65 | - family: KTGB2312 66 | fonts: 67 | - asset: lib/fonts/KTGB2312.ttf 68 | # - family: Trajan Pro 69 | # fonts: 70 | # - asset: fonts/TrajanPro.ttf 71 | # - asset: fonts/TrajanPro_Bold.ttf 72 | # weight: 700 73 | # 74 | # 有关包依赖关系中的字体的详细信息,请参阅 75 | # https://flutter.io/custom-fonts/#from-packages 76 | -------------------------------------------------------------------------------- /lib/pages/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/store/global_state.dart'; 2 | import 'package:YueDuFlutter/common/utils/navigator_utils.dart'; 3 | import 'package:YueDuFlutter/pages/discover.dart'; 4 | import 'package:YueDuFlutter/pages/home_drawer.dart'; 5 | import 'package:YueDuFlutter/widgets/bookListCard.dart'; 6 | import 'package:YueDuFlutter/widgets/home_search_bar.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_redux/flutter_redux.dart'; 9 | 10 | import 'bookSearch.dart'; 11 | 12 | /// 主页 13 | class HomePage extends StatelessWidget { 14 | static final String sName = "/"; 15 | 16 | _renderItem(list, idx) { 17 | return BookCard(BookCardModel.fromMap(list[idx])); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return StoreConnector( 23 | converter: (store) => store.state.bookList, 24 | builder: (context, bookList) { 25 | return DefaultTabController( 26 | length: 2, 27 | child: Scaffold( 28 | appBar: homeSearchBar( 29 | placeholder: "搜索书名、作者", 30 | enabled: false, 31 | onTap: () { 32 | print(1111); 33 | NavigatorUtils.pushNamed(context, BookSearchPage.sName); 34 | }, 35 | bottom: TabBar( 36 | labelColor: Colors.grey, 37 | tabs: [ 38 | Tab( 39 | text: '书架', 40 | ), 41 | Tab( 42 | text: '发现', 43 | ), 44 | ], 45 | ), 46 | ), 47 | drawer: HomeDrawer(), 48 | // 主体body部分 49 | body: Container( 50 | padding: EdgeInsets.only(top: 3), 51 | color: Color(0xFFFFFFFF), 52 | child: TabBarView( 53 | children: [ 54 | ListView.builder( 55 | itemBuilder: (context, index) => bookList.length > 0 56 | ? _renderItem(bookList, index) 57 | : null, 58 | itemCount: bookList.length, 59 | ), 60 | DiscoverPage() 61 | ], 62 | ), 63 | ), 64 | ), 65 | ); 66 | }, 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/templates/booklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "booklist": [ 3 | { 4 | "bookRule": "笔趣宝", 5 | "bookName": "书籍名称", 6 | "bookAuthor": "书籍作者", 7 | "bookCover": "书籍封面base64", 8 | "bookIntroduce": "书籍简介", 9 | "bookIndexUrl": "http://书籍简介页", 10 | "bookChapterUrl": "http://书籍目录页", 11 | "bookChapterList": [ 12 | {"章节名": "http://章节地址"} 13 | ], 14 | "bookReadChapter": "章节名", 15 | "bookReadProgress": 8, 16 | "bookReadMark": { 17 | "章节名": "http://章节地址" 18 | } 19 | } 20 | ], 21 | "rulelist": [ 22 | { 23 | "bookSourceName": "笔趣宝", 24 | "bookSourceGroup": "XPath; 优+", 25 | "bookSourceUrl": "https://www.biqubao.com", 26 | "loginUrl": "", 27 | "ruleFindUrl": "", 28 | "ruleSearchUrl": "https://www.biqubao.com/search.php?keyword=searchKey&page=searchPage", 29 | "ruleSearchList": "//*[@class=\"result-list\"]/div", 30 | "ruleSearchName": "//h3/a/@title", 31 | "ruleSearchAuthor": "//*[contains(text(), \"作者\")]/following-sibling::*/text()", 32 | "ruleSearchKind": "//*[contains(text(), \"类型\")]/following-sibling::*/text()", 33 | "ruleSearchLastChapter": "//*[contains(text(), \"最新章节\")]/following-sibling::*/text()", 34 | "ruleSearchCoverUrl": "//img/@src", 35 | "ruleSearchNoteUrl": "//h3/a/@href", 36 | "ruleBookUrlPattern": "", 37 | "ruleBookName": "//*[@property=\"og:title\"]/@content", 38 | "ruleBookAuthor": "//*[@property=\"og:novel:author\"]/@content", 39 | "ruleBookKind": "//*[@property=\"og:novel:category\"]/@content", 40 | "ruleBookLastChapter": "//*[@property=\"og:novel:latest_chapter_name\"]/@content", 41 | "ruleCoverUrl": "//*[@property=\"og:image\"]/@content", 42 | "ruleIntroduce": "//*[@property=\"og:description\"]/@content", 43 | "ruleChapterUrl": "", 44 | "ruleChapterList": "//*[@id=\"list\"]//dd/a", 45 | "ruleChapterUrlNext": "", 46 | "ruleChapterName": "//text()", 47 | "ruleContentUrl": "//@href", 48 | "ruleContentUrlNext": "", 49 | "ruleBookContent": "//*[@id=\"content\"]", 50 | "httpUserAgent": "", 51 | "enable": true, 52 | "serialNumber": 0, 53 | "weight": 0 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /lib/common/net/http_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | import 'dart:collection'; 4 | 5 | import 'code.dart'; 6 | import 'interceptors/error_interceptor.dart'; 7 | import 'interceptors/header_interceptor.dart'; 8 | import 'interceptors/log_interceptor.dart'; 9 | import 'interceptors/response_interceptor.dart'; 10 | import 'interceptors/token_interceptor.dart'; 11 | import 'result_data.dart'; 12 | 13 | 14 | ///http请求 15 | class HttpManager { 16 | static const CONTENT_TYPE_JSON = "application/json"; 17 | static const CONTENT_TYPE_FORM = "application/x-www-form-urlencoded"; 18 | 19 | static final Dio _dio = new Dio(); // 使用默认配置 20 | 21 | final TokenInterceptors _tokenInterceptors = new TokenInterceptors(); 22 | 23 | HttpManager() { 24 | _dio.interceptors.add(new HeaderInterceptors()); 25 | 26 | _dio.interceptors.add(_tokenInterceptors); 27 | 28 | _dio.interceptors.add(new LogsInterceptors()); 29 | 30 | _dio.interceptors.add(new ErrorInterceptors(_dio)); 31 | 32 | _dio.interceptors.add(new ResponseInterceptors()); 33 | } 34 | 35 | ///发起网络请求 36 | ///[ url] 请求url 37 | ///[ params] 请求参数 38 | ///[ header] 外加头 39 | ///[ option] 配置 40 | netFetch(url, params, Map header, Options option, {noTip = false}) async { 41 | Map headers = new HashMap(); 42 | if (header != null) { 43 | headers.addAll(header); 44 | } 45 | 46 | if (option != null) { 47 | option.headers = headers; 48 | } else { 49 | option = new Options(method: "get"); 50 | option.headers = headers; 51 | } 52 | 53 | resultError(DioError e) { 54 | Response errorResponse; 55 | if (e.response != null) { 56 | errorResponse = e.response; 57 | } else { 58 | errorResponse = new Response(statusCode: 666); 59 | } 60 | if (e.type == DioErrorType.CONNECT_TIMEOUT || e.type == DioErrorType.RECEIVE_TIMEOUT) { 61 | errorResponse.statusCode = Code.NETWORK_TIMEOUT; 62 | } 63 | return new ResultData(Code.errorHandleFunction(errorResponse.statusCode, e.message, noTip), false, errorResponse.statusCode); 64 | } 65 | 66 | Response response; 67 | try { 68 | response = await _dio.request(url, data: params, options: option); 69 | } on DioError catch (e) { 70 | return resultError(e); 71 | } 72 | if(response.data is DioError) { 73 | return resultError(response.data); 74 | } 75 | return response.data; 76 | } 77 | 78 | ///清除授权 79 | clearAuthorization() { 80 | _tokenInterceptors.clearAuthorization(); 81 | } 82 | 83 | ///获取授权token 84 | getAuthorization() async { 85 | return _tokenInterceptors.getAuthorization(); 86 | } 87 | } 88 | 89 | final HttpManager httpManager = new HttpManager(); 90 | -------------------------------------------------------------------------------- /lib/widgets/home_search_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum _MenuItem { 4 | addLocal, 5 | addWeb, 6 | cache, 7 | view, 8 | makeup, 9 | webService, 10 | } 11 | 12 | /// 搜索栏部件(完全不能使用,需要另寻其它办法) 13 | AppBar homeSearchBar({ 14 | String placeholder, 15 | void Function() onTap, 16 | void Function(String) onChanged, 17 | void Function(String) onSubmitted, 18 | bool enabled = false, 19 | PreferredSizeWidget bottom, 20 | }) { 21 | Widget content = TextField( 22 | enabled: enabled, 23 | autofocus: enabled, 24 | decoration: InputDecoration( 25 | fillColor: Color.fromARGB(0, 0, 0, 0), 26 | hintText: placeholder, 27 | filled: true, 28 | isDense: true, 29 | hintStyle: TextStyle(fontSize: 15), 30 | border: InputBorder.none, 31 | ), 32 | onSubmitted: onSubmitted, 33 | onChanged: onChanged, 34 | ); 35 | 36 | content = Container( 37 | height: kToolbarHeight - 12, 38 | decoration: BoxDecoration( 39 | color: Color.fromARGB(55, 128, 128, 128), 40 | borderRadius: BorderRadius.all(Radius.circular(5))), 41 | padding: EdgeInsets.only(left: 12, right: 12), 42 | child: Row( 43 | children: [ 44 | Icon(Icons.search), 45 | Expanded( 46 | child: content, 47 | ), 48 | Icon(Icons.keyboard_arrow_right) 49 | ], 50 | ), 51 | ); 52 | 53 | content = GestureDetector( 54 | child: content, 55 | onTap: onTap, 56 | ); 57 | 58 | return AppBar( 59 | iconTheme: IconThemeData(color: Colors.grey), 60 | backgroundColor: Colors.white, 61 | title: content, 62 | actions: [ 63 | PopupMenuButton<_MenuItem>( 64 | onSelected: (_MenuItem result) { 65 | print(result); 66 | }, 67 | icon: Icon(Icons.more_vert), 68 | itemBuilder: (BuildContext context) => >[ 69 | const PopupMenuItem<_MenuItem>( 70 | value: _MenuItem.addLocal, 71 | child: Text('添加本地'), 72 | ), 73 | const PopupMenuItem<_MenuItem>( 74 | value: _MenuItem.addWeb, 75 | child: Text('添加网址'), 76 | ), 77 | const PopupMenuItem<_MenuItem>( 78 | value: _MenuItem.cache, 79 | child: Text('一键缓存'), 80 | ), 81 | const PopupMenuItem<_MenuItem>( 82 | value: _MenuItem.view, 83 | child: Text('网格视图'), 84 | ), 85 | const PopupMenuItem<_MenuItem>( 86 | value: _MenuItem.makeup, 87 | child: Text('整理书架'), 88 | ), 89 | const PopupMenuItem<_MenuItem>( 90 | value: _MenuItem.webService, 91 | child: Text('Web服务'), 92 | ), 93 | ], 94 | ), 95 | ], 96 | bottom: bottom, 97 | ); 98 | } 99 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widgets/home_drawer_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HomeDrawerItem extends StatelessWidget { 4 | final EdgeInsetsGeometry padding; 5 | final EdgeInsetsGeometry margin; 6 | final Widget leading; 7 | final Widget title; 8 | final void Function(String data) onTap; 9 | final Widget trailing; 10 | final Color color; 11 | final Color line; 12 | final bool bottom; 13 | 14 | const HomeDrawerItem({ 15 | Key key, 16 | this.padding = const EdgeInsets.all(12.0), 17 | this.margin, 18 | @required this.leading, 19 | @required this.title, 20 | this.onTap, 21 | this.trailing, 22 | this.color = Colors.white, 23 | this.line, 24 | this.bottom = false, 25 | }) : super(key: key); 26 | @override 27 | Widget build(BuildContext context) { 28 | return trailing != null 29 | ? new Container( 30 | padding: padding, 31 | margin: margin, 32 | decoration: BoxDecoration( 33 | color: color, 34 | border: Border( 35 | bottom: BorderSide( 36 | color: line ?? Theme.of(context).dividerColor, 37 | ), 38 | ), 39 | ), 40 | child: new Row( 41 | children: [ 42 | Expanded( 43 | child: GestureDetector( 44 | child: Container( 45 | color: color, 46 | child: new Row( 47 | children: [ 48 | leading, 49 | Padding( 50 | padding: EdgeInsets.only(left: 10), 51 | child: title, 52 | ), 53 | ], 54 | ), 55 | ), 56 | onTap: () { 57 | onTap('left'); 58 | }, 59 | ), 60 | ), 61 | Expanded( 62 | child: GestureDetector( 63 | child: Container( 64 | alignment: Alignment.centerRight, 65 | color: color, 66 | child: trailing, 67 | ), 68 | onTap: () { 69 | onTap('right'); 70 | }, 71 | ), 72 | ), 73 | ], 74 | ), 75 | ) 76 | : new GestureDetector( 77 | child: Container( 78 | padding: padding, 79 | margin: margin, 80 | decoration: BoxDecoration( 81 | color: color, 82 | border: Border( 83 | bottom: BorderSide( 84 | color: line ?? Theme.of(context).dividerColor, 85 | ), 86 | ), 87 | ), 88 | child: Row( 89 | children: [ 90 | leading, 91 | Padding( 92 | padding: EdgeInsets.only(left: 10), 93 | child: title, 94 | ), 95 | ], 96 | ), 97 | ), 98 | onTap: () { 99 | onTap("left"); 100 | }, 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/pages/home_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/store/global_state.dart'; 2 | import 'package:YueDuFlutter/widgets/home_drawer_header.dart'; 3 | import 'package:YueDuFlutter/widgets/home_drawer_item.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_redux/flutter_redux.dart'; 6 | 7 | /** 8 | * 主页drawer 9 | * Created by guoshuyu 10 | * Date: 2018-07-18 11 | */ 12 | class HomeDrawer extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Material( 16 | child: new StoreBuilder( 17 | builder: (context, store) { 18 | return new Drawer( 19 | child: new Container( 20 | color: store.state.themeData.primaryColor, 21 | child: new SingleChildScrollView( 22 | child: Container( 23 | constraints: new BoxConstraints( 24 | minHeight: MediaQuery.of(context).size.height), 25 | child: new Material( 26 | color: Color(0xFFFFFFFF), 27 | child: new Column( 28 | children: [ 29 | new HomeDrawerHeader( 30 | child: new Text( 31 | "阅读", 32 | style: TextStyle(fontSize: 30), 33 | ), 34 | ), 35 | new HomeDrawerItem( 36 | leading: Icon(Icons.color_lens), 37 | title: new Text("书源管理"), 38 | onTap: (str) { 39 | print(str); 40 | }, 41 | ), 42 | new HomeDrawerItem( 43 | leading: Icon(Icons.color_lens), 44 | title: new Text("替换净化"), 45 | onTap: (str) { 46 | print("content"); 47 | }, 48 | ), 49 | new HomeDrawerItem( 50 | leading: Icon(Icons.color_lens), 51 | title: new Text("下载任务"), 52 | bottom: true, 53 | onTap: (str) { 54 | print("content"); 55 | }, 56 | ), 57 | new HomeDrawerItem( 58 | leading: Icon(Icons.color_lens), 59 | title: new Text("主题"), 60 | trailing: Icon(Icons.brightness_2), 61 | bottom: true, 62 | onTap: (str) { 63 | print("content $str"); 64 | }, 65 | ), 66 | new HomeDrawerItem( 67 | leading: Icon(Icons.settings), 68 | title: new Text("设置"), 69 | // dense: true, 70 | onTap: (str) { 71 | print("content"); 72 | }, 73 | ), 74 | new HomeDrawerItem( 75 | leading: Icon(Icons.help), 76 | title: new Text("关于"), 77 | onTap: (str) { 78 | print("content"); 79 | }, 80 | ), 81 | new HomeDrawerItem( 82 | leading: Icon(Icons.color_lens), 83 | title: new Text("捐赠"), 84 | bottom: true, 85 | onTap: (str) { 86 | print("content"); 87 | }, 88 | ), 89 | new HomeDrawerItem( 90 | leading: Icon(Icons.color_lens), 91 | title: new Text("备份"), 92 | onTap: (str) { 93 | print("content"); 94 | }, 95 | ), 96 | new HomeDrawerItem( 97 | leading: Icon(Icons.color_lens), 98 | title: new Text("恢复"), 99 | onTap: (str) { 100 | print("content $str"); 101 | }, 102 | ), 103 | ], 104 | ), 105 | ), 106 | ), 107 | ), 108 | ), 109 | ); 110 | }, 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.2.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.14.11" 32 | connectivity: 33 | dependency: "direct main" 34 | description: 35 | name: connectivity 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "0.4.3+7" 39 | cookie_jar: 40 | dependency: transitive 41 | description: 42 | name: cookie_jar 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.0.1" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "0.1.2" 53 | dio: 54 | dependency: "direct main" 55 | description: 56 | name: dio 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "2.1.13" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_localizations: 66 | dependency: "direct main" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | flutter_redux: 71 | dependency: "direct main" 72 | description: 73 | name: flutter_redux 74 | url: "https://pub.flutter-io.cn" 75 | source: hosted 76 | version: "0.5.3" 77 | flutter_test: 78 | dependency: "direct dev" 79 | description: flutter 80 | source: sdk 81 | version: "0.0.0" 82 | fluttertoast: 83 | dependency: "direct main" 84 | description: 85 | name: fluttertoast 86 | url: "https://pub.flutter-io.cn" 87 | source: hosted 88 | version: "3.1.0" 89 | intl: 90 | dependency: transitive 91 | description: 92 | name: intl 93 | url: "https://pub.flutter-io.cn" 94 | source: hosted 95 | version: "0.15.8" 96 | json_annotation: 97 | dependency: "direct main" 98 | description: 99 | name: json_annotation 100 | url: "https://pub.flutter-io.cn" 101 | source: hosted 102 | version: "3.0.0" 103 | matcher: 104 | dependency: transitive 105 | description: 106 | name: matcher 107 | url: "https://pub.flutter-io.cn" 108 | source: hosted 109 | version: "0.12.5" 110 | meta: 111 | dependency: transitive 112 | description: 113 | name: meta 114 | url: "https://pub.flutter-io.cn" 115 | source: hosted 116 | version: "1.1.6" 117 | path: 118 | dependency: transitive 119 | description: 120 | name: path 121 | url: "https://pub.flutter-io.cn" 122 | source: hosted 123 | version: "1.6.2" 124 | pedantic: 125 | dependency: transitive 126 | description: 127 | name: pedantic 128 | url: "https://pub.flutter-io.cn" 129 | source: hosted 130 | version: "1.7.0" 131 | quiver: 132 | dependency: transitive 133 | description: 134 | name: quiver 135 | url: "https://pub.flutter-io.cn" 136 | source: hosted 137 | version: "2.0.3" 138 | redux: 139 | dependency: transitive 140 | description: 141 | name: redux 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "3.0.0" 145 | shared_preferences: 146 | dependency: "direct main" 147 | description: 148 | name: shared_preferences 149 | url: "https://pub.flutter-io.cn" 150 | source: hosted 151 | version: "0.5.3+4" 152 | sky_engine: 153 | dependency: transitive 154 | description: flutter 155 | source: sdk 156 | version: "0.0.99" 157 | source_span: 158 | dependency: transitive 159 | description: 160 | name: source_span 161 | url: "https://pub.flutter-io.cn" 162 | source: hosted 163 | version: "1.5.5" 164 | stack_trace: 165 | dependency: transitive 166 | description: 167 | name: stack_trace 168 | url: "https://pub.flutter-io.cn" 169 | source: hosted 170 | version: "1.9.3" 171 | stream_channel: 172 | dependency: transitive 173 | description: 174 | name: stream_channel 175 | url: "https://pub.flutter-io.cn" 176 | source: hosted 177 | version: "2.0.0" 178 | string_scanner: 179 | dependency: transitive 180 | description: 181 | name: string_scanner 182 | url: "https://pub.flutter-io.cn" 183 | source: hosted 184 | version: "1.0.4" 185 | term_glyph: 186 | dependency: transitive 187 | description: 188 | name: term_glyph 189 | url: "https://pub.flutter-io.cn" 190 | source: hosted 191 | version: "1.1.0" 192 | test_api: 193 | dependency: transitive 194 | description: 195 | name: test_api 196 | url: "https://pub.flutter-io.cn" 197 | source: hosted 198 | version: "0.2.5" 199 | typed_data: 200 | dependency: transitive 201 | description: 202 | name: typed_data 203 | url: "https://pub.flutter-io.cn" 204 | source: hosted 205 | version: "1.1.6" 206 | vector_math: 207 | dependency: transitive 208 | description: 209 | name: vector_math 210 | url: "https://pub.flutter-io.cn" 211 | source: hosted 212 | version: "2.0.8" 213 | sdks: 214 | dart: ">=2.3.0 <3.0.0" 215 | flutter: ">=1.5.0 <2.0.0" 216 | -------------------------------------------------------------------------------- /lib/widgets/bookListCard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | 4 | /// 卡片内容构造 5 | class BookCard extends StatelessWidget { 6 | final BookCardModel bookCardModel; 7 | 8 | BookCard(this.bookCardModel) : super(); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | // 修饰容器 14 | decoration: BoxDecoration( 15 | color: Color(0x40666666), // 背景色 16 | borderRadius: BorderRadius.all(Radius.circular(6.0)), // 边框样式 17 | ), 18 | margin: EdgeInsets.symmetric(vertical: 1.0, horizontal: 2.0), // 外边距 19 | padding: EdgeInsets.all(4.0), // 内间距 20 | child: Row( 21 | children: [ 22 | // 书籍封面 23 | ClipRRect( 24 | borderRadius: BorderRadius.circular(4.0), 25 | child: Image.network( 26 | "${bookCardModel.bookCover}", 27 | width: 60.0, 28 | height: 80.0, 29 | fit: BoxFit.fill, 30 | ), 31 | ), 32 | // 书籍信息 33 | Expanded( 34 | child: Container( 35 | margin: EdgeInsets.only(left: 6.0), 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | children: [ 39 | Container( 40 | margin: EdgeInsets.only(bottom: 4.0), 41 | child: Row( 42 | children: [ 43 | // 书籍名称 44 | Expanded( 45 | child: Text( 46 | "${bookCardModel.bookName}", 47 | style: TextStyle( 48 | fontFamily: "KTGB2312", // 字体名称 49 | fontWeight: FontWeight.normal, // 字重 50 | fontSize: 16.0, // 字号 51 | ), 52 | maxLines: 1, 53 | ), 54 | ), 55 | // 右上角未读章节数 56 | ClipRRect( 57 | borderRadius: BorderRadius.circular(8.0), 58 | child: Container( 59 | padding: EdgeInsets.symmetric(horizontal: 4.0), 60 | color: bookCardModel.hasUpdate 61 | ? Color(0xFFFF0000) 62 | : Color(0xFF888888), // 背景颜色 63 | child: Text( 64 | "${bookCardModel.bookUnreadCount}", 65 | style: TextStyle( 66 | color: Color(0xFFFFFFFF), // 字体颜色 67 | ), 68 | ), 69 | ), 70 | ), 71 | ], 72 | ), 73 | ), 74 | // 书籍作者 75 | Row( 76 | children: [ 77 | Icon( 78 | Icons.account_box, // 作者图标 79 | size: 18.0, 80 | ), 81 | Text( 82 | "${bookCardModel.bookAuthor}", 83 | maxLines: 1, 84 | style: TextStyle( 85 | fontFamily: "KTGB2312", 86 | fontSize: 12.0, // 字号 87 | ), 88 | ), 89 | ], 90 | ), 91 | // 书签章节 92 | Row( 93 | children: [ 94 | Icon( 95 | Icons.photo_album, // book 书签图标 96 | size: 18.0, 97 | ), 98 | Expanded( 99 | child: Text( 100 | "${bookCardModel.bookMark}", 101 | maxLines: 1, 102 | overflow: TextOverflow.ellipsis, // 溢出的文本用省略号代替 103 | style: TextStyle( 104 | fontFamily: "KTGB2312", 105 | fontSize: 11.0, // 字号 106 | ), 107 | ), 108 | ), 109 | ], 110 | ), 111 | // 最新章节 112 | Row( 113 | children: [ 114 | Icon( 115 | Icons.move_to_inbox, // 最新章节图标 116 | size: 18.0, 117 | ), 118 | Expanded( 119 | child: Text( 120 | "${bookCardModel.bookLastChapter}", 121 | maxLines: 1, 122 | overflow: TextOverflow.ellipsis, // 溢出的文本用省略号代替 123 | style: TextStyle( 124 | fontFamily: "KTGB2312", 125 | fontSize: 11.0, // 字号 126 | ), 127 | ), 128 | ), 129 | ], 130 | ), 131 | ], 132 | ), 133 | ), 134 | ), 135 | ], 136 | ), 137 | ); 138 | } 139 | } 140 | 141 | class BookCardModel { 142 | String bookName; 143 | 144 | /// 书籍作者 145 | String bookAuthor; 146 | 147 | /// 封面地址 148 | String bookCover; 149 | 150 | /// 书签章节 151 | String bookMark; 152 | 153 | /// 最新章节 154 | String bookLastChapter; 155 | 156 | /// 未读章节数 157 | int bookUnreadCount; 158 | 159 | /// 是否有新章节 160 | bool hasUpdate; 161 | 162 | BookCardModel( 163 | {this.bookName, 164 | this.bookAuthor, 165 | this.bookCover, 166 | this.bookMark, 167 | this.bookLastChapter, 168 | this.bookUnreadCount, 169 | this.hasUpdate}); 170 | 171 | BookCardModel.fromMap(data) { 172 | bookName = data["bookName"]; 173 | bookAuthor = data["bookAuthor"]; 174 | bookCover = data["bookCover"]; 175 | bookMark = data["bookMark"]; 176 | bookLastChapter = data["bookLastChapter"]; 177 | bookUnreadCount = data["bookUnreadCount"]; 178 | hasUpdate = data["hasUpdate"]; 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /lib/common/net/address.dart: -------------------------------------------------------------------------------- 1 | import 'package:YueDuFlutter/common/config/config.dart'; 2 | 3 | ///地址数据 4 | class Address { 5 | static const String host = "https://api.github.com/"; 6 | static const String hostWeb = "https://github.com/"; 7 | static const String downloadUrl = 'https://www.pgyer.com/GSYGithubApp'; 8 | static const String graphicHost = 'https://ghchart.rshah.org/'; 9 | static const String updateUrl = 'https://www.pgyer.com/vj2B'; 10 | 11 | ///获取授权 post 12 | static getAuthorization() { 13 | return "${host}authorizations"; 14 | } 15 | 16 | ///搜索 get 17 | static search(q, sort, order, type, page, [pageSize = Config.PAGE_SIZE]) { 18 | if (type == 'user') { 19 | return "${host}search/users?q=$q&page=$page&per_page=$pageSize"; 20 | } 21 | sort ??= "best%20match"; 22 | order ??= "desc"; 23 | page ??= 1; 24 | pageSize ??= Config.PAGE_SIZE; 25 | return "${host}search/repositories?q=$q&sort=$sort&order=$order&page=$page&per_page=$pageSize"; 26 | } 27 | 28 | ///搜索topic tag 29 | static searchTopic(topic) { 30 | return "${host}search/repositories?q=topic:$topic&sort=stars&order=desc"; 31 | } 32 | 33 | ///用户的仓库 get 34 | static userRepos(userName, sort) { 35 | sort ??= 'pushed'; 36 | return "${host}users/$userName/repos?sort=$sort"; 37 | } 38 | 39 | ///仓库详情 get 40 | static getReposDetail(reposOwner, reposName) { 41 | return "${host}repos/$reposOwner/$reposName"; 42 | } 43 | 44 | ///仓库活动 get 45 | static getReposEvent(reposOwner, reposName) { 46 | return "${host}networks/$reposOwner/$reposName/events"; 47 | } 48 | 49 | ///仓库Fork get 50 | static getReposForks(reposOwner, reposName) { 51 | return "${host}repos/$reposOwner/$reposName/forks"; 52 | } 53 | 54 | ///仓库Star get 55 | static getReposStar(reposOwner, reposName) { 56 | return "${host}repos/$reposOwner/$reposName/stargazers"; 57 | } 58 | 59 | ///仓库Watch get 60 | static getReposWatcher(reposOwner, reposName) { 61 | return "${host}repos/$reposOwner/$reposName/subscribers"; 62 | } 63 | 64 | ///仓库提交 get 65 | static getReposCommits(reposOwner, reposName) { 66 | return "${host}repos/$reposOwner/$reposName/commits"; 67 | } 68 | 69 | ///仓库提交详情 get 70 | static getReposCommitsInfo(reposOwner, reposName, sha) { 71 | return "${host}repos/$reposOwner/$reposName/commits/$sha"; 72 | } 73 | 74 | ///仓库Issue get 75 | static getReposIssue(reposOwner, reposName, state, sort, direction) { 76 | state ??= 'all'; 77 | sort ??= 'created'; 78 | direction ??= 'desc'; 79 | return "${host}repos/$reposOwner/$reposName/issues?state=$state&sort=$sort&direction=$direction"; 80 | } 81 | 82 | ///仓release get 83 | static getReposRelease(reposOwner, reposName) { 84 | return "${host}repos/$reposOwner/$reposName/releases"; 85 | } 86 | 87 | ///仓Tag get 88 | static getReposTag(reposOwner, reposName) { 89 | return "${host}repos/$reposOwner/$reposName/tags"; 90 | } 91 | 92 | ///仓Contributors get 93 | static getReposContributors(reposOwner, reposName) { 94 | return "${host}repos/$reposOwner/$reposName/contributors"; 95 | } 96 | 97 | ///仓库Issue评论 get 98 | static getIssueComment(reposOwner, reposName, issueNumber) { 99 | return "${host}repos/$reposOwner/$reposName/issues/$issueNumber/comments"; 100 | } 101 | 102 | ///仓库Issue get 103 | static getIssueInfo(reposOwner, reposName, issueNumber) { 104 | return "${host}repos/$reposOwner/$reposName/issues/$issueNumber"; 105 | } 106 | 107 | ///增加issue评论 post 108 | 109 | static addIssueComment(reposOwner, reposName, issueNumber) { 110 | return "${host}repos/$reposOwner/$reposName/issues/$issueNumber/comments"; 111 | } 112 | 113 | ///编辑issue put 114 | static editIssue(reposOwner, reposName, issueNumber) { 115 | return "${host}repos/$reposOwner/$reposName/issues/$issueNumber"; 116 | } 117 | 118 | ///锁定issue put 119 | static lockIssue(reposOwner, reposName, issueNumber) { 120 | return "${host}repos/$reposOwner/$reposName/issues/$issueNumber/lock"; 121 | } 122 | 123 | ///创建issue post 124 | static createIssue(reposOwner, reposName) { 125 | return "${host}repos/$reposOwner/$reposName/issues"; 126 | } 127 | 128 | ///搜索issue 129 | static repositoryIssueSearch(q) { 130 | return "${host}search/issues?q=$q"; 131 | } 132 | 133 | ///编辑评论 patch, delete 134 | static editComment(reposOwner, reposName, commentId) { 135 | return "${host}repos/$reposOwner/$reposName/issues/comments/$commentId"; 136 | } 137 | 138 | ///自己的star get 139 | static myStar(sort) { 140 | sort ??= 'updated'; 141 | 142 | return "${host}users/starred?sort=$sort"; 143 | } 144 | 145 | ///用户的star get 146 | static userStar(userName, sort) { 147 | sort ??= 'updated'; 148 | 149 | return "${host}users/$userName/starred?sort=$sort"; 150 | } 151 | 152 | ///关注仓库 put 153 | static resolveStarRepos(reposOwner, repos) { 154 | return "${host}user/starred/$reposOwner/$repos"; 155 | } 156 | 157 | ///订阅仓库 put 158 | static resolveWatcherRepos(reposOwner, repos) { 159 | return "${host}user/subscriptions/$reposOwner/$repos"; 160 | } 161 | 162 | ///仓库内容数据 get 163 | static reposData(reposOwner, repos) { 164 | return "${host}repos/$reposOwner/$repos/contents"; 165 | } 166 | 167 | ///仓库路径下的内容 get 168 | static reposDataDir(reposOwner, repos, path, [branch = 'master']) { 169 | return "${host}repos/$reposOwner/$repos/contents/$path" + ((branch == null) ? "" : ("?ref=" + branch)); 170 | } 171 | 172 | ///README 文件地址 get 173 | static readmeFile(reposNameFullName, curBranch) { 174 | return host + "repos/" + reposNameFullName + "/" + "readme" + ((curBranch == null) ? "" : ("?ref=" + curBranch)); 175 | } 176 | 177 | ///我的用户信息 GET 178 | static getMyUserInfo() { 179 | return "${host}user"; 180 | } 181 | 182 | ///用户信息 get 183 | static getUserInfo(userName) { 184 | return "${host}users/$userName"; 185 | } 186 | 187 | /// get 是否关注 188 | static doFollow(name) { 189 | return "${host}user/following/$name"; 190 | } 191 | 192 | ///用户关注 get 193 | static getUserFollow(userName) { 194 | return "${host}users/$userName/following"; 195 | } 196 | 197 | ///我的关注者 get 198 | static getMyFollower() { 199 | return "${host}user/followers"; 200 | } 201 | 202 | ///用户的关注者 get 203 | static getUserFollower(userName) { 204 | return "${host}users/$userName/followers"; 205 | } 206 | 207 | ///create fork post 208 | static createFork(reposOwner, reposName) { 209 | return "${host}repos/$reposOwner/$reposName/forks"; 210 | } 211 | 212 | ///branch get 213 | static getbranches(reposOwner, reposName) { 214 | return "${host}repos/$reposOwner/$reposName/branches"; 215 | } 216 | 217 | ///fork get 218 | static getForker(reposOwner, reposName, sort) { 219 | sort ??= 'newest'; 220 | return "${host}repos/$reposOwner/$reposName/forks?sort=$sort"; 221 | } 222 | 223 | ///readme get 224 | static getReadme(reposOwner, reposName) { 225 | return "${host}repos/$reposOwner/$reposName/readme"; 226 | } 227 | 228 | ///用户收到的事件信息 get 229 | static getEventReceived(userName) { 230 | return "${host}users/$userName/received_events"; 231 | } 232 | 233 | ///用户相关的事件信息 get 234 | static getEvent(userName) { 235 | return "${host}users/$userName/events"; 236 | } 237 | 238 | ///组织成员 239 | static getMember(orgs) { 240 | return "${host}orgs/$orgs/members"; 241 | } 242 | 243 | ///获取用户组织 244 | static getUserOrgs(userName) { 245 | return "${host}users/$userName/orgs"; 246 | } 247 | 248 | ///通知 get 249 | static getNotifation(all, participating) { 250 | if ((all == null && participating == null) || (all == false && participating == false)) { 251 | return "${host}notifications"; 252 | } 253 | all ??= false; 254 | participating ??= false; 255 | return "${host}notifications?all=$all&participating=$participating"; 256 | } 257 | 258 | ///patch 259 | static setNotificationAsRead(threadId) { 260 | return "${host}notifications/threads/$threadId"; 261 | } 262 | 263 | ///put 264 | static setAllNotificationAsRead() { 265 | return "${host}notifications"; 266 | } 267 | 268 | ///趋势 get 269 | static trending(since, languageType) { 270 | if (languageType != null) { 271 | return "https://github.com/trending/$languageType?since=$since"; 272 | } 273 | return "https://github.com/trending?since=$since"; 274 | } 275 | 276 | ///处理分页参数 277 | static getPageParams(tab, page, [pageSize = Config.PAGE_SIZE]) { 278 | if (page != null) { 279 | if (pageSize != null) { 280 | return "${tab}page=$page&per_page=$pageSize"; 281 | } else { 282 | return "${tab}page=$page"; 283 | } 284 | } else { 285 | return ""; 286 | } 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 9740EEB11CF90186004384FC /* Flutter */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3B80C3931E831B6300D905FE /* App.framework */, 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 80 | ); 81 | name = Flutter; 82 | sourceTree = ""; 83 | }; 84 | 97C146E51CF9000F007C117D = { 85 | isa = PBXGroup; 86 | children = ( 87 | 9740EEB11CF90186004384FC /* Flutter */, 88 | 97C146F01CF9000F007C117D /* Runner */, 89 | 97C146EF1CF9000F007C117D /* Products */, 90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 107 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 110 | 97C147021CF9000F007C117D /* Info.plist */, 111 | 97C146F11CF9000F007C117D /* Supporting Files */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 97C146F21CF9000F007C117D /* main.m */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 97C146ED1CF9000F007C117D /* Runner */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 132 | buildPhases = ( 133 | 9740EEB61CF901F6004384FC /* Run Script */, 134 | 97C146EA1CF9000F007C117D /* Sources */, 135 | 97C146EB1CF9000F007C117D /* Frameworks */, 136 | 97C146EC1CF9000F007C117D /* Resources */, 137 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = Runner; 145 | productName = Runner; 146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | /* End PBXNativeTarget section */ 150 | 151 | /* Begin PBXProject section */ 152 | 97C146E61CF9000F007C117D /* Project object */ = { 153 | isa = PBXProject; 154 | attributes = { 155 | LastUpgradeCheck = 0910; 156 | ORGANIZATIONNAME = "The Chromium Authors"; 157 | TargetAttributes = { 158 | 97C146ED1CF9000F007C117D = { 159 | CreatedOnToolsVersion = 7.3.1; 160 | }; 161 | }; 162 | }; 163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = English; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | Base, 170 | ); 171 | mainGroup = 97C146E51CF9000F007C117D; 172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | 97C146ED1CF9000F007C117D /* Runner */, 177 | ); 178 | }; 179 | /* End PBXProject section */ 180 | 181 | /* Begin PBXResourcesBuildPhase section */ 182 | 97C146EC1CF9000F007C117D /* Resources */ = { 183 | isa = PBXResourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 190 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXShellScriptBuildPhase section */ 197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "Thin Binary"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 210 | }; 211 | 9740EEB61CF901F6004384FC /* Run Script */ = { 212 | isa = PBXShellScriptBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | inputPaths = ( 217 | ); 218 | name = "Run Script"; 219 | outputPaths = ( 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | shellPath = /bin/sh; 223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 224 | }; 225 | /* End PBXShellScriptBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 97C146EA1CF9000F007C117D /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 233 | 97C146F31CF9000F007C117D /* main.m in Sources */, 234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXSourcesBuildPhase section */ 239 | 240 | /* Begin PBXVariantGroup section */ 241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 242 | isa = PBXVariantGroup; 243 | children = ( 244 | 97C146FB1CF9000F007C117D /* Base */, 245 | ); 246 | name = Main.storyboard; 247 | sourceTree = ""; 248 | }; 249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 250 | isa = PBXVariantGroup; 251 | children = ( 252 | 97C147001CF9000F007C117D /* Base */, 253 | ); 254 | name = LaunchScreen.storyboard; 255 | sourceTree = ""; 256 | }; 257 | /* End PBXVariantGroup section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 261 | isa = XCBuildConfiguration; 262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 275 | CLANG_WARN_EMPTY_BODY = YES; 276 | CLANG_WARN_ENUM_CONVERSION = YES; 277 | CLANG_WARN_INFINITE_RECURSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 283 | CLANG_WARN_STRICT_PROTOTYPES = YES; 284 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 285 | CLANG_WARN_UNREACHABLE_CODE = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 288 | COPY_PHASE_STRIP = NO; 289 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 290 | ENABLE_NS_ASSERTIONS = NO; 291 | ENABLE_STRICT_OBJC_MSGSEND = YES; 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_NO_COMMON_BLOCKS = YES; 294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 296 | GCC_WARN_UNDECLARED_SELECTOR = YES; 297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 298 | GCC_WARN_UNUSED_FUNCTION = YES; 299 | GCC_WARN_UNUSED_VARIABLE = YES; 300 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 301 | MTL_ENABLE_DEBUG_INFO = NO; 302 | SDKROOT = iphoneos; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | VALIDATE_PRODUCT = YES; 305 | }; 306 | name = Profile; 307 | }; 308 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 309 | isa = XCBuildConfiguration; 310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 311 | buildSettings = { 312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 313 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 314 | DEVELOPMENT_TEAM = S8QB4VV633; 315 | ENABLE_BITCODE = NO; 316 | FRAMEWORK_SEARCH_PATHS = ( 317 | "$(inherited)", 318 | "$(PROJECT_DIR)/Flutter", 319 | ); 320 | INFOPLIST_FILE = Runner/Info.plist; 321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 322 | LIBRARY_SEARCH_PATHS = ( 323 | "$(inherited)", 324 | "$(PROJECT_DIR)/Flutter", 325 | ); 326 | PRODUCT_BUNDLE_IDENTIFIER = com.example.helloWord; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 355 | CLANG_WARN_STRICT_PROTOTYPES = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = dwarf; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | ENABLE_TESTABILITY = YES; 364 | GCC_C_LANGUAGE_STANDARD = gnu99; 365 | GCC_DYNAMIC_NO_PIC = NO; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_OPTIMIZATION_LEVEL = 0; 368 | GCC_PREPROCESSOR_DEFINITIONS = ( 369 | "DEBUG=1", 370 | "$(inherited)", 371 | ); 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 379 | MTL_ENABLE_DEBUG_INFO = YES; 380 | ONLY_ACTIVE_ARCH = YES; 381 | SDKROOT = iphoneos; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | }; 384 | name = Debug; 385 | }; 386 | 97C147041CF9000F007C117D /* Release */ = { 387 | isa = XCBuildConfiguration; 388 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 389 | buildSettings = { 390 | ALWAYS_SEARCH_USER_PATHS = NO; 391 | CLANG_ANALYZER_NONNULL = YES; 392 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 393 | CLANG_CXX_LIBRARY = "libc++"; 394 | CLANG_ENABLE_MODULES = YES; 395 | CLANG_ENABLE_OBJC_ARC = YES; 396 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 397 | CLANG_WARN_BOOL_CONVERSION = YES; 398 | CLANG_WARN_COMMA = YES; 399 | CLANG_WARN_CONSTANT_CONVERSION = YES; 400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INFINITE_RECURSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 408 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 409 | CLANG_WARN_STRICT_PROTOTYPES = YES; 410 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 411 | CLANG_WARN_UNREACHABLE_CODE = YES; 412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 414 | COPY_PHASE_STRIP = NO; 415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 416 | ENABLE_NS_ASSERTIONS = NO; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | GCC_C_LANGUAGE_STANDARD = gnu99; 419 | GCC_NO_COMMON_BLOCKS = YES; 420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 422 | GCC_WARN_UNDECLARED_SELECTOR = YES; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 427 | MTL_ENABLE_DEBUG_INFO = NO; 428 | SDKROOT = iphoneos; 429 | TARGETED_DEVICE_FAMILY = "1,2"; 430 | VALIDATE_PRODUCT = YES; 431 | }; 432 | name = Release; 433 | }; 434 | 97C147061CF9000F007C117D /* Debug */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 440 | ENABLE_BITCODE = NO; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 447 | LIBRARY_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | PRODUCT_BUNDLE_IDENTIFIER = com.example.helloWord; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | VERSIONING_SYSTEM = "apple-generic"; 454 | }; 455 | name = Debug; 456 | }; 457 | 97C147071CF9000F007C117D /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 460 | buildSettings = { 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 462 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 463 | ENABLE_BITCODE = NO; 464 | FRAMEWORK_SEARCH_PATHS = ( 465 | "$(inherited)", 466 | "$(PROJECT_DIR)/Flutter", 467 | ); 468 | INFOPLIST_FILE = Runner/Info.plist; 469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 470 | LIBRARY_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "$(PROJECT_DIR)/Flutter", 473 | ); 474 | PRODUCT_BUNDLE_IDENTIFIER = com.example.helloWord; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | 249021D3217E4FDB00AE95B9 /* Profile */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 97C147061CF9000F007C117D /* Debug */, 497 | 97C147071CF9000F007C117D /* Release */, 498 | 249021D4217E4FDB00AE95B9 /* Profile */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 506 | } 507 | --------------------------------------------------------------------------------