├── android ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.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 │ │ │ │ └── chenlittleping │ │ │ │ └── daily │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── .gitignore ├── settings.gradle ├── build.gradle ├── gradlew.bat └── gradlew ├── gif └── demo.gif ├── images ├── ic-play.png ├── ic-pause.png ├── ic-playing.png ├── ic-pic-article.gif └── ic-pic-loading.png ├── lib ├── net │ ├── base │ │ ├── response_cb.dart │ │ └── http.dart │ ├── api_tc │ │ ├── tc_request.dart │ │ └── tc_api.dart │ ├── api_yx │ │ ├── yx_request.dart │ │ └── yx_api.dart │ └── api_article │ │ ├── article_request.dart │ │ └── article_api.dart ├── bean │ ├── tc_item.dart │ ├── article.dart │ ├── video.dart │ └── speech_intro.dart ├── utils │ ├── date.dart │ └── media │ │ └── audio │ │ └── audio_player.dart ├── widget │ └── auto_scaffold.dart ├── ui │ ├── about │ │ ├── web.dart │ │ └── about.dart │ ├── photo │ │ ├── photo_ppt.dart │ │ └── photo_list.dart │ ├── speech │ │ ├── speech_article.dart │ │ ├── speech_video.dart │ │ └── speech_list.dart │ └── article │ │ ├── article_detail.dart │ │ ├── article_list.dart │ │ └── article_page.dart └── main.dart ├── 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 │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── .gitignore ├── .metadata ├── README.md ├── daily.iml ├── test └── ui │ └── widget_test.dart ├── daily_android.iml ├── pubspec.yaml ├── pubspec.lock └── LICENSE /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /gif/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/gif/demo.gif -------------------------------------------------------------------------------- /images/ic-play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/images/ic-play.png -------------------------------------------------------------------------------- /images/ic-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/images/ic-pause.png -------------------------------------------------------------------------------- /images/ic-playing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/images/ic-playing.png -------------------------------------------------------------------------------- /images/ic-pic-article.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/images/ic-pic-article.gif -------------------------------------------------------------------------------- /images/ic-pic-loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/images/ic-pic-loading.png -------------------------------------------------------------------------------- /lib/net/base/response_cb.dart: -------------------------------------------------------------------------------- 1 | 2 | typedef void Success(data); 3 | typedef void Fail(String error, int code); -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | 11 | .gradle/ 12 | 13 | .idea/ -------------------------------------------------------------------------------- /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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/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/ChenLittlePing/Daily/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/bean/tc_item.dart: -------------------------------------------------------------------------------- 1 | class TCItem { 2 | 3 | String title; 4 | String content; 5 | String url; 6 | 7 | TCItem(title, content, url) { 8 | this.title = title; 9 | this.content = content; 10 | this.url = url; 11 | } 12 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.1-all.zip 7 | -------------------------------------------------------------------------------- /lib/bean/article.dart: -------------------------------------------------------------------------------- 1 | 2 | class Article { 3 | String title; 4 | String author; 5 | String digest; 6 | String content; 7 | bool success; 8 | 9 | Article(this.title, 10 | this.author, 11 | this.digest, 12 | this.content, 13 | [this.success = true]); 14 | } -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.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: f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d 8 | channel: beta 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /lib/bean/video.dart: -------------------------------------------------------------------------------- 1 | 2 | class Video { 3 | ///标清视频url 4 | String sUrl; 5 | 6 | ///高清视频url 7 | String hUrl; 8 | 9 | String cover; 10 | 11 | String draft; 12 | 13 | Video(this.sUrl, this.hUrl, this.cover, this.draft); 14 | } 15 | 16 | class Comments { 17 | String content; 18 | String nickname; 19 | String created; 20 | String avatar; 21 | 22 | Comments(this.content, this.nickname, this.created, this.avatar); 23 | } -------------------------------------------------------------------------------- /lib/bean/speech_intro.dart: -------------------------------------------------------------------------------- 1 | 2 | class SpeechIntro { 3 | bool playing = false; 4 | int id; 5 | String cover; 6 | String audioUrl; 7 | String title; 8 | String content; 9 | String category; 10 | String date; 11 | String city; 12 | 13 | Speaker speaker; 14 | } 15 | 16 | class Speaker { 17 | String type; 18 | String intro; 19 | String avatar; 20 | String name; 21 | 22 | Speaker(this.type, this.intro, this.avatar, this.name); 23 | } -------------------------------------------------------------------------------- /lib/net/api_tc/tc_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/net/base/http.dart'; 2 | import 'package:dio/dio.dart'; 3 | 4 | class TCRequest extends Http { 5 | 6 | static TCRequest _request; 7 | 8 | static TCRequest obtain() { 9 | if (_request == null) { 10 | _request = new TCRequest(); 11 | } 12 | return _request; 13 | } 14 | 15 | @override 16 | void initOption(Options options) { 17 | options.baseUrl = "https://api.tuchong.com"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/net/api_yx/yx_request.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:daily/net/base/http.dart'; 3 | import 'package:dio/dio.dart'; 4 | 5 | class YxRequest extends Http { 6 | 7 | static YxRequest _request; 8 | 9 | @override 10 | void initOption(Options options) { 11 | options.baseUrl = "https://api2.yixi.tv/api/v1"; 12 | } 13 | 14 | static YxRequest obtain() { 15 | if(_request == null) { 16 | _request = YxRequest(); 17 | } 18 | return _request; 19 | } 20 | } -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/chenlittleping/daily/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.chenlittleping.daily; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/net/api_article/article_request.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:daily/net/base/http.dart'; 3 | import 'package:dio/dio.dart'; 4 | 5 | class ArticleRequest extends Http { 6 | 7 | static ArticleRequest _request; 8 | 9 | @override 10 | void initOption(Options options) { 11 | options.baseUrl = "https://interface.meiriyiwen.com"; 12 | } 13 | 14 | static ArticleRequest obtain() { 15 | if(_request == null) { 16 | _request = ArticleRequest(); 17 | } 18 | return _request; 19 | } 20 | } -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/utils/date.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | 3 | class Date { 4 | 5 | static String getDate(int offset, String type) { 6 | var mill = 7 | DateTime.now().millisecondsSinceEpoch - 24 * 3600 * 1000 * offset; 8 | return format(mill, type); 9 | } 10 | 11 | static String format(int millSecond, String type) { 12 | DateTime time = new DateTime.fromMillisecondsSinceEpoch(millSecond); 13 | var formatter = new DateFormat(type); 14 | var date = formatter.format(time); 15 | return date.toString(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /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/net/api_article/article_api.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:daily/net/api_article/article_request.dart'; 4 | import 'package:daily/net/base/response_cb.dart'; 5 | 6 | class ArticleApi { 7 | void getArticle(date, Success success, Fail fail) { 8 | var params = { 9 | "dev": "1" 10 | }; 11 | 12 | String endPoint = "/article/"; 13 | if (date != null) { 14 | params["date"] = date; 15 | endPoint += "day"; 16 | } else { 17 | endPoint += "today"; 18 | } 19 | ArticleRequest.obtain().get(endPoint, params, success, fail); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/widget/auto_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///自动切换Android/iOS风格的标题栏布局 4 | class AutoScaffold extends Scaffold { 5 | AutoScaffold({@required BuildContext context, needAppBar = true, String title, Widget body, color}) 6 | : super( 7 | backgroundColor: color, 8 | appBar: needAppBar? AppBar( 9 | title: Text(title?? ""), 10 | centerTitle: true, 11 | elevation: Theme.of(context).platform == TargetPlatform.iOS 12 | ? 0.0 : 4.0) : null, 13 | body: body); 14 | } 15 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/net/api_yx/yx_api.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:daily/net/api_yx/yx_request.dart'; 4 | import 'package:daily/net/base/response_cb.dart'; 5 | 6 | class YxApi { 7 | void getSpeeches(int page, Success success, Fail fail) { 8 | var params = { 9 | "page": page, 10 | "pageSize": 8 11 | }; 12 | 13 | YxRequest.obtain().get("/speechs", params, success, fail); 14 | } 15 | 16 | void getSpeechDetail(speechId, Success success, Fail fail) { 17 | var params = { 18 | "speech_id": speechId 19 | }; 20 | 21 | YxRequest.obtain().get("/speech", params, success, fail); 22 | } 23 | } -------------------------------------------------------------------------------- /lib/ui/about/web.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; 4 | 5 | class Web extends StatelessWidget { 6 | 7 | final String _title; 8 | final String _url; 9 | 10 | Web(this._title, this._url); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return new WebviewScaffold( 15 | url: this._url, 16 | appBar: new AppBar( 17 | title: new Text(_title), 18 | centerTitle: true, 19 | elevation: Theme.of(context).platform == TargetPlatform.iOS? 0.0 : 4.0 20 | ) 21 | ); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks/ 46 | -------------------------------------------------------------------------------- /lib/net/api_tc/tc_api.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:daily/net/api_tc/tc_request.dart'; 3 | 4 | class TCApi { 5 | void getNew(int page, String postId, Function success, Function fail) { 6 | var params = { 7 | "os_api": 22, 8 | "ssmix": "a", 9 | "manifest_version_code": 232, 10 | "abflag": 0, 11 | "uuid": "651384659521356", 12 | "version_code": 232, 13 | "app_name": "tuchong", 14 | "version_name": "2.3.2", 15 | "openudid": "65143269dafd1f3a5", 16 | "os_version": "5.8.1", 17 | "page": page, 18 | "post_id": page > 1? postId : null, 19 | "type": page == 1? "refresh" : "loadmore" 20 | }; 21 | TCRequest request = TCRequest.obtain(); 22 | print(params); 23 | request.get("/feed-app", params, success, fail); 24 | } 25 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Daily/每日图文 2 | 3 | A Flutter App for reading awesome photos and articles. 4 | 5 | 《每日图文》是一个使用Google Flutter平台开发的跨平台App,可以在Android和iOS平台上运行。 6 | 7 | ![每日图文](https://github.com/ChenLittlePing/Daily/blob/master/gif/demo.gif) 8 | 9 | ## 功能: 10 | 11 | - [x] 查看美图 12 | - [x] 查看美文 13 | - [x] 查看演讲 14 | - [x] 演讲视频列表和语音播放 15 | - [x] 演讲语音播放状态显示,播放时间点拖放 16 | - [x] 演讲视频播放 17 | - [x] 演讲文稿显示 18 | 19 | ## Api来自: 20 | 21 | https://github.com/ChenLittlePing/-Api 22 | 23 | ## 使用的组件: 24 | 25 | - Scaffold 26 | - RefreshIndicator 27 | - GestureDetector 28 | - Container 29 | - CenterListView 30 | - GridView 31 | - PageView 32 | - Image 33 | - Text 34 | - ...... 35 | 36 | ## 使用的框架: 37 | 38 | - 网络框架dio 39 | - 图片显示缓存框架cached_network_image 40 | - 日期格式化工具intl 41 | - Webview插件flutter_webview_plugin 42 | - 音频播放插件audioplayer 43 | - 视频播放插件chewie 44 | - HTML格式文本加载插件flutter_html_view 45 | - ...... 46 | 47 | ## 声明 48 | 49 | 本APP仅用于学习交流使用,禁止商用,侵权请联系删除,谢谢! 50 | -------------------------------------------------------------------------------- /daily.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/ui/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:daily/main.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /lib/ui/photo/photo_ppt.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:daily/bean/tc_item.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class PhotoPPT extends StatefulWidget { 6 | final List _photos; 7 | final int _index; 8 | final int _pageIndex; 9 | 10 | PhotoPPT(this._photos, this._pageIndex, this._index); 11 | 12 | @override 13 | State createState() { 14 | return PhotoPPTState(); 15 | } 16 | } 17 | 18 | class PhotoPPTState extends State { 19 | @override 20 | Widget build(BuildContext context) { 21 | return new PageView.builder( 22 | controller: PageController(initialPage: widget._index), 23 | itemCount: widget._photos.length, 24 | itemBuilder: (context, i) { 25 | return GestureDetector( 26 | onTap: () { 27 | Navigator.pop(context); 28 | }, 29 | child: Hero( 30 | tag: "tag-" + widget._pageIndex.toString() + "-" + i.toString(), 31 | child: new CachedNetworkImage( 32 | imageUrl: widget._photos[i].url, 33 | placeholder: Container( 34 | child: Image.asset("images/ic-pic-loading.png"), 35 | ), 36 | fit: BoxFit.fitWidth, 37 | errorWidget: new Icon(Icons.error), 38 | ), 39 | )); 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /daily_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.chenlittleping.daily" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | en 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | Daily 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleSignature 25 | ???? 26 | CFBundleVersion 27 | 1 28 | LSRequiresIPhoneOS 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationPortraitUpsideDown 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | UIViewControllerBasedStatusBarAppearance 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/ui/speech/speech_article.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/widget/auto_scaffold.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_html_view/flutter_html_view.dart'; 4 | 5 | class SpeechArticle extends StatefulWidget { 6 | final String _title; 7 | final String _author; 8 | final String _article; 9 | 10 | SpeechArticle(this._title, this._author, this._article); 11 | 12 | @override 13 | State createState() { 14 | return _SpeechArticleState(); 15 | } 16 | } 17 | 18 | class _SpeechArticleState extends State { 19 | @override 20 | Widget build(BuildContext context) { 21 | return new AutoScaffold( 22 | context: context, 23 | title: widget._title, 24 | needAppBar: false, 25 | color: Colors.white, 26 | body: ListView.builder( 27 | itemCount: 3, 28 | itemBuilder: (context, i) { 29 | if (i == 0) { 30 | return Container( 31 | margin: EdgeInsets.fromLTRB(24.0, 8.0, 8.0, 24.0), 32 | child: Text(widget._title, 33 | textAlign: TextAlign.start, 34 | style: TextStyle( 35 | height: 2.0, 36 | fontSize: 24.0, 37 | color: Colors.black87, 38 | fontWeight: FontWeight.bold))); 39 | } else if (i == 1) { 40 | return Container( 41 | margin: EdgeInsets.fromLTRB(24.0, 0.0, 0.0, 24.0), 42 | child: Text("文 / " + widget._author, 43 | style: TextStyle( 44 | height: 1.2, 45 | fontSize: 16.0, 46 | color: Colors.black54, 47 | fontWeight: FontWeight.bold))); 48 | } 49 | return Container( 50 | margin: EdgeInsets.all(8.0), 51 | child: new HtmlView(data: widget._article)); 52 | })); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/utils/media/audio/audio_player.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | import 'dart:ui'; 4 | import 'package:audioplayer/audioplayer.dart'; 5 | 6 | /// 封装音频播放器 7 | /// iOS需要在Runner/Info.plist配置一下信息,才能播放http类型的url音频 8 | /// NSAppTransportSecurity 9 | /// 10 | /// NSAllowsArbitraryLoads 11 | /// 12 | /// 13 | class APlayer { 14 | static final APlayer _singleton = APlayer._internal(); 15 | 16 | static final AudioPlayer _player = new AudioPlayer(); 17 | 18 | APlayer._internal(); 19 | 20 | static Duration _duration = Duration(); 21 | static Duration _position = Duration(); 22 | 23 | factory APlayer() { 24 | return _singleton; 25 | } 26 | 27 | Duration getDuration() { 28 | return _duration; 29 | } 30 | 31 | Duration getPosition() { 32 | return _position; 33 | } 34 | 35 | void _clear() { 36 | _duration = Duration(); 37 | _position = Duration(); 38 | } 39 | 40 | Future play(String url) async { 41 | await stop(); 42 | final result = await _player.play(url); 43 | return result == 1; 44 | } 45 | 46 | Future playLocal(String path) async { 47 | final result = await _player.play(path, isLocal: true); 48 | return result == 1; 49 | } 50 | 51 | Future pause() async { 52 | final result = await _player.pause(); 53 | return result == 1; 54 | } 55 | 56 | Future stop() async { 57 | final result = await _player.stop(); 58 | _clear(); 59 | return result == 1; 60 | } 61 | 62 | Future seek(double seconds) async { 63 | final result = await _player.seek(seconds); 64 | return result == 1; 65 | } 66 | 67 | void setDurationHandler(TimeChangeHandler handler) { 68 | _player.setDurationHandler((duration) { 69 | _duration = duration; 70 | handler(duration); 71 | }); 72 | } 73 | 74 | void setPositionHandler(TimeChangeHandler handler) { 75 | _player.setPositionHandler((duration) { 76 | _position = duration; 77 | handler(duration); 78 | }); 79 | } 80 | 81 | void setCompletionHandler(VoidCallback callback) { 82 | _player.setCompletionHandler(callback); 83 | } 84 | } -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 16 | 20 | 27 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /lib/ui/photo/photo_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:daily/bean/tc_item.dart'; 3 | import 'package:daily/ui/photo/photo_ppt.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class PhotoList extends StatefulWidget { 7 | final List _photos; 8 | final int _pageIndex; 9 | 10 | PhotoList(this._photos, this._pageIndex); 11 | 12 | @override 13 | State createState() { 14 | return PhotoListState(); 15 | } 16 | } 17 | 18 | class PhotoListState extends State { 19 | @override 20 | Widget build(BuildContext context) { 21 | return new Scaffold( 22 | appBar: new AppBar( 23 | title: new Text(widget._photos[0].title != null? widget._photos[0].title : "图片列表"), 24 | centerTitle: true, 25 | elevation: Theme.of(context).platform == TargetPlatform.iOS? 0.0 : 4.0 26 | ), 27 | body: new GridView.count( 28 | // Create a grid with 2 columns. If you change the scrollDirection to 29 | // horizontal, this would produce 2 rows. 30 | crossAxisCount: 2, 31 | padding: const EdgeInsets.all(2.0), 32 | mainAxisSpacing: 2.0, 33 | crossAxisSpacing: 2.0, 34 | children: new List.generate(widget._photos.length, (index) { 35 | return new GestureDetector( 36 | onTap: () { 37 | _next(index); 38 | }, 39 | child: Hero( 40 | tag: "tag-" + widget._pageIndex.toString() + "-" + index.toString(), 41 | child: CachedNetworkImage( 42 | imageUrl: widget._photos[index].url, 43 | placeholder: Container( 44 | child: Image.asset("images/ic-pic-loading.png"), 45 | ), 46 | fit: BoxFit.cover, 47 | errorWidget: new Icon(Icons.error), 48 | ), 49 | )); 50 | }))); 51 | } 52 | 53 | void _next(index) { 54 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 55 | return new PhotoPPT(widget._photos, widget._pageIndex, index); 56 | })); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | def parse_KV_file(file, separator='=') 8 | file_abs_path = File.expand_path(file) 9 | if !File.exists? file_abs_path 10 | return []; 11 | end 12 | pods_ary = [] 13 | skip_line_start_symbols = ["#", "/"] 14 | File.foreach(file_abs_path) { |line| 15 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 16 | plugin = line.split(pattern=separator) 17 | if plugin.length == 2 18 | podname = plugin[0].strip() 19 | path = plugin[1].strip() 20 | podpath = File.expand_path("#{path}", file_abs_path) 21 | pods_ary.push({:name => podname, :path => podpath}); 22 | else 23 | puts "Invalid plugin specification: #{line}" 24 | end 25 | } 26 | return pods_ary 27 | end 28 | 29 | target 'Runner' do 30 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 31 | # referring to absolute paths on developers' machines. 32 | system('rm -rf .symlinks') 33 | system('mkdir -p .symlinks/plugins') 34 | 35 | # Flutter Pods 36 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 37 | if generated_xcode_build_settings.empty? 38 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 39 | end 40 | generated_xcode_build_settings.map { |p| 41 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 42 | symlink = File.join('.symlinks', 'flutter') 43 | File.symlink(File.dirname(p[:path]), symlink) 44 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 45 | end 46 | } 47 | 48 | # Plugin Pods 49 | plugin_pods = parse_KV_file('../.flutter-plugins') 50 | plugin_pods.map { |p| 51 | symlink = File.join('.symlinks', 'plugins', p[:name]) 52 | File.symlink(p[:path], symlink) 53 | pod p[:name], :path => File.join(symlink, 'ios') 54 | } 55 | end 56 | 57 | post_install do |installer| 58 | installer.pods_project.targets.each do |target| 59 | target.build_configurations.each do |config| 60 | config.build_settings['ENABLE_BITCODE'] = 'NO' 61 | end 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: daily 2 | description: A application to look up photo and article 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | # The following adds the Cupertino Icons font to your application. 9 | # Use with the CupertinoIcons class for iOS style icons. 10 | cupertino_icons: ^0.1.2 11 | dio: ^0.0.13 12 | cached_network_image: ^0.4.1 13 | intl: ^0.15.6 # date format util 14 | flutter_webview_plugin: ^0.1.6 15 | audioplayer: ^0.4.0 16 | chewie: ^0.5.0 # video player 17 | flutter_html_view: ^0.5.2 18 | screen: ^0.0.3 19 | 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | 24 | 25 | # For information on the generic Dart part of this file, see the 26 | # following page: https://www.dartlang.org/tools/pub/pubspec 27 | 28 | # The following section is specific to Flutter. 29 | flutter: 30 | 31 | # The following line ensures that the Material Icons font is 32 | # included with your application, so that you can use the icons in 33 | # the material Icons class. 34 | uses-material-design: true 35 | 36 | # To add assets to your application, add an assets section, like this: 37 | assets: 38 | - images/ic-pic-loading.png 39 | - images/ic-pic-article.gif 40 | - images/ic-play.png 41 | - images/ic-pause.png 42 | - images/ic-playing.png 43 | 44 | # An image asset can refer to one or more resolution-specific "variants", see 45 | # https://flutter.io/assets-and-images/#resolution-aware. 46 | 47 | # For details regarding adding assets from package dependencies, see 48 | # https://flutter.io/assets-and-images/#from-packages 49 | 50 | # To add custom fonts to your application, add a fonts section here, 51 | # in this "flutter" section. Each entry in this list should have a 52 | # "family" key with the font family name, and a "fonts" key with a 53 | # list giving the asset and other descriptors for the font. For 54 | # example: 55 | # fonts: 56 | # - family: Schyler 57 | # fonts: 58 | # - asset: fonts/Schyler-Regular.ttf 59 | # - asset: fonts/Schyler-Italic.ttf 60 | # style: italic 61 | # - family: Trajan Pro 62 | # fonts: 63 | # - asset: fonts/TrajanPro.ttf 64 | # - asset: fonts/TrajanPro_Bold.ttf 65 | # weight: 700 66 | # 67 | # For details regarding fonts from package dependencies, 68 | # see https://flutter.io/custom-fonts/#from-packages 69 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - audioplayer (0.0.1): 3 | - Flutter 4 | - Flutter (1.0.0) 5 | - flutter_custom_tabs (0.0.1): 6 | - Flutter 7 | - flutter_webview_plugin (0.0.1): 8 | - Flutter 9 | - path_provider (0.0.1): 10 | - Flutter 11 | - screen (0.0.1): 12 | - Flutter 13 | - shared_preferences (0.0.1): 14 | - Flutter 15 | - url_launcher (0.0.1): 16 | - Flutter 17 | - video_player (0.0.1): 18 | - Flutter 19 | 20 | DEPENDENCIES: 21 | - audioplayer (from `.symlinks/plugins/audioplayer/ios`) 22 | - Flutter (from `.symlinks/flutter/ios`) 23 | - flutter_custom_tabs (from `.symlinks/plugins/flutter_custom_tabs/ios`) 24 | - flutter_webview_plugin (from `.symlinks/plugins/flutter_webview_plugin/ios`) 25 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 26 | - screen (from `.symlinks/plugins/screen/ios`) 27 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 28 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 29 | - video_player (from `.symlinks/plugins/video_player/ios`) 30 | 31 | EXTERNAL SOURCES: 32 | audioplayer: 33 | :path: ".symlinks/plugins/audioplayer/ios" 34 | Flutter: 35 | :path: ".symlinks/flutter/ios" 36 | flutter_custom_tabs: 37 | :path: ".symlinks/plugins/flutter_custom_tabs/ios" 38 | flutter_webview_plugin: 39 | :path: ".symlinks/plugins/flutter_webview_plugin/ios" 40 | path_provider: 41 | :path: ".symlinks/plugins/path_provider/ios" 42 | screen: 43 | :path: ".symlinks/plugins/screen/ios" 44 | shared_preferences: 45 | :path: ".symlinks/plugins/shared_preferences/ios" 46 | url_launcher: 47 | :path: ".symlinks/plugins/url_launcher/ios" 48 | video_player: 49 | :path: ".symlinks/plugins/video_player/ios" 50 | 51 | SPEC CHECKSUMS: 52 | audioplayer: 3cc64e4f5f3e231c715c8923a9bc26a19dc5da3b 53 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 54 | flutter_custom_tabs: 8dcb85ffe874ee8fd8139bb3960743efeaf521ee 55 | flutter_webview_plugin: 116575b48572029304775b768e9f15ebfc316274 56 | path_provider: 09407919825bfe3c2deae39453b7a5b44f467873 57 | screen: 9ab0df4ff4bb6d382da4328428535b618c705c46 58 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53 59 | url_launcher: 92b89c1029a0373879933c21642958c874539095 60 | video_player: 906796a841943c8d370ac7c13b18039aa9b56498 61 | 62 | PODFILE CHECKSUM: 1e5af4103afd21ca5ead147d7b81d06f494f51a2 63 | 64 | COCOAPODS: 1.5.3 65 | -------------------------------------------------------------------------------- /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/net/base/http.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/net/base/response_cb.dart'; 2 | import 'package:dio/dio.dart'; 3 | 4 | ///Http请求基础类 5 | ///

配置基本的请求信息,以及基础的请求功能方法 6 | ///

正在的请求类需要继承该类,并实现[initOption]方法,进行参数配置 7 | abstract class Http { 8 | Options _options = Options( 9 | baseUrl: "", 10 | connectTimeout: 5000, 11 | receiveTimeout: 3000 12 | ); 13 | 14 | Dio _dio; 15 | 16 | Http() { 17 | initOption(_options); 18 | } 19 | 20 | Dio getDio() { 21 | if (_dio == null) { 22 | _dio = Dio(_options); 23 | } 24 | return _dio; 25 | } 26 | 27 | void initOption(Options options) {} 28 | 29 | void get(String endpoint, var params, Success success, Fail fail) async { 30 | try { 31 | Response response = await getDio().get(endpoint, data: params); 32 | handleData(success, response.data); 33 | } on DioError catch (e) { 34 | handleError(fail, e); 35 | } 36 | } 37 | 38 | void post(String endpoint, var data, Success success, Fail fail) async { 39 | try { 40 | Response response = await getDio().post(endpoint, data: data); 41 | handleData(success, response.data); 42 | } on DioError catch (e) { 43 | handleError(fail, e); 44 | } 45 | } 46 | 47 | void getString(String endpoint, Success success, Fail fail) async { 48 | try { 49 | Response response = await getDio().get(endpoint); 50 | handleData(success, response.data); 51 | } on DioError catch (e) { 52 | handleError(fail, e); 53 | } 54 | } 55 | 56 | void postString(String endpoint, Success success, Fail fail) async { 57 | try { 58 | Response response = await getDio().post(endpoint); 59 | handleData(success, response.data); 60 | } on DioError catch (e) { 61 | handleError(fail, e); 62 | } 63 | } 64 | 65 | void handleData(cb, var data) { 66 | if (cb != null && cb is Function) { 67 | cb(data); 68 | } 69 | } 70 | 71 | void handleError(cb, DioError e) { 72 | if (cb == null || !(cb is Function)) return; 73 | if (e.response != null) { 74 | cb("服务器异常", e.response.statusCode); 75 | } else { 76 | switch (e.type) { 77 | case DioErrorType.DEFAULT: 78 | cb("服务器异常", 0); 79 | break; 80 | case DioErrorType.CONNECT_TIMEOUT: 81 | cb("网络连接超时", 0); 82 | break; 83 | case DioErrorType.RECEIVE_TIMEOUT: 84 | cb("网络连接超时", 0); 85 | break; 86 | case DioErrorType.RESPONSE: 87 | cb("网络异常", 0); 88 | break; 89 | case DioErrorType.CANCEL: 90 | cb("取消请求", 0); 91 | break; 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/ui/article/article_detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/bean/article.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ArticleDetail extends StatefulWidget { 5 | final Article _article; 6 | 7 | ArticleDetail(this._article); 8 | 9 | @override 10 | State createState() { 11 | return ArticleDetailState(); 12 | } 13 | } 14 | 15 | class ArticleDetailState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | title: Text(widget._article.title), 21 | centerTitle: Theme.of(context).platform == TargetPlatform.iOS? true : false, 22 | elevation: Theme.of(context).platform == TargetPlatform.iOS? 0.0 : 4.0 23 | ), 24 | body: ListView.builder( 25 | itemCount: 3, 26 | itemBuilder: (context, i) { 27 | if (i == 0) { 28 | return Container( 29 | margin: EdgeInsets.all(8.0), 30 | child: Text(widget._article.title, 31 | textAlign: TextAlign.center, 32 | style: TextStyle( 33 | height: 2.0, 34 | fontSize: 18.0, 35 | color: Colors.black87, 36 | fontWeight: FontWeight.bold))); 37 | } else if (i == 1) { 38 | return Container( 39 | margin: EdgeInsets.all(8.0), 40 | child: Text("文 / " + widget._article.author, 41 | style: TextStyle( 42 | height: 1.2, 43 | fontSize: 16.0, 44 | color: Colors.black54, 45 | fontWeight: FontWeight.bold))); 46 | } 47 | return Container( 48 | margin: EdgeInsets.all(8.0), 49 | child: 50 | RichText(text: new TextSpan(children: _getParagraph()))); 51 | })); 52 | } 53 | 54 | _getParagraph() { 55 | var pgps = widget._article.content.split("

"); 56 | var texts = []; 57 | for (var text in pgps) { 58 | texts.add(TextSpan( 59 | text: texts.length == 0 60 | ? text.replaceAll("

", "") 61 | : text.replaceAll("

", "\n\n"), 62 | style: TextStyle( 63 | height: 1.2, 64 | fontSize: 16.0, 65 | letterSpacing: 1.2, 66 | wordSpacing: 1.2, 67 | color: Colors.black54))); 68 | } 69 | return texts; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /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/ui/article/article_list.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:daily/bean/article.dart'; 3 | import 'package:daily/net/api_article/article_api.dart'; 4 | import 'package:daily/ui/article/article_detail.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class ArticleList extends StatefulWidget { 8 | @override 9 | State createState() { 10 | return ArticleListState(); 11 | } 12 | } 13 | 14 | class ArticleListState extends State { 15 | var _myContext; 16 | var _items =

[]; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | _getListData(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: new AppBar( 28 | title: new Text("每日文章"), 29 | centerTitle: true, 30 | elevation: Theme.of(context).platform == TargetPlatform.iOS? 0.0 : 4.0 31 | ), 32 | body: new Builder(builder: (BuildContext context) { 33 | _myContext = context; 34 | return ListView.builder( 35 | itemCount: _items.length, 36 | itemBuilder: (context, i) { 37 | return GestureDetector( 38 | onTap: _navToDetail, 39 | child: Card( 40 | margin: EdgeInsets.all(12.0), 41 | child: Column( 42 | children: [ 43 | Image.asset("images/ic-pic-article.gif", 44 | width: 150.0, height: 150.0), 45 | Divider(), 46 | Container( 47 | color: Colors.white, 48 | child: Column( 49 | crossAxisAlignment: CrossAxisAlignment.start, 50 | children: [ 51 | Container( 52 | alignment: Alignment.centerLeft, 53 | margin: EdgeInsets.all(8.0), 54 | child: Text(_items[i].title, 55 | style: TextStyle( 56 | fontSize: 18.0, 57 | letterSpacing: 1.0)), 58 | ), 59 | Container( 60 | margin: EdgeInsets.all(8.0), 61 | child: Text(_items[i].digest, 62 | style: TextStyle( 63 | fontSize: 14.0, 64 | color: Colors.grey, 65 | letterSpacing: 1.0), 66 | maxLines: 2)) 67 | ], 68 | )) 69 | ], 70 | )), 71 | ); 72 | }); 73 | })); 74 | } 75 | 76 | void _getListData() { 77 | ArticleApi().getArticle(null, (data) { 78 | var d = data["data"]; 79 | var item = Article(d["title"], d["author"], d["digest"], d["content"]); 80 | setState(() { 81 | _items.add(item); 82 | }); 83 | }, (error, code) { 84 | Scaffold.of(_myContext).showSnackBar( 85 | new SnackBar(content: new Text(error))); 86 | }); 87 | } 88 | 89 | void _navToDetail() { 90 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 91 | return new ArticleDetail(_items[0]); 92 | })); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/ui/article/article_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/bean/article.dart'; 2 | import 'package:daily/net/api_article/article_api.dart'; 3 | import 'package:daily/utils/date.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ArticlePage extends StatefulWidget { 7 | @override 8 | State createState() { 9 | return _ArticleState(); 10 | } 11 | } 12 | 13 | class _ArticleState extends State { 14 | var _items = Map(); 15 | var _myContext; 16 | String _title = "每日文章"; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | _onViewChange(0); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: Text(_title), 29 | centerTitle: true, 30 | elevation: Theme.of(context).platform == TargetPlatform.iOS? 0.0 : 4.0 31 | ), 32 | body: Builder(builder: (BuildContext context) { 33 | _myContext = context; 34 | return PageView.builder( 35 | itemCount: 5 + _items.length, 36 | onPageChanged: _onViewChange, 37 | itemBuilder: (context, page) { 38 | if (_items.length <= page) { 39 | return new Center(child: Text("正在加载...")); 40 | } 41 | 42 | Article item = _items[_getDate(page)]; 43 | if (item.content == "暂未更新") { 44 | return Center(child: Text("暂未更新")); 45 | } 46 | return new Container( 47 | child: ListView.builder( 48 | itemCount: 3, 49 | itemBuilder: (context, i) { 50 | if (i == 0) { 51 | return Container( 52 | margin: EdgeInsets.all(8.0), 53 | child: Text(item.title, 54 | textAlign: TextAlign.center, 55 | style: TextStyle( 56 | height: 2.0, 57 | fontSize: 18.0, 58 | color: Colors.black87, 59 | fontWeight: FontWeight.bold))); 60 | } else if (i == 1) { 61 | return Container( 62 | margin: EdgeInsets.all(8.0), 63 | child: Text("文 / " + item.author, 64 | style: TextStyle( 65 | height: 1.2, 66 | fontSize: 16.0, 67 | color: Colors.black54, 68 | fontWeight: FontWeight.bold))); 69 | } 70 | return Container( 71 | margin: EdgeInsets.all(8.0), 72 | child: RichText( 73 | text: new TextSpan( 74 | children: _getParagraph(item)))); 75 | })); 76 | }); 77 | })); 78 | } 79 | 80 | _onViewChange(int i) { 81 | String date = _getDate(i); 82 | setState(() { 83 | _title = date; 84 | }); 85 | if (_items[date] == null || !_items[date].success) { 86 | _getArticle(i); 87 | } 88 | } 89 | 90 | void _getArticle(int offset) { 91 | var date = _getDate(offset); 92 | 93 | ArticleApi().getArticle(date, (data) { 94 | var d = data["data"]; 95 | var item = Article(d["title"], d["author"], d["digest"], d["content"]); 96 | setState(() { 97 | _items.putIfAbsent(d["date"]["curr"], () => item); 98 | }); 99 | }, (error, code) { 100 | if (code == 404) { 101 | var item = Article("", "", "", "暂未更新", false); 102 | setState(() { 103 | _items.putIfAbsent(date, () => item); 104 | }); 105 | } else { 106 | Scaffold 107 | .of(_myContext) 108 | .showSnackBar(new SnackBar(content: new Text(error))); 109 | } 110 | }); 111 | } 112 | 113 | _getParagraph(Article article) { 114 | var pgps = article.content.split("

"); 115 | var texts = []; 116 | for (var text in pgps) { 117 | texts.add(TextSpan( 118 | text: texts.length == 0 119 | ? text.replaceAll("

", "") 120 | : text.replaceAll("

", "\n\n"), 121 | style: TextStyle( 122 | height: 1.2, 123 | fontSize: 16.0, 124 | letterSpacing: 1.2, 125 | wordSpacing: 1.2, 126 | color: Colors.black54))); 127 | } 128 | return texts; 129 | } 130 | 131 | _getDate(int offset) { 132 | return Date.getDate(offset, "yyyMMdd"); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /lib/ui/about/about.dart: -------------------------------------------------------------------------------- 1 | import 'package:daily/ui/about/web.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class About extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Scaffold( 8 | appBar: new AppBar( 9 | title: Text("关于"), 10 | centerTitle: true, 11 | elevation: 12 | Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0), 13 | body: SingleChildScrollView( 14 | child: Container( 15 | margin: EdgeInsets.all(32.0), 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.circular(5.0), 18 | border: new Border.all( 19 | color: Colors.blue, 20 | width: 1.0, 21 | )), 22 | child: Center( 23 | child: Column( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | Center( 27 | child: Text("关于每日图文", 28 | style: TextStyle( 29 | fontSize: 18.0, 30 | fontWeight: FontWeight.bold, 31 | height: 1.5)), 32 | ), 33 | Divider( 34 | color: Colors.blue, 35 | ), 36 | Container( 37 | margin: EdgeInsets.all(8.0), 38 | child: Text( 39 | "《每日图文》是一个使用Google Flutter平台开发的跨平台App,可以在Android和iOS平台上运行。", 40 | style: TextStyle( 41 | fontSize: 15.0, height: 1.5, letterSpacing: 1.2))), 42 | Divider( 43 | color: Colors.blue, 44 | ), 45 | GestureDetector( 46 | onTap: () { 47 | _navToWeb(context, "项目地址", 48 | "https://github.com/ChenLittlePing/Daily"); 49 | }, 50 | child: Container( 51 | margin: EdgeInsets.all(8.0), 52 | child: RichText( 53 | text: TextSpan(children: [ 54 | TextSpan( 55 | text: "项目地址(喜欢就给个Star吧😊):\n", 56 | style: TextStyle( 57 | fontSize: 15.0, 58 | height: 1.5, 59 | color: Colors.black87, 60 | letterSpacing: 1.2)), 61 | TextSpan( 62 | text: "https://github.com/ChenLittlePing/Daily", 63 | style: TextStyle( 64 | fontSize: 15.0, 65 | height: 1.5, 66 | letterSpacing: 1.2, 67 | color: Colors.blue, 68 | decoration: TextDecoration.underline)) 69 | ])))), 70 | Divider( 71 | color: Colors.blue, 72 | ), 73 | GestureDetector( 74 | onTap: () { 75 | _navToWeb(context, "相关API", 76 | "https://github.com/ChenLittlePing/-Api"); 77 | }, 78 | child: Container( 79 | margin: EdgeInsets.all(8.0), 80 | child: RichText( 81 | text: TextSpan(children: [ 82 | TextSpan( 83 | text: "Api来自:\n", 84 | style: TextStyle( 85 | fontSize: 15.0, 86 | height: 1.5, 87 | color: Colors.black87, 88 | letterSpacing: 1.2)), 89 | TextSpan( 90 | text: "https://github.com/ChenLittlePing/-Api", 91 | style: TextStyle( 92 | fontSize: 15.0, 93 | height: 1.5, 94 | letterSpacing: 1.2, 95 | color: Colors.blue, 96 | decoration: TextDecoration.underline)) 97 | ])))), 98 | Divider( 99 | color: Colors.blue, 100 | ), 101 | Container( 102 | margin: EdgeInsets.all(8.0), 103 | child: Text( 104 | "使用组件:\nScaffold、Container、Center、ListView、" 105 | "GridView、PageView、Image、Text、RichText等等", 106 | style: TextStyle( 107 | fontSize: 15.0, height: 1.5, letterSpacing: 1.2))), 108 | Divider( 109 | color: Colors.blue, 110 | ), 111 | Container( 112 | margin: EdgeInsets.all(8.0), 113 | child: Text( 114 | "使用框架:\n- 网络框架dio\n- 图片显示缓存框架cached_network_image\n" 115 | "- 日期格式化工具int\n- WebView插件flutter_webview_plugin", 116 | style: TextStyle( 117 | fontSize: 15.0, height: 1.5, letterSpacing: 1.2))), 118 | Divider( 119 | color: Colors.blue, 120 | ), 121 | Container( 122 | alignment: Alignment.center, 123 | margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 24.0), 124 | child: Text("仅供学习,禁止商用\n侵权请联系删除,谢谢!", 125 | textAlign: TextAlign.center, 126 | style: TextStyle( 127 | fontSize: 15.0, 128 | height: 1.5, 129 | fontWeight: FontWeight.bold, 130 | letterSpacing: 1.2, 131 | color: Colors.blue))) 132 | ])), 133 | ))); 134 | } 135 | 136 | _navToWeb(context, String title, String url) { 137 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 138 | return new Web(title, url); 139 | })); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /lib/ui/speech/speech_video.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:daily/bean/speech_intro.dart'; 4 | import 'package:daily/bean/video.dart'; 5 | import 'package:daily/net/api_yx/yx_api.dart'; 6 | import 'package:daily/ui/speech/speech_article.dart'; 7 | import 'package:daily/widget/auto_scaffold.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | import 'package:chewie/chewie.dart'; 11 | import 'package:video_player/video_player.dart'; 12 | import 'package:screen/screen.dart'; 13 | 14 | class SpeechVideo extends StatefulWidget { 15 | final SpeechIntro _intro; 16 | 17 | SpeechVideo(this._intro); 18 | 19 | @override 20 | State createState() => SpeechVideoState(); 21 | } 22 | 23 | class SpeechVideoState extends State { 24 | VideoPlayerController _controller; 25 | 26 | Video _video; 27 | 28 | var _comments = []; 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | _getVideoDetail(); 34 | Screen.keepOn(true); 35 | } 36 | 37 | @override 38 | void dispose() { 39 | Screen.keepOn(false); 40 | super.dispose(); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return AutoScaffold( 46 | context: context, 47 | title: widget._intro.title, 48 | color: Colors.white, 49 | body: _video == null 50 | ? Container(child: Center(child: Text("正在加载..."))) 51 | : SingleChildScrollView( 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | children: [ 55 | new Chewie( 56 | _controller, 57 | autoPlay: true, 58 | looping: false, 59 | placeholder: Container( 60 | color: Colors.black, 61 | ), 62 | ), 63 | Container( 64 | color: Colors.white, 65 | padding: EdgeInsets.all(12.0), 66 | child: Column( 67 | crossAxisAlignment: CrossAxisAlignment.start, 68 | children: [ 69 | Text(widget._intro.title, 70 | style: TextStyle(fontSize: 22.0, color: Colors.black)), 71 | Container( 72 | margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 16.0), 73 | child: Text( 74 | "#" + 75 | widget._intro.category + 76 | " / " + 77 | widget._intro.city + 78 | " / " + 79 | widget._intro.date, 80 | style: TextStyle( 81 | fontSize: 14.5, 82 | color: Colors.black54, 83 | height: 1.5, 84 | letterSpacing: 1.2)), 85 | ), 86 | Text(widget._intro.content, 87 | style: TextStyle( 88 | fontSize: 16.0, 89 | color: Colors.black87, 90 | wordSpacing: 1.2)), 91 | GestureDetector( 92 | onTap: _navToArticle, 93 | child: Text("查看完整演讲稿", 94 | style: TextStyle( 95 | fontSize: 16.5, 96 | color: Colors.deepOrangeAccent, 97 | height: 1.5)), 98 | ), 99 | Stack( 100 | alignment: Alignment.topCenter, 101 | children: [ 102 | Container( 103 | margin: EdgeInsets.fromLTRB(0.0, 40.0, 0.0, 0.0), 104 | decoration: BoxDecoration( 105 | border: new Border.all( 106 | color: Colors.grey, 107 | width: 0.5, 108 | )), 109 | child: Column(children: [ 110 | Container( 111 | constraints: new BoxConstraints(minHeight: 40.0), 112 | ), 113 | Container( 114 | margin: EdgeInsets.all(20.0), 115 | child: Text(widget._intro.speaker.intro, 116 | style: 117 | TextStyle(height: 1.5, fontSize: 16.0))) 118 | ]), 119 | ), 120 | Column( 121 | children: [ 122 | Container( 123 | decoration: BoxDecoration( 124 | color: Colors.white, 125 | border: Border.all( 126 | width: 10.0, color: Colors.white)), 127 | child: new ClipOval( 128 | child: new SizedBox( 129 | width: 60.0, 130 | height: 60.0, 131 | child: new Image.network( 132 | widget._intro.speaker.avatar, 133 | fit: BoxFit.cover, 134 | ), 135 | ), 136 | ), 137 | ), 138 | Text(widget._intro.speaker.name, 139 | style: TextStyle( 140 | color: Colors.black87, fontSize: 15.0)) 141 | ], 142 | ) 143 | ], 144 | ), 145 | ], 146 | ), 147 | ), 148 | Text(" 热门评论", style: TextStyle(height: 2.0),), 149 | Divider(), 150 | Container( 151 | margin: EdgeInsets.all(12.0), 152 | child: ListBody(children: _getCommentViews()) 153 | ) 154 | ], 155 | )), 156 | ); 157 | } 158 | 159 | List _getCommentViews() { 160 | var views = []; 161 | for (var comment in _comments) { 162 | views.add(Row( 163 | children: [ 164 | new ClipOval( 165 | child: new SizedBox( 166 | width: 60.0, 167 | height: 60.0, 168 | child: new Image.network( 169 | comment.avatar, 170 | fit: BoxFit.cover, 171 | ), 172 | ), 173 | ), 174 | Container( 175 | width: 12.0, 176 | ), 177 | Expanded( 178 | child: Column( 179 | crossAxisAlignment: CrossAxisAlignment.start, 180 | children: [ 181 | Text(comment.nickname, style: TextStyle(height: 2.5)), 182 | Text(comment.content, style: TextStyle(height: 1.0, color: Colors.black54)), 183 | Text(comment.created, style: TextStyle(height: 2.0, color: Colors.black45)) 184 | ], 185 | )), 186 | Container( 187 | width: 12.0, 188 | ), 189 | ], 190 | )); 191 | views.add(Divider()); 192 | } 193 | return views; 194 | } 195 | 196 | Future _getVideoDetail() async { 197 | new YxApi().getSpeechDetail(widget._intro.id, (data) { 198 | var speech = data["data"]["speech"]; 199 | var video = speech["video"]; 200 | var comments = data["data"]["hot_comments"]; 201 | for (var comment in comments) { 202 | _comments.add(Comments(comment["content"], comment["nickname"], 203 | comment["created"], comment["avatar"])); 204 | } 205 | setState(() { 206 | _video = Video( 207 | video[0]["video_url"], video[1]["video_url"], widget._intro.cover, speech["draft"]); 208 | _controller = new VideoPlayerController.network(_video.sUrl); 209 | print(_video.sUrl); 210 | }); 211 | }, (error, code) {}); 212 | return null; 213 | } 214 | 215 | _navToArticle() { 216 | Navigator.push(context, new MaterialPageRoute(builder: (context){ 217 | return new SpeechArticle(widget._intro.title, widget._intro.speaker.name, _video.draft); 218 | })); 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:daily/bean/tc_item.dart'; 4 | import 'package:daily/net/api_tc/tc_api.dart'; 5 | import 'package:daily/ui/about/about.dart'; 6 | import 'package:daily/ui/article/article_page.dart'; 7 | import 'package:daily/ui/photo/photo_ppt.dart'; 8 | import 'package:daily/ui/photo/photo_list.dart'; 9 | import 'package:daily/ui/speech/speech_list.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:flutter/foundation.dart'; 12 | import 'package:cached_network_image/cached_network_image.dart'; 13 | 14 | void main() => runApp(new MyApp()); 15 | 16 | class MyApp extends StatelessWidget { 17 | // This widget is the root of your application. 18 | @override 19 | Widget build(BuildContext context) { 20 | return new MaterialApp( 21 | title: '每日图文', 22 | theme: new ThemeData( 23 | // This is the theme of your application. 24 | // 25 | // Try running your application with "flutter run". You'll see the 26 | // application has a blue toolbar. Then, without quitting the app, try 27 | // changing the primarySwatch below to Colors.green and then invoke 28 | // "hot reload" (press "r" in the console where you ran "flutter run", 29 | // or press Run > Flutter Hot Reload in IntelliJ). Notice that the 30 | // counter didn't reset back to zero; the application is not restarted. 31 | primarySwatch: Colors.blue, 32 | ), 33 | home: new _HomePage(), 34 | ); 35 | } 36 | } 37 | 38 | class _HomePage extends StatefulWidget { 39 | @override 40 | _HomePageState createState() => new _HomePageState(); 41 | } 42 | 43 | class _HomePageState extends State<_HomePage> { 44 | int count = 0; 45 | var items = Map>(); 46 | String nextId; 47 | var curPage = 0; 48 | var scaffoldContext; 49 | 50 | @override 51 | void initState() { 52 | super.initState(); 53 | 54 | _getNews(1, null); 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return new Scaffold( 60 | drawer: new Drawer( 61 | child: Column( 62 | children: [ 63 | Container( 64 | height: 150.0, 65 | padding: EdgeInsets.fromLTRB(12.0, 32.0, 12.0, 12.0), 66 | color: Colors.blue, 67 | alignment: Alignment.center, 68 | child: Text( 69 | "每日图文", 70 | style: TextStyle( 71 | fontSize: 20.0, 72 | color: Colors.white, 73 | fontWeight: FontWeight.bold), 74 | ), 75 | ), 76 | Divider(color: Colors.transparent), 77 | ListTile( 78 | title: Text("每日图片", 79 | style: TextStyle(fontSize: 16.0, color: Colors.blue)), 80 | leading: Icon(Icons.picture_in_picture_alt, color: Colors.blue), 81 | onTap: _clickPicList, 82 | ), 83 | Divider(), 84 | ListTile( 85 | title: Text("每日文章", style: TextStyle(fontSize: 16.0)), 86 | leading: Icon(Icons.chrome_reader_mode), 87 | onTap: _clickArticleList, 88 | ), 89 | Divider(), 90 | ListTile( 91 | title: Text("一席演讲", style: TextStyle(fontSize: 16.0)), 92 | leading: Icon(Icons.video_library), 93 | onTap: _clickSpeechList, 94 | ), 95 | Divider(), 96 | ListTile( 97 | title: Text("关于", style: TextStyle(fontSize: 16.0)), 98 | leading: Icon(Icons.announcement), 99 | onTap: _clickAbout, 100 | ), 101 | ], 102 | ), 103 | ), 104 | appBar: new AppBar( 105 | title: new Text("热门图片"), 106 | centerTitle: true, 107 | elevation: 108 | Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0), 109 | body: new RefreshIndicator( 110 | onRefresh: () { 111 | return _getNews(1, null); 112 | }, 113 | child: new ListView.builder( 114 | physics: AlwaysScrollableScrollPhysics(), 115 | itemCount: count, 116 | itemBuilder: (context, index) { 117 | scaffoldContext = context; 118 | if (items.length > 0 && index >= items.length - 1) { 119 | // 自动加载更多 120 | _getNews(curPage, nextId); 121 | } 122 | return GestureDetector( 123 | onTap: () { 124 | _clickPic(index); 125 | }, 126 | child: Hero( 127 | tag: "tag-" + index.toString() + "-0", 128 | child: Card( 129 | margin: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 130 | child: AspectRatio( 131 | aspectRatio: 1.0, 132 | child: Stack( 133 | fit: StackFit.expand, 134 | children: [ 135 | new CachedNetworkImage( 136 | imageUrl: items[index][0].url, 137 | placeholder: Container( 138 | child: Image 139 | .asset("images/ic-pic-loading.png"), 140 | ), 141 | fit: BoxFit.cover, 142 | errorWidget: new Icon(Icons.error), 143 | ), 144 | Container( 145 | padding: const EdgeInsets.all(12.0), 146 | decoration: new BoxDecoration( 147 | color: Colors.black45, 148 | ), 149 | child: Center( 150 | child: Text( 151 | items[index][0].title.length != 0 152 | ? items[index][0].title 153 | : items[index][0].content, 154 | textAlign: TextAlign.left, 155 | style: TextStyle( 156 | fontSize: 16.0, 157 | fontWeight: FontWeight.bold, 158 | color: Colors.white, 159 | ), 160 | ), 161 | )), 162 | ], 163 | ))), 164 | )); 165 | }), 166 | ), 167 | ); 168 | } 169 | 170 | Future _getNews(page, postId) async { 171 | if (page > 1 && postId == null) return null; 172 | this.curPage = page; 173 | TCApi().getNew(page, postId, _getNewSuccess, _getNewFail); 174 | return null; 175 | } 176 | 177 | void _getNewSuccess(data) { 178 | if (curPage == 1) { 179 | setState(() { 180 | this.items.clear(); 181 | this.count = 0; 182 | this.nextId = null; 183 | }); 184 | } 185 | var map = Map>(); 186 | int count = this.count; 187 | curPage++; 188 | for (var d in data["feedList"]) { 189 | if (d != []) { 190 | var items = []; 191 | for (var img in d["images"]) { 192 | if (img != null) { 193 | String url = "https://photo.tuchong.com/" + 194 | d["author_id"].toString() + 195 | "/f/" + 196 | img["img_id"].toString() + 197 | ".jpg"; 198 | 199 | items.add(TCItem(d["title"], d["content"], url)); 200 | } 201 | } 202 | if (items.length > 0) { 203 | map.putIfAbsent(count, () => items); 204 | count++; 205 | } 206 | } 207 | } 208 | 209 | setState(() { 210 | this.items.addAll(map); 211 | this.count = count; 212 | if (data["feedList"].length > 0) { 213 | var list = data["feedList"]; 214 | this.nextId = list[list.length - 1]["post_id"].toString(); 215 | } 216 | }); 217 | } 218 | 219 | void _getNewFail(error, code) { 220 | if (scaffoldContext != null) { 221 | Scaffold 222 | .of(scaffoldContext) 223 | .showSnackBar(new SnackBar(content: new Text(error))); 224 | } 225 | } 226 | 227 | void _clickPic(index) { 228 | if (items[index].length > 1) { 229 | _navTo(PhotoList(items[index], index)); 230 | } else { 231 | _navTo(new PhotoPPT(items[index], index, 0)); 232 | } 233 | } 234 | 235 | void _clickPicList() { 236 | Navigator.pop(context); 237 | } 238 | 239 | void _clickArticleList() { 240 | Navigator.pop(context); 241 | _navTo(ArticlePage()); 242 | } 243 | 244 | void _clickSpeechList() { 245 | Navigator.pop(context); 246 | _navTo(SpeechList()); 247 | } 248 | 249 | void _clickAbout() { 250 | Navigator.pop(context); 251 | _navTo(About()); 252 | } 253 | 254 | void _navTo(Widget widget) { 255 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) { 256 | return widget; 257 | })); 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /lib/ui/speech/speech_list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:daily/bean/speech_intro.dart'; 5 | import 'package:daily/net/api_yx/yx_api.dart'; 6 | import 'package:daily/ui/speech/speech_video.dart'; 7 | import 'package:daily/utils/media/audio/audio_player.dart'; 8 | import 'package:daily/widget/auto_scaffold.dart'; 9 | import 'package:flutter/material.dart'; 10 | 11 | class SpeechList extends StatefulWidget { 12 | @override 13 | State createState() => _SpeechListState(); 14 | } 15 | 16 | class _SpeechListState extends State { 17 | //静态持有,当退出重新进入时,数据和播放状态才能恢复 18 | static var _items = []; 19 | static var _page = 1; 20 | static var _max = 2; 21 | static var _playingIndex = -1; 22 | 23 | var _player = new APlayer(); 24 | Duration _duration = Duration(), _position = Duration(); 25 | 26 | Timer _seekTimer; 27 | 28 | @override 29 | void initState() { 30 | super.initState(); 31 | _initPlayer(); 32 | if (_items.length == 0) { 33 | _getSpeeches(1); 34 | } 35 | } 36 | 37 | void _initPlayer() { 38 | _player.setDurationHandler(_handlerDuration); 39 | _player.setPositionHandler(_handlerPosition); 40 | _player.setCompletionHandler(_handlerCompletion); 41 | _duration = _player.getDuration(); 42 | _position = _player.getPosition(); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return new AutoScaffold( 48 | context: context, 49 | title: "精彩演讲", 50 | body: new RefreshIndicator( 51 | onRefresh: () { 52 | return _getSpeeches(1); 53 | }, 54 | child: new ListView.builder( 55 | itemCount: _items.length, 56 | itemBuilder: (context, index) { 57 | if (index >= (_items.length - 1) && _page < _max) { 58 | _getSpeeches(_page + 1); 59 | } 60 | var item = _items[index]; 61 | return GestureDetector( 62 | onTap: () { 63 | _clickItem(item); 64 | }, 65 | child: Card( 66 | margin: const EdgeInsets.fromLTRB(8.0, 4.0, 8.0, 4.0), 67 | child: Column( 68 | crossAxisAlignment: CrossAxisAlignment.start, 69 | mainAxisAlignment: MainAxisAlignment.start, 70 | children: [ 71 | Stack(alignment: Alignment.bottomCenter, children: < 72 | Widget>[ 73 | Stack(alignment: Alignment.center, children: [ 74 | Container( 75 | foregroundDecoration: 76 | BoxDecoration(color: Colors.black45), 77 | child: CachedNetworkImage( 78 | imageUrl: item.cover, 79 | fit: BoxFit.cover, 80 | errorWidget: new Icon(Icons.error)), 81 | ), 82 | GestureDetector( 83 | onTap: () {_play(item, index);}, 84 | child: Image.asset(_playingIndex == index 85 | ? (item.playing 86 | ? "images/ic-playing.png" 87 | : "images/ic-pause.png") 88 | : "images/ic-play.png") 89 | ) 90 | ]), 91 | Container( 92 | color: Colors.black54, 93 | alignment: Alignment.center, 94 | child: Offstage( 95 | offstage: _playingIndex != index, 96 | child: Row( 97 | crossAxisAlignment: CrossAxisAlignment.center, 98 | mainAxisAlignment: MainAxisAlignment.center, 99 | children: [ 100 | Container( 101 | width: 65.0, 102 | child: Text( 103 | _sec2hms(_position.inSeconds), 104 | style: TextStyle( 105 | color: Colors.white))), 106 | SliderTheme( 107 | data: SliderTheme.of(context).copyWith( 108 | activeTrackColor: Colors.lightBlue, 109 | inactiveTrackColor: Colors.white, 110 | thumbColor: Colors.lightBlue, 111 | overlayColor: Colors.white, 112 | valueIndicatorColor: Colors.white, 113 | valueIndicatorTextStyle: 114 | TextStyle(color: Colors.black)), 115 | child: Slider( 116 | onChanged: (value) { 117 | _delaySeek(value); 118 | }, 119 | value: _position.inSeconds.toDouble(), 120 | label: _sec2hms(_position.inSeconds), 121 | min: 0.0, 122 | max: _duration.inSeconds.toDouble(), 123 | divisions: _duration.inSeconds > 0 124 | ? _duration.inSeconds 125 | : 1, 126 | )), 127 | Container( 128 | width: 65.0, 129 | child: Text( 130 | _sec2hms(_duration.inSeconds), 131 | style: TextStyle( 132 | color: Colors.white))), 133 | ], 134 | ))) 135 | ]), 136 | Container( 137 | margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 4.0), 138 | child: Text(item.speaker.name, 139 | style: TextStyle( 140 | fontSize: 16.0, color: Colors.black87)), 141 | ), 142 | Container( 143 | margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 4.0), 144 | child: Text( 145 | item.title, 146 | style: TextStyle( 147 | fontSize: 18.0, fontWeight: FontWeight.bold), 148 | )), 149 | Container( 150 | margin: EdgeInsets.all(8.0), 151 | child: Text(item.content, 152 | style: TextStyle( 153 | fontSize: 14.0, letterSpacing: 1.2))) 154 | ], 155 | )), 156 | ); 157 | }, 158 | ), 159 | ), 160 | ); 161 | } 162 | 163 | Future _getSpeeches(int page) async { 164 | new YxApi().getSpeeches(page, (data) { 165 | _page = data["data"]["page"]; 166 | _max = data["data"]["pageSize"]; 167 | _formatData(data["data"]["speechs"]); 168 | }, (error, code) {}); 169 | return null; 170 | } 171 | 172 | void _formatData(speeches) { 173 | var items = []; 174 | for (var speech in speeches) { 175 | var speak = speech["speaker"]; 176 | var speaker = Speaker(speak["type_speaker"], speak["intro"], 177 | speak["avatar"], speak["name"]); 178 | var intro = SpeechIntro(); 179 | 180 | intro.id = speech["id"]; 181 | intro.title = speech["title"]; 182 | intro.cover = speech["video_cover"]; 183 | intro.audioUrl = speech["audio"]; 184 | intro.content = speech["titlelanguage"]; 185 | intro.date = speech["speechdate"]; 186 | intro.city = speech["speechcity"]; 187 | intro.category = speech["speechcategory"]; 188 | intro.speaker = speaker; 189 | 190 | items.add(intro); 191 | } 192 | 193 | setState(() { 194 | if (_page == 1) _items.clear(); 195 | _items.addAll(items); 196 | }); 197 | } 198 | 199 | void _clickItem(SpeechIntro item) { 200 | Navigator.of(context).push(new MaterialPageRoute(builder: (context){ 201 | return SpeechVideo(item); 202 | })); 203 | } 204 | 205 | void _play(SpeechIntro item, index) { 206 | if (!item.playing) { 207 | _player.play(item.audioUrl).then((result) { 208 | if (result) { 209 | setState(() { 210 | if (_playingIndex > -1) { 211 | var it = _items[_playingIndex]; 212 | it.playing = false; 213 | } 214 | _playingIndex = index; 215 | item.playing = true; 216 | }); 217 | } 218 | }); 219 | } else { 220 | _player.pause().then((result) { 221 | if (result) { 222 | setState(() { 223 | item.playing = false; 224 | }); 225 | } 226 | }); 227 | } 228 | } 229 | 230 | void _handlerDuration(Duration duration) { 231 | setState(() { 232 | _duration = duration; 233 | }); 234 | } 235 | 236 | void _handlerPosition(Duration duration) { 237 | setState(() { 238 | if (_seekTimer != null && _seekTimer.isActive) return; 239 | _position = duration; 240 | }); 241 | } 242 | 243 | void _handlerCompletion() { 244 | setState(() { 245 | _items[_playingIndex].playing = false; 246 | _playingIndex = -1; 247 | }); 248 | } 249 | 250 | String _sec2hms(int second) { 251 | int hour = second ~/ 3600; 252 | int min = (second - hour * 3600) ~/ 60; 253 | int sec = second - hour * 3600 - min * 60; 254 | 255 | String time = hour < 10 ? "0" + hour.toString() : hour.toString(); 256 | time += ":" + (min < 10 ? "0" + min.toString() : min.toString()); 257 | time += ":" + (sec < 10 ? "0" + sec.toString() : sec.toString()); 258 | 259 | return time; 260 | } 261 | 262 | void _delaySeek(double seconds) { 263 | setState(() { 264 | _position = Duration(seconds: seconds.toInt()); 265 | }); 266 | if (_seekTimer == null) { 267 | _starSeekTimer(seconds); 268 | } else { 269 | _seekTimer.cancel(); 270 | _starSeekTimer(seconds); 271 | } 272 | } 273 | 274 | void _starSeekTimer(double seconds) { 275 | _seekTimer = Timer(Duration(seconds: 1), 276 | () { 277 | _player.seek(seconds); 278 | }); 279 | } 280 | } 281 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "0.31.2-alpha.2" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.4.3" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.0.7" 25 | audioplayer: 26 | dependency: "direct main" 27 | description: 28 | name: audioplayer 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "0.4.0" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.0.3" 39 | cached_network_image: 40 | dependency: "direct main" 41 | description: 42 | name: cached_network_image 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "0.4.1+1" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "1.1.1" 53 | chewie: 54 | dependency: "direct main" 55 | description: 56 | name: chewie 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "0.5.0" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "1.14.6" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.flutter-io.cn" 72 | source: hosted 73 | version: "2.0.1" 74 | cookie_jar: 75 | dependency: transitive 76 | description: 77 | name: cookie_jar 78 | url: "https://pub.flutter-io.cn" 79 | source: hosted 80 | version: "0.0.4" 81 | crypto: 82 | dependency: transitive 83 | description: 84 | name: crypto 85 | url: "https://pub.flutter-io.cn" 86 | source: hosted 87 | version: "2.0.3" 88 | csslib: 89 | dependency: transitive 90 | description: 91 | name: csslib 92 | url: "https://pub.flutter-io.cn" 93 | source: hosted 94 | version: "0.14.4" 95 | cupertino_icons: 96 | dependency: "direct main" 97 | description: 98 | name: cupertino_icons 99 | url: "https://pub.flutter-io.cn" 100 | source: hosted 101 | version: "0.1.2" 102 | dio: 103 | dependency: "direct main" 104 | description: 105 | name: dio 106 | url: "https://pub.flutter-io.cn" 107 | source: hosted 108 | version: "0.0.14" 109 | flutter: 110 | dependency: "direct main" 111 | description: flutter 112 | source: sdk 113 | version: "0.0.0" 114 | flutter_cache_manager: 115 | dependency: transitive 116 | description: 117 | name: flutter_cache_manager 118 | url: "https://pub.flutter-io.cn" 119 | source: hosted 120 | version: "0.1.1" 121 | flutter_custom_tabs: 122 | dependency: transitive 123 | description: 124 | name: flutter_custom_tabs 125 | url: "https://pub.flutter-io.cn" 126 | source: hosted 127 | version: "0.1.0" 128 | flutter_html_view: 129 | dependency: "direct main" 130 | description: 131 | name: flutter_html_view 132 | url: "https://pub.flutter-io.cn" 133 | source: hosted 134 | version: "0.5.2" 135 | flutter_test: 136 | dependency: "direct dev" 137 | description: flutter 138 | source: sdk 139 | version: "0.0.0" 140 | flutter_webview_plugin: 141 | dependency: "direct main" 142 | description: 143 | name: flutter_webview_plugin 144 | url: "https://pub.flutter-io.cn" 145 | source: hosted 146 | version: "0.1.6" 147 | front_end: 148 | dependency: transitive 149 | description: 150 | name: front_end 151 | url: "https://pub.flutter-io.cn" 152 | source: hosted 153 | version: "0.1.0-alpha.12" 154 | glob: 155 | dependency: transitive 156 | description: 157 | name: glob 158 | url: "https://pub.flutter-io.cn" 159 | source: hosted 160 | version: "1.1.5" 161 | html: 162 | dependency: transitive 163 | description: 164 | name: html 165 | url: "https://pub.flutter-io.cn" 166 | source: hosted 167 | version: "0.13.3" 168 | http: 169 | dependency: transitive 170 | description: 171 | name: http 172 | url: "https://pub.flutter-io.cn" 173 | source: hosted 174 | version: "0.11.3+16" 175 | http_multi_server: 176 | dependency: transitive 177 | description: 178 | name: http_multi_server 179 | url: "https://pub.flutter-io.cn" 180 | source: hosted 181 | version: "2.0.4" 182 | http_parser: 183 | dependency: transitive 184 | description: 185 | name: http_parser 186 | url: "https://pub.flutter-io.cn" 187 | source: hosted 188 | version: "3.1.2" 189 | intl: 190 | dependency: "direct main" 191 | description: 192 | name: intl 193 | url: "https://pub.flutter-io.cn" 194 | source: hosted 195 | version: "0.15.6" 196 | io: 197 | dependency: transitive 198 | description: 199 | name: io 200 | url: "https://pub.flutter-io.cn" 201 | source: hosted 202 | version: "0.3.2+1" 203 | js: 204 | dependency: transitive 205 | description: 206 | name: js 207 | url: "https://pub.flutter-io.cn" 208 | source: hosted 209 | version: "0.6.1" 210 | kernel: 211 | dependency: transitive 212 | description: 213 | name: kernel 214 | url: "https://pub.flutter-io.cn" 215 | source: hosted 216 | version: "0.3.0-alpha.12" 217 | logging: 218 | dependency: transitive 219 | description: 220 | name: logging 221 | url: "https://pub.flutter-io.cn" 222 | source: hosted 223 | version: "0.11.3+1" 224 | matcher: 225 | dependency: transitive 226 | description: 227 | name: matcher 228 | url: "https://pub.flutter-io.cn" 229 | source: hosted 230 | version: "0.12.2+1" 231 | meta: 232 | dependency: transitive 233 | description: 234 | name: meta 235 | url: "https://pub.flutter-io.cn" 236 | source: hosted 237 | version: "1.1.5" 238 | mime: 239 | dependency: transitive 240 | description: 241 | name: mime 242 | url: "https://pub.flutter-io.cn" 243 | source: hosted 244 | version: "0.9.6" 245 | multi_server_socket: 246 | dependency: transitive 247 | description: 248 | name: multi_server_socket 249 | url: "https://pub.flutter-io.cn" 250 | source: hosted 251 | version: "1.0.1" 252 | node_preamble: 253 | dependency: transitive 254 | description: 255 | name: node_preamble 256 | url: "https://pub.flutter-io.cn" 257 | source: hosted 258 | version: "1.4.1" 259 | open_iconic_flutter: 260 | dependency: transitive 261 | description: 262 | name: open_iconic_flutter 263 | url: "https://pub.flutter-io.cn" 264 | source: hosted 265 | version: "0.2.0" 266 | package_config: 267 | dependency: transitive 268 | description: 269 | name: package_config 270 | url: "https://pub.flutter-io.cn" 271 | source: hosted 272 | version: "1.0.3" 273 | package_resolver: 274 | dependency: transitive 275 | description: 276 | name: package_resolver 277 | url: "https://pub.flutter-io.cn" 278 | source: hosted 279 | version: "1.0.2" 280 | path: 281 | dependency: transitive 282 | description: 283 | name: path 284 | url: "https://pub.flutter-io.cn" 285 | source: hosted 286 | version: "1.5.1" 287 | path_provider: 288 | dependency: transitive 289 | description: 290 | name: path_provider 291 | url: "https://pub.flutter-io.cn" 292 | source: hosted 293 | version: "0.4.1" 294 | plugin: 295 | dependency: transitive 296 | description: 297 | name: plugin 298 | url: "https://pub.flutter-io.cn" 299 | source: hosted 300 | version: "0.2.0+2" 301 | pool: 302 | dependency: transitive 303 | description: 304 | name: pool 305 | url: "https://pub.flutter-io.cn" 306 | source: hosted 307 | version: "1.3.4" 308 | pub_semver: 309 | dependency: transitive 310 | description: 311 | name: pub_semver 312 | url: "https://pub.flutter-io.cn" 313 | source: hosted 314 | version: "1.4.1" 315 | quiver: 316 | dependency: transitive 317 | description: 318 | name: quiver 319 | url: "https://pub.flutter-io.cn" 320 | source: hosted 321 | version: "0.29.0+1" 322 | screen: 323 | dependency: "direct main" 324 | description: 325 | name: screen 326 | url: "https://pub.flutter-io.cn" 327 | source: hosted 328 | version: "0.0.3" 329 | shared_preferences: 330 | dependency: transitive 331 | description: 332 | name: shared_preferences 333 | url: "https://pub.flutter-io.cn" 334 | source: hosted 335 | version: "0.4.2" 336 | shelf: 337 | dependency: transitive 338 | description: 339 | name: shelf 340 | url: "https://pub.flutter-io.cn" 341 | source: hosted 342 | version: "0.7.3" 343 | shelf_packages_handler: 344 | dependency: transitive 345 | description: 346 | name: shelf_packages_handler 347 | url: "https://pub.flutter-io.cn" 348 | source: hosted 349 | version: "1.0.3" 350 | shelf_static: 351 | dependency: transitive 352 | description: 353 | name: shelf_static 354 | url: "https://pub.flutter-io.cn" 355 | source: hosted 356 | version: "0.2.7" 357 | shelf_web_socket: 358 | dependency: transitive 359 | description: 360 | name: shelf_web_socket 361 | url: "https://pub.flutter-io.cn" 362 | source: hosted 363 | version: "0.2.2" 364 | sky_engine: 365 | dependency: transitive 366 | description: flutter 367 | source: sdk 368 | version: "0.0.99" 369 | source_map_stack_trace: 370 | dependency: transitive 371 | description: 372 | name: source_map_stack_trace 373 | url: "https://pub.flutter-io.cn" 374 | source: hosted 375 | version: "1.1.4" 376 | source_maps: 377 | dependency: transitive 378 | description: 379 | name: source_maps 380 | url: "https://pub.flutter-io.cn" 381 | source: hosted 382 | version: "0.10.5" 383 | source_span: 384 | dependency: transitive 385 | description: 386 | name: source_span 387 | url: "https://pub.flutter-io.cn" 388 | source: hosted 389 | version: "1.4.0" 390 | stack_trace: 391 | dependency: transitive 392 | description: 393 | name: stack_trace 394 | url: "https://pub.flutter-io.cn" 395 | source: hosted 396 | version: "1.9.2" 397 | stream_channel: 398 | dependency: transitive 399 | description: 400 | name: stream_channel 401 | url: "https://pub.flutter-io.cn" 402 | source: hosted 403 | version: "1.6.6" 404 | string_scanner: 405 | dependency: transitive 406 | description: 407 | name: string_scanner 408 | url: "https://pub.flutter-io.cn" 409 | source: hosted 410 | version: "1.0.2" 411 | synchronized: 412 | dependency: transitive 413 | description: 414 | name: synchronized 415 | url: "https://pub.flutter-io.cn" 416 | source: hosted 417 | version: "1.4.0" 418 | term_glyph: 419 | dependency: transitive 420 | description: 421 | name: term_glyph 422 | url: "https://pub.flutter-io.cn" 423 | source: hosted 424 | version: "1.0.0" 425 | test: 426 | dependency: transitive 427 | description: 428 | name: test 429 | url: "https://pub.flutter-io.cn" 430 | source: hosted 431 | version: "0.12.37" 432 | typed_data: 433 | dependency: transitive 434 | description: 435 | name: typed_data 436 | url: "https://pub.flutter-io.cn" 437 | source: hosted 438 | version: "1.1.5" 439 | url_launcher: 440 | dependency: transitive 441 | description: 442 | name: url_launcher 443 | url: "https://pub.flutter-io.cn" 444 | source: hosted 445 | version: "3.0.2" 446 | utf: 447 | dependency: transitive 448 | description: 449 | name: utf 450 | url: "https://pub.flutter-io.cn" 451 | source: hosted 452 | version: "0.9.0+4" 453 | uuid: 454 | dependency: transitive 455 | description: 456 | name: uuid 457 | url: "https://pub.flutter-io.cn" 458 | source: hosted 459 | version: "0.5.3" 460 | vector_math: 461 | dependency: transitive 462 | description: 463 | name: vector_math 464 | url: "https://pub.flutter-io.cn" 465 | source: hosted 466 | version: "2.0.6" 467 | video_player: 468 | dependency: transitive 469 | description: 470 | name: video_player 471 | url: "https://pub.flutter-io.cn" 472 | source: hosted 473 | version: "0.5.4" 474 | watcher: 475 | dependency: transitive 476 | description: 477 | name: watcher 478 | url: "https://pub.flutter-io.cn" 479 | source: hosted 480 | version: "0.9.7+7" 481 | web_socket_channel: 482 | dependency: transitive 483 | description: 484 | name: web_socket_channel 485 | url: "https://pub.flutter-io.cn" 486 | source: hosted 487 | version: "1.0.7" 488 | yaml: 489 | dependency: transitive 490 | description: 491 | name: yaml 492 | url: "https://pub.flutter-io.cn" 493 | source: hosted 494 | version: "2.1.13" 495 | sdks: 496 | dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.54.0.flutter-46ab040e58" 497 | flutter: ">=0.2.5 <2.0.0" 498 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 5C4C280909A3C278A54E5FC1 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9802A25413EDD69E82D79A02 /* libPods-Runner.a */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = ""; 30 | dstSubfolderSpec = 10; 31 | files = ( 32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 43 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 9802A25413EDD69E82D79A02 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | 5C4C280909A3C278A54E5FC1 /* libPods-Runner.a in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 23417B7CA2AFBF49EE3F0216 /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 9802A25413EDD69E82D79A02 /* libPods-Runner.a */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | 9740EEB11CF90186004384FC /* Flutter */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 87 | 3B80C3931E831B6300D905FE /* App.framework */, 88 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 89 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 90 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 91 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 92 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 93 | ); 94 | name = Flutter; 95 | sourceTree = ""; 96 | }; 97 | 97C146E51CF9000F007C117D = { 98 | isa = PBXGroup; 99 | children = ( 100 | 9740EEB11CF90186004384FC /* Flutter */, 101 | 97C146F01CF9000F007C117D /* Runner */, 102 | 97C146EF1CF9000F007C117D /* Products */, 103 | E00219AB5E39F3FC0BE4E1E3 /* Pods */, 104 | 23417B7CA2AFBF49EE3F0216 /* Frameworks */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 97C146EF1CF9000F007C117D /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 97C146EE1CF9000F007C117D /* Runner.app */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 97C146F01CF9000F007C117D /* Runner */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 120 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 121 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 122 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 123 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 124 | 97C147021CF9000F007C117D /* Info.plist */, 125 | 97C146F11CF9000F007C117D /* Supporting Files */, 126 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 127 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 128 | ); 129 | path = Runner; 130 | sourceTree = ""; 131 | }; 132 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 97C146F21CF9000F007C117D /* main.m */, 136 | ); 137 | name = "Supporting Files"; 138 | sourceTree = ""; 139 | }; 140 | E00219AB5E39F3FC0BE4E1E3 /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | ); 144 | name = Pods; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | 97C146ED1CF9000F007C117D /* Runner */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 153 | buildPhases = ( 154 | 67B54E70E99370046D1B0394 /* [CP] Check Pods Manifest.lock */, 155 | 9740EEB61CF901F6004384FC /* Run Script */, 156 | 97C146EA1CF9000F007C117D /* Sources */, 157 | 97C146EB1CF9000F007C117D /* Frameworks */, 158 | 97C146EC1CF9000F007C117D /* Resources */, 159 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 160 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 161 | 9AAEFA67F205A0F739C401D1 /* [CP] Embed Pods Frameworks */, 162 | ); 163 | buildRules = ( 164 | ); 165 | dependencies = ( 166 | ); 167 | name = Runner; 168 | productName = Runner; 169 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 170 | productType = "com.apple.product-type.application"; 171 | }; 172 | /* End PBXNativeTarget section */ 173 | 174 | /* Begin PBXProject section */ 175 | 97C146E61CF9000F007C117D /* Project object */ = { 176 | isa = PBXProject; 177 | attributes = { 178 | LastUpgradeCheck = 0940; 179 | ORGANIZATIONNAME = "The Chromium Authors"; 180 | TargetAttributes = { 181 | 97C146ED1CF9000F007C117D = { 182 | CreatedOnToolsVersion = 7.3.1; 183 | }; 184 | }; 185 | }; 186 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 187 | compatibilityVersion = "Xcode 3.2"; 188 | developmentRegion = English; 189 | hasScannedForEncodings = 0; 190 | knownRegions = ( 191 | en, 192 | Base, 193 | ); 194 | mainGroup = 97C146E51CF9000F007C117D; 195 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 196 | projectDirPath = ""; 197 | projectRoot = ""; 198 | targets = ( 199 | 97C146ED1CF9000F007C117D /* Runner */, 200 | ); 201 | }; 202 | /* End PBXProject section */ 203 | 204 | /* Begin PBXResourcesBuildPhase section */ 205 | 97C146EC1CF9000F007C117D /* Resources */ = { 206 | isa = PBXResourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 210 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 211 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 212 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 213 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXShellScriptBuildPhase section */ 220 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputPaths = ( 226 | ); 227 | name = "Thin Binary"; 228 | outputPaths = ( 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | shellPath = /bin/sh; 232 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 233 | }; 234 | 67B54E70E99370046D1B0394 /* [CP] Check Pods Manifest.lock */ = { 235 | isa = PBXShellScriptBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | inputPaths = ( 240 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 241 | "${PODS_ROOT}/Manifest.lock", 242 | ); 243 | name = "[CP] Check Pods Manifest.lock"; 244 | outputPaths = ( 245 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | shellPath = /bin/sh; 249 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 250 | showEnvVarsInLog = 0; 251 | }; 252 | 9740EEB61CF901F6004384FC /* Run Script */ = { 253 | isa = PBXShellScriptBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | inputPaths = ( 258 | ); 259 | name = "Run Script"; 260 | outputPaths = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | shellPath = /bin/sh; 264 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 265 | }; 266 | 9AAEFA67F205A0F739C401D1 /* [CP] Embed Pods Frameworks */ = { 267 | isa = PBXShellScriptBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | inputPaths = ( 272 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 273 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 274 | ); 275 | name = "[CP] Embed Pods Frameworks"; 276 | outputPaths = ( 277 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | shellPath = /bin/sh; 281 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 282 | showEnvVarsInLog = 0; 283 | }; 284 | /* End PBXShellScriptBuildPhase section */ 285 | 286 | /* Begin PBXSourcesBuildPhase section */ 287 | 97C146EA1CF9000F007C117D /* Sources */ = { 288 | isa = PBXSourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 292 | 97C146F31CF9000F007C117D /* main.m in Sources */, 293 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | /* End PBXSourcesBuildPhase section */ 298 | 299 | /* Begin PBXVariantGroup section */ 300 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 301 | isa = PBXVariantGroup; 302 | children = ( 303 | 97C146FB1CF9000F007C117D /* Base */, 304 | ); 305 | name = Main.storyboard; 306 | sourceTree = ""; 307 | }; 308 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 309 | isa = PBXVariantGroup; 310 | children = ( 311 | 97C147001CF9000F007C117D /* Base */, 312 | ); 313 | name = LaunchScreen.storyboard; 314 | sourceTree = ""; 315 | }; 316 | /* End PBXVariantGroup section */ 317 | 318 | /* Begin XCBuildConfiguration section */ 319 | 97C147031CF9000F007C117D /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = YES; 369 | ONLY_ACTIVE_ARCH = YES; 370 | SDKROOT = iphoneos; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Debug; 374 | }; 375 | 97C147041CF9000F007C117D /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 407 | ENABLE_NS_ASSERTIONS = NO; 408 | ENABLE_STRICT_OBJC_MSGSEND = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_NO_COMMON_BLOCKS = YES; 411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 413 | GCC_WARN_UNDECLARED_SELECTOR = YES; 414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 415 | GCC_WARN_UNUSED_FUNCTION = YES; 416 | GCC_WARN_UNUSED_VARIABLE = YES; 417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 418 | MTL_ENABLE_DEBUG_INFO = NO; 419 | SDKROOT = iphoneos; 420 | TARGETED_DEVICE_FAMILY = "1,2"; 421 | VALIDATE_PRODUCT = YES; 422 | }; 423 | name = Release; 424 | }; 425 | 97C147061CF9000F007C117D /* Debug */ = { 426 | isa = XCBuildConfiguration; 427 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 428 | buildSettings = { 429 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 430 | CURRENT_PROJECT_VERSION = 1; 431 | ENABLE_BITCODE = NO; 432 | FRAMEWORK_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "$(PROJECT_DIR)/Flutter", 435 | ); 436 | INFOPLIST_FILE = Runner/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | LIBRARY_SEARCH_PATHS = ( 439 | "$(inherited)", 440 | "$(PROJECT_DIR)/Flutter", 441 | ); 442 | PRODUCT_BUNDLE_IDENTIFIER = com.chenlittleping.daily; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | VERSIONING_SYSTEM = "apple-generic"; 445 | }; 446 | name = Debug; 447 | }; 448 | 97C147071CF9000F007C117D /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 451 | buildSettings = { 452 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 453 | CURRENT_PROJECT_VERSION = 1; 454 | ENABLE_BITCODE = NO; 455 | FRAMEWORK_SEARCH_PATHS = ( 456 | "$(inherited)", 457 | "$(PROJECT_DIR)/Flutter", 458 | ); 459 | INFOPLIST_FILE = Runner/Info.plist; 460 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 461 | LIBRARY_SEARCH_PATHS = ( 462 | "$(inherited)", 463 | "$(PROJECT_DIR)/Flutter", 464 | ); 465 | PRODUCT_BUNDLE_IDENTIFIER = com.chenlittleping.daily; 466 | PRODUCT_NAME = "$(TARGET_NAME)"; 467 | VERSIONING_SYSTEM = "apple-generic"; 468 | }; 469 | name = Release; 470 | }; 471 | /* End XCBuildConfiguration section */ 472 | 473 | /* Begin XCConfigurationList section */ 474 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 475 | isa = XCConfigurationList; 476 | buildConfigurations = ( 477 | 97C147031CF9000F007C117D /* Debug */, 478 | 97C147041CF9000F007C117D /* Release */, 479 | ); 480 | defaultConfigurationIsVisible = 0; 481 | defaultConfigurationName = Release; 482 | }; 483 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147061CF9000F007C117D /* Debug */, 487 | 97C147071CF9000F007C117D /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | /* End XCConfigurationList section */ 493 | }; 494 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 495 | } 496 | --------------------------------------------------------------------------------