├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── kaiyan
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ └── launch_background.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── app-release.apk
├── asset
├── fonts
│ ├── FZLanTingHeiS-DB1-GB-Regular.TTF
│ └── Lobster-1.4.otf
└── images
│ ├── author_account_bg.png
│ ├── daily_label.png
│ ├── ic_tab_strip_icon_category.png
│ ├── ic_tab_strip_icon_category_selected.png
│ ├── ic_tab_strip_icon_feed.png
│ ├── ic_tab_strip_icon_feed_selected.png
│ ├── ic_tab_strip_icon_follow.png
│ ├── ic_tab_strip_icon_follow_selected.png
│ ├── ic_tab_strip_icon_profile.png
│ ├── ic_tab_strip_icon_profile_selected.png
│ ├── pgc_default_avatar.png
│ └── publish_add.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── main.m
├── lib
├── main.dart
├── main_page.dart
├── page
│ ├── detail.dart
│ ├── login.dart
│ ├── main
│ │ ├── page0.dart
│ │ ├── page0
│ │ │ ├── comont_tab_page.dart
│ │ │ ├── found.dart
│ │ │ └── recomand.dart
│ │ ├── page1.dart
│ │ ├── page1
│ │ │ ├── dynamic.dart
│ │ │ └── works.dart
│ │ ├── page2.dart
│ │ ├── page2
│ │ │ ├── interaction.dart
│ │ │ └── notification1.dart
│ │ └── page3.dart
│ └── search.dart
├── util
│ ├── constant.dart
│ └── for_test.dart
└── widget
│ ├── comon_wiget.dart
│ ├── kaiyan_indictor.dart
│ ├── route_animation.dart
│ └── type_text.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | .flutter-plugins
10 | /android/.idea
11 | /.idea
12 | /kaiyan_android.iml
13 | /flutter_01.log
14 | /kaiyan.iml
15 |
--------------------------------------------------------------------------------
/.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: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # 使用 Flutter 仿开眼视频App
3 |
4 | 
5 |
6 | ## 简介
7 |
8 | [Eyepetizer](https://link.jianshu.com/?t=http://www.kaiyanapp.com/) 一直是我个人比较喜欢的app,之前有用原生模仿过开眼的一些效果,文章在[这里](https://wuht.coding.me/2017/09/19/2017-09-19-%E4%BB%BF%E5%BC%80%E7%9C%BC%E8%A7%86%E9%A2%91%E7%9A%84%E4%B8%80%E4%BA%9B%E6%95%88%E6%9E%9C/),本次实践使用跨平台框架 Flutter 开发,对开眼 v4.2.2进行模仿。
9 |
10 | ## 用到的开源库
11 |
12 | - dio: ^0.0.10 --网络请求 [地址](https://github.com/flutterchina/dio)
13 | - scoped_model: "^0.2.0" --状态管理 [地址](https://github.com/brianegan/scoped_model)
14 |
15 | ## Apk下载
16 |
17 | [百度云下载地址](https://pan.baidu.com/s/1RtzKLrGYEJCdfRqO9Jamtw)
18 |
19 | **github**:
20 |
21 | 
22 |
23 | ## 预览图片
24 |
25 | | 首页 | 关注 |
26 | | :----------------------------------------------------------: | :----------------------------------------------------------: |
27 | |  |  |
28 | | **详情页** | **通知** |
29 | |  |  |
30 | | **我的** | **搜索** |
31 | |  |  |
32 | | **上拉加载更多** | **Tabbar处理** |
33 | |  |  |
34 | | **关注吸顶效果** | **最后** |
35 | |  |  |
36 |
37 | ## 项目的地址
38 |
39 | [项目地址](https://github.com/wtus/flutter_kaiyan):https://github.com/wtus/flutter_kaiyan
40 |
41 | ## 心得体会
42 |
43 | - 嵌套太深了,前期一定要注意组织整理一下,其实本Demo做的也不太好,但有点懒的改了,下一个Demo 好好控制一下吧[笑哭]。
44 | - Hot Reload 可以很大程度上提高开发效率,但有时会失效。
45 |
46 | - 性能没有刻意的和原生对比过,但是 release 之后运行速度的确是飞起。
47 |
48 | - 我用过 Weex ,做过H5混合开发,了解过RN,我觉得 Flutter 是十分优秀的。
49 | - 项目中早期有部分命名不规范的问题,危险动作,请勿学习。
50 |
51 | ## 一些说明
52 |
53 | - 视频播放功能没有做,试了几个方案效果都是不是很理想,之后再说
54 | - 使用假数据进行填充,~~api 来自网络 ,【开眼】是一款每日精选视频应用的app,非官方版本,仅作学习交流之用,数据来源于开眼视频视频,数据接口均属于非正常渠道获取,请勿用于商业用途,原作公司拥有所有权利。~~
55 |
56 | ## 后语
57 |
58 | 之后会有一些教程讲解,欢迎关注。
59 |
60 | ## 关于我
61 |
62 | - **Email**: hi54wht@163.com
63 | - **博客**: https://wuht.coding.me/
64 | - **掘金**: https://juejin.im/user/5a3127da5188251c11409f0a
65 | - **简书**: https://www.jianshu.com/u/762002465748
66 |
67 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.example.kaiyan"
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 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/kaiyan/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.kaiyan;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.1.2'
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 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jul 16 11:09:46 CST 2018
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.4-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/app-release.apk
--------------------------------------------------------------------------------
/asset/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF
--------------------------------------------------------------------------------
/asset/fonts/Lobster-1.4.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/fonts/Lobster-1.4.otf
--------------------------------------------------------------------------------
/asset/images/author_account_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/author_account_bg.png
--------------------------------------------------------------------------------
/asset/images/daily_label.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/daily_label.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_category.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_category_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_category_selected.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_feed.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_feed_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_feed_selected.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_follow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_follow.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_follow_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_follow_selected.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_profile.png
--------------------------------------------------------------------------------
/asset/images/ic_tab_strip_icon_profile_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/ic_tab_strip_icon_profile_selected.png
--------------------------------------------------------------------------------
/asset/images/pgc_default_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/pgc_default_avatar.png
--------------------------------------------------------------------------------
/asset/images/publish_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/asset/images/publish_add.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/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 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXCopyFilesBuildPhase section */
27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
28 | isa = PBXCopyFilesBuildPhase;
29 | buildActionMask = 2147483647;
30 | dstPath = "";
31 | dstSubfolderSpec = 10;
32 | files = (
33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
35 | );
36 | name = "Embed Frameworks";
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXCopyFilesBuildPhase section */
40 |
41 | /* Begin PBXFileReference section */
42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
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 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXFrameworksBuildPhase section */
72 |
73 | /* Begin PBXGroup section */
74 | 9740EEB11CF90186004384FC /* Flutter */ = {
75 | isa = PBXGroup;
76 | children = (
77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
78 | 3B80C3931E831B6300D905FE /* App.framework */,
79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
84 | );
85 | name = Flutter;
86 | sourceTree = "";
87 | };
88 | 97C146E51CF9000F007C117D = {
89 | isa = PBXGroup;
90 | children = (
91 | 9740EEB11CF90186004384FC /* Flutter */,
92 | 97C146F01CF9000F007C117D /* Runner */,
93 | 97C146EF1CF9000F007C117D /* Products */,
94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
95 | );
96 | sourceTree = "";
97 | };
98 | 97C146EF1CF9000F007C117D /* Products */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146EE1CF9000F007C117D /* Runner.app */,
102 | );
103 | name = Products;
104 | sourceTree = "";
105 | };
106 | 97C146F01CF9000F007C117D /* Runner */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
111 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
114 | 97C147021CF9000F007C117D /* Info.plist */,
115 | 97C146F11CF9000F007C117D /* Supporting Files */,
116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118 | );
119 | path = Runner;
120 | sourceTree = "";
121 | };
122 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
123 | isa = PBXGroup;
124 | children = (
125 | 97C146F21CF9000F007C117D /* main.m */,
126 | );
127 | name = "Supporting Files";
128 | sourceTree = "";
129 | };
130 | /* End PBXGroup section */
131 |
132 | /* Begin PBXNativeTarget section */
133 | 97C146ED1CF9000F007C117D /* Runner */ = {
134 | isa = PBXNativeTarget;
135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
136 | buildPhases = (
137 | 9740EEB61CF901F6004384FC /* Run Script */,
138 | 97C146EA1CF9000F007C117D /* Sources */,
139 | 97C146EB1CF9000F007C117D /* Frameworks */,
140 | 97C146EC1CF9000F007C117D /* Resources */,
141 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = Runner;
149 | productName = Runner;
150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | 97C146E61CF9000F007C117D /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastUpgradeCheck = 0910;
160 | ORGANIZATIONNAME = "The Chromium Authors";
161 | TargetAttributes = {
162 | 97C146ED1CF9000F007C117D = {
163 | CreatedOnToolsVersion = 7.3.1;
164 | };
165 | };
166 | };
167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
168 | compatibilityVersion = "Xcode 3.2";
169 | developmentRegion = English;
170 | hasScannedForEncodings = 0;
171 | knownRegions = (
172 | en,
173 | Base,
174 | );
175 | mainGroup = 97C146E51CF9000F007C117D;
176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
177 | projectDirPath = "";
178 | projectRoot = "";
179 | targets = (
180 | 97C146ED1CF9000F007C117D /* Runner */,
181 | );
182 | };
183 | /* End PBXProject section */
184 |
185 | /* Begin PBXResourcesBuildPhase section */
186 | 97C146EC1CF9000F007C117D /* Resources */ = {
187 | isa = PBXResourcesBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
197 | );
198 | runOnlyForDeploymentPostprocessing = 0;
199 | };
200 | /* End PBXResourcesBuildPhase section */
201 |
202 | /* Begin PBXShellScriptBuildPhase section */
203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
204 | isa = PBXShellScriptBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | );
208 | inputPaths = (
209 | );
210 | name = "Thin Binary";
211 | outputPaths = (
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | shellPath = /bin/sh;
215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
216 | };
217 | 9740EEB61CF901F6004384FC /* Run Script */ = {
218 | isa = PBXShellScriptBuildPhase;
219 | buildActionMask = 2147483647;
220 | files = (
221 | );
222 | inputPaths = (
223 | );
224 | name = "Run Script";
225 | outputPaths = (
226 | );
227 | runOnlyForDeploymentPostprocessing = 0;
228 | shellPath = /bin/sh;
229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
230 | };
231 | /* End PBXShellScriptBuildPhase section */
232 |
233 | /* Begin PBXSourcesBuildPhase section */
234 | 97C146EA1CF9000F007C117D /* Sources */ = {
235 | isa = PBXSourcesBuildPhase;
236 | buildActionMask = 2147483647;
237 | files = (
238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
239 | 97C146F31CF9000F007C117D /* main.m in Sources */,
240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
241 | );
242 | runOnlyForDeploymentPostprocessing = 0;
243 | };
244 | /* End PBXSourcesBuildPhase section */
245 |
246 | /* Begin PBXVariantGroup section */
247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
248 | isa = PBXVariantGroup;
249 | children = (
250 | 97C146FB1CF9000F007C117D /* Base */,
251 | );
252 | name = Main.storyboard;
253 | sourceTree = "";
254 | };
255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
256 | isa = PBXVariantGroup;
257 | children = (
258 | 97C147001CF9000F007C117D /* Base */,
259 | );
260 | name = LaunchScreen.storyboard;
261 | sourceTree = "";
262 | };
263 | /* End PBXVariantGroup section */
264 |
265 | /* Begin XCBuildConfiguration section */
266 | 97C147031CF9000F007C117D /* Debug */ = {
267 | isa = XCBuildConfiguration;
268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
269 | buildSettings = {
270 | ALWAYS_SEARCH_USER_PATHS = NO;
271 | CLANG_ANALYZER_NONNULL = YES;
272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
273 | CLANG_CXX_LIBRARY = "libc++";
274 | CLANG_ENABLE_MODULES = YES;
275 | CLANG_ENABLE_OBJC_ARC = YES;
276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
277 | CLANG_WARN_BOOL_CONVERSION = YES;
278 | CLANG_WARN_COMMA = YES;
279 | CLANG_WARN_CONSTANT_CONVERSION = YES;
280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
281 | CLANG_WARN_EMPTY_BODY = YES;
282 | CLANG_WARN_ENUM_CONVERSION = YES;
283 | CLANG_WARN_INFINITE_RECURSION = YES;
284 | CLANG_WARN_INT_CONVERSION = YES;
285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
289 | CLANG_WARN_STRICT_PROTOTYPES = YES;
290 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
291 | CLANG_WARN_UNREACHABLE_CODE = YES;
292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
294 | COPY_PHASE_STRIP = NO;
295 | DEBUG_INFORMATION_FORMAT = dwarf;
296 | ENABLE_STRICT_OBJC_MSGSEND = YES;
297 | ENABLE_TESTABILITY = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_DYNAMIC_NO_PIC = NO;
300 | GCC_NO_COMMON_BLOCKS = YES;
301 | GCC_OPTIMIZATION_LEVEL = 0;
302 | GCC_PREPROCESSOR_DEFINITIONS = (
303 | "DEBUG=1",
304 | "$(inherited)",
305 | );
306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
308 | GCC_WARN_UNDECLARED_SELECTOR = YES;
309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
310 | GCC_WARN_UNUSED_FUNCTION = YES;
311 | GCC_WARN_UNUSED_VARIABLE = YES;
312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
313 | MTL_ENABLE_DEBUG_INFO = YES;
314 | ONLY_ACTIVE_ARCH = YES;
315 | SDKROOT = iphoneos;
316 | TARGETED_DEVICE_FAMILY = "1,2";
317 | };
318 | name = Debug;
319 | };
320 | 97C147041CF9000F007C117D /* Release */ = {
321 | isa = XCBuildConfiguration;
322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
323 | buildSettings = {
324 | ALWAYS_SEARCH_USER_PATHS = NO;
325 | CLANG_ANALYZER_NONNULL = YES;
326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
327 | CLANG_CXX_LIBRARY = "libc++";
328 | CLANG_ENABLE_MODULES = YES;
329 | CLANG_ENABLE_OBJC_ARC = YES;
330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
331 | CLANG_WARN_BOOL_CONVERSION = YES;
332 | CLANG_WARN_COMMA = YES;
333 | CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES;
341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
343 | CLANG_WARN_STRICT_PROTOTYPES = YES;
344 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
348 | COPY_PHASE_STRIP = NO;
349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
350 | ENABLE_NS_ASSERTIONS = NO;
351 | ENABLE_STRICT_OBJC_MSGSEND = YES;
352 | GCC_C_LANGUAGE_STANDARD = gnu99;
353 | GCC_NO_COMMON_BLOCKS = YES;
354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
356 | GCC_WARN_UNDECLARED_SELECTOR = YES;
357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358 | GCC_WARN_UNUSED_FUNCTION = YES;
359 | GCC_WARN_UNUSED_VARIABLE = YES;
360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
361 | MTL_ENABLE_DEBUG_INFO = NO;
362 | SDKROOT = iphoneos;
363 | TARGETED_DEVICE_FAMILY = "1,2";
364 | VALIDATE_PRODUCT = YES;
365 | };
366 | name = Release;
367 | };
368 | 97C147061CF9000F007C117D /* Debug */ = {
369 | isa = XCBuildConfiguration;
370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
371 | buildSettings = {
372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
373 | CURRENT_PROJECT_VERSION = 1;
374 | ENABLE_BITCODE = NO;
375 | FRAMEWORK_SEARCH_PATHS = (
376 | "$(inherited)",
377 | "$(PROJECT_DIR)/Flutter",
378 | );
379 | INFOPLIST_FILE = Runner/Info.plist;
380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
381 | LIBRARY_SEARCH_PATHS = (
382 | "$(inherited)",
383 | "$(PROJECT_DIR)/Flutter",
384 | );
385 | PRODUCT_BUNDLE_IDENTIFIER = com.example.kaiyan;
386 | PRODUCT_NAME = "$(TARGET_NAME)";
387 | VERSIONING_SYSTEM = "apple-generic";
388 | };
389 | name = Debug;
390 | };
391 | 97C147071CF9000F007C117D /* Release */ = {
392 | isa = XCBuildConfiguration;
393 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
394 | buildSettings = {
395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
396 | CURRENT_PROJECT_VERSION = 1;
397 | ENABLE_BITCODE = NO;
398 | FRAMEWORK_SEARCH_PATHS = (
399 | "$(inherited)",
400 | "$(PROJECT_DIR)/Flutter",
401 | );
402 | INFOPLIST_FILE = Runner/Info.plist;
403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
404 | LIBRARY_SEARCH_PATHS = (
405 | "$(inherited)",
406 | "$(PROJECT_DIR)/Flutter",
407 | );
408 | PRODUCT_BUNDLE_IDENTIFIER = com.example.kaiyan;
409 | PRODUCT_NAME = "$(TARGET_NAME)";
410 | VERSIONING_SYSTEM = "apple-generic";
411 | };
412 | name = Release;
413 | };
414 | /* End XCBuildConfiguration section */
415 |
416 | /* Begin XCConfigurationList section */
417 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
418 | isa = XCConfigurationList;
419 | buildConfigurations = (
420 | 97C147031CF9000F007C117D /* Debug */,
421 | 97C147041CF9000F007C117D /* Release */,
422 | );
423 | defaultConfigurationIsVisible = 0;
424 | defaultConfigurationName = Release;
425 | };
426 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
427 | isa = XCConfigurationList;
428 | buildConfigurations = (
429 | 97C147061CF9000F007C117D /* Debug */,
430 | 97C147071CF9000F007C117D /* Release */,
431 | );
432 | defaultConfigurationIsVisible = 0;
433 | defaultConfigurationName = Release;
434 | };
435 | /* End XCConfigurationList section */
436 | };
437 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
438 | }
439 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/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/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wtus/flutter_kaiyan/92ca4a269de90ce5f9d7efa590f44ef32cb835a1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | kaiyan
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/main_page.dart';
3 |
4 | void main() => runApp(new MyApp());
5 |
6 | class MyApp extends StatelessWidget {
7 | // This widget is the root of your application.
8 | @override
9 | Widget build(BuildContext context) {
10 | return new MaterialApp(
11 | debugShowCheckedModeBanner: false,
12 | theme: new ThemeData(
13 | primarySwatch: Colors.blue,
14 | ),
15 | home: MainPage(),
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/main_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:kaiyan/page/login.dart';
4 | import 'package:kaiyan/page/main/page0.dart';
5 | import 'package:kaiyan/page/main/page1.dart';
6 | import 'package:kaiyan/page/main/page2.dart';
7 | import 'package:kaiyan/page/main/page3.dart';
8 | import 'package:kaiyan/util/constant.dart';
9 | import 'package:kaiyan/widget/comon_wiget.dart';
10 | import 'package:kaiyan/widget/route_animation.dart';
11 | import 'package:scoped_model/scoped_model.dart';
12 |
13 | int _curIndex = 0;
14 | _MainPageState main;
15 |
16 | class MainPage extends StatefulWidget {
17 | @override
18 | State createState() {
19 | main = _MainPageState();
20 | return _MainPageState();
21 | }
22 | }
23 |
24 | class _MainPageState extends State {
25 | @override
26 | Widget build(BuildContext context) {
27 | return ScopedModel(
28 | model: IndexModel(),
29 | child: Scaffold(
30 | body: SafeArea(child: _body()),
31 | bottomNavigationBar: Container(
32 | height: 38.3,
33 | width: double.infinity,
34 | child: Column(
35 | children: [
36 | MyDivider(),
37 | Container(
38 | height: 38.0,
39 | width: double.infinity,
40 | child: Row(
41 | mainAxisAlignment: MainAxisAlignment.spaceAround,
42 | crossAxisAlignment: CrossAxisAlignment.center,
43 | children: [
44 | IconText(0),
45 | IconText(1),
46 | Expanded(
47 | child: GestureDetector(
48 | onTap: () {
49 | Navigator.push(
50 | context,
51 | AnimationPageRoute(
52 | slideTween: Tween(
53 | begin: Offset(1.0, 0.0), end: Offset.zero),
54 | builder: (c) {
55 | return Login();
56 | }));
57 | },
58 | child: Image.asset(
59 | Constant.dir_image + 'publish_add.png',
60 | height: 50.0,
61 | width: 50.0,
62 | ),
63 | )),
64 | IconText(2),
65 | IconText(3),
66 | ],
67 | ),
68 | )
69 | ],
70 | ),
71 | ),
72 | ),
73 | );
74 | }
75 |
76 | Widget _body() {
77 | return ScopedModelDescendant(
78 | builder: (ctx, child, model) {
79 | return IndexedStack(
80 | index: model._index,
81 | children: [Page0(), Page1(), Page2(), Page3()],
82 | );
83 | },
84 | );
85 | }
86 |
87 | final MaterialColor c_normal = Colors.blue;
88 | final MaterialColor c_select = Colors.red;
89 |
90 | Widget getIcon(int i, IconData data) {
91 | if (i == _curIndex) {
92 | return Icon(
93 | data,
94 | color: c_select,
95 | );
96 | }
97 | return Icon(
98 | data,
99 | color: c_normal,
100 | );
101 | }
102 | }
103 |
104 | class IconText extends StatefulWidget {
105 | final int index;
106 |
107 | const IconText(this.index);
108 |
109 | @override
110 | State createState() {
111 | return _IconTextState();
112 | }
113 | }
114 |
115 | class _IconTextState extends State {
116 | var titles = ['首页', '关注', '通知', '我的'];
117 | var icons = [
118 | 'ic_tab_strip_icon_feed.png',
119 | 'ic_tab_strip_icon_follow.png',
120 | 'ic_tab_strip_icon_category.png',
121 | 'ic_tab_strip_icon_profile.png'
122 | ];
123 | var icons_selcect = [
124 | 'ic_tab_strip_icon_feed_selected.png',
125 | 'ic_tab_strip_icon_follow_selected.png',
126 | 'ic_tab_strip_icon_category_selected.png',
127 | 'ic_tab_strip_icon_profile_selected.png'
128 | ];
129 |
130 | @override
131 | Widget build(BuildContext context) {
132 | return ScopedModelDescendant(
133 | builder: (ctx, child, model) {
134 | return Expanded(
135 | child: GestureDetector(
136 | child: Container(
137 | width: double.infinity,
138 | child: Column(
139 | children: [
140 | // Icon(Icons.ac_unit),
141 | Image.asset(
142 | widget.index == model._index
143 | ? Constant.dir_image + icons_selcect[widget.index]
144 | : Constant.dir_image + icons[widget.index],
145 | height: 27.0,
146 | ),
147 | Text(
148 | titles[widget.index],
149 | style: TextStyle(fontSize: 8.0),
150 | )
151 | ],
152 | ),
153 | ),
154 | onTap: () {
155 | model.changeIndex(widget.index);
156 | },
157 | ),
158 | );
159 | },
160 | );
161 | }
162 | }
163 |
164 | class IndexModel extends Model {
165 | int _index = 0;
166 |
167 | void changeIndex(int i) {
168 | _index = i;
169 | notifyListeners();
170 | }
171 | }
172 |
--------------------------------------------------------------------------------
/lib/page/detail.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:chewie/chewie.dart';
3 | import 'package:kaiyan/widget/comon_wiget.dart';
4 | import 'package:kaiyan/widget/type_text.dart';
5 |
6 | class Detail extends StatefulWidget {
7 | final dynamic item;
8 |
9 | const Detail({@required this.item}) : super();
10 |
11 | @override
12 | _DetailState createState() => _DetailState();
13 | }
14 |
15 | class _DetailState extends State {
16 | bool _isPlaying = false;
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | }
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | body: Column(
27 | children: [
28 | Container(
29 | width: double.infinity,
30 | height: 230.0,
31 | child: Image.network(
32 | widget.item['cover']['feed'],
33 | fit: BoxFit.cover,
34 | )),
35 | Expanded(
36 | child: Container(
37 | decoration: BoxDecoration(
38 | image: DecorationImage(
39 | fit: BoxFit.fill,
40 | image: NetworkImage(widget.item['cover']['blurred']))),
41 | child: ListView(
42 | padding: EdgeInsets.all(0.0),
43 | children: buildItems(),
44 | ),
45 | ),
46 | )
47 | ],
48 | ),
49 | );
50 | }
51 |
52 | Widget buidAction() {
53 | return Row(
54 | children: [
55 | Padding(
56 | padding: const EdgeInsets.only(right: 8.0),
57 | child: Row(
58 | children: [
59 | Icon(
60 | Icons.favorite_border,
61 | color: Colors.white,
62 | ),
63 | Text(
64 | widget.item['consumption']['collectionCount'].toString(),
65 | style: TextStyle(color: Colors.white),
66 | )
67 | ],
68 | ),
69 | ),
70 | Padding(
71 | padding: const EdgeInsets.symmetric(horizontal: 13.0),
72 | child: Row(
73 | children: [
74 | Icon(Icons.share, color: Colors.white),
75 | Text(
76 | widget.item['consumption']['shareCount'].toString(),
77 | style: TextStyle(color: Colors.white),
78 | )
79 | ],
80 | ),
81 | ),
82 | Padding(
83 | padding: const EdgeInsets.symmetric(horizontal: 13.0),
84 | child: Row(
85 | children: [
86 | Icon(Icons.forum, color: Colors.white),
87 | Text(
88 | widget.item['consumption']['replyCount'].toString(),
89 | style: TextStyle(color: Colors.white),
90 | )
91 | ],
92 | ),
93 | ),
94 | Padding(
95 | padding: const EdgeInsets.symmetric(horizontal: 13.0),
96 | child: Row(
97 | children: [
98 | Icon(Icons.file_download, color: Colors.white),
99 | Text(
100 | '缓存',
101 | style: TextStyle(color: Colors.white),
102 | )
103 | ],
104 | ),
105 | ),
106 | ],
107 | );
108 | }
109 |
110 | List buildItems() {
111 | List list = [
112 | Container(
113 | padding: EdgeInsets.symmetric(horizontal: 10.0),
114 | color: Colors.black.withOpacity(0.4),
115 | child: Column(
116 | crossAxisAlignment: CrossAxisAlignment.start,
117 | children: [
118 | TypeText(
119 | milliseconds: 700,
120 | text: widget.item['title'],
121 | style:
122 | TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
123 | ),
124 | Text(
125 | '#' + widget.item['category'],
126 | style: TextStyle(color: Colors.white, fontSize: 13.0),
127 | ),
128 | TypeText(
129 | text: widget.item['description'],
130 | style: TextStyle(color: Colors.white, fontSize: 13.0),
131 | ),
132 | Padding(
133 | padding: const EdgeInsets.symmetric(vertical: 8.0),
134 | child: buidAction(),
135 | ),
136 | ],
137 | ),
138 | ),
139 | Padding(
140 | padding: EdgeInsets.symmetric(horizontal: 10.0),
141 | child: AvatarItem(
142 | titleColor: Colors.white,
143 | imgUrl: widget.item['author']['icon'],
144 | text1: widget.item['author']['name'],
145 | text2: widget.item['author']['description'],
146 | ),
147 | ),
148 | ];
149 |
150 | for (var i = 0; i < 5; i++) {
151 | list.add(Padding(
152 | padding: const EdgeInsets.symmetric(horizontal: 10.0),
153 | child: PicTextItem(
154 | text2: '#' + widget.item['category'],
155 | ),
156 | ));
157 | }
158 |
159 | return list;
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/lib/page/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/util/constant.dart';
3 | import 'package:kaiyan/widget/type_text.dart';
4 |
5 | class Login extends StatefulWidget {
6 | @override
7 | State createState() {
8 | return _LoginState();
9 | }
10 | }
11 |
12 | class _LoginState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Stack(children: [
16 | Container(
17 | width: double.infinity,
18 | height: double.infinity,
19 | child: Image.asset(
20 | Constant.dir_image + 'author_account_bg.png',
21 | fit: BoxFit.cover,
22 | ),
23 | ),
24 | Container(
25 | width: double.infinity,
26 | child: Column(
27 | mainAxisSize: MainAxisSize.max,
28 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
29 | crossAxisAlignment: CrossAxisAlignment.center,
30 | children: [
31 | Text(
32 | '开眼Demo',
33 | style: TextStyle(color: Colors.white, fontSize: 27.0),
34 | ),
35 | TypeText(
36 | delay: 100,
37 | text: '开眼Demo开眼Demo开眼Demo开眼Demo开眼Demo',
38 | style: TextStyle(color: Colors.white),
39 | ),
40 | FractionalTranslation(
41 | translation: const Offset(1.0, 0.0),
42 | child: TypeText(
43 | delay: 1000,
44 | text: 'Code by Wuht',
45 | style: TextStyle(color: Colors.white),
46 | ),
47 | ),
48 | ],
49 | ),
50 | )
51 | ]);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/page/main/page0.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/page/main/page0/comont_tab_page.dart';
3 | import 'package:kaiyan/page/main/page0/found.dart';
4 | import 'package:kaiyan/page/main/page0/recomand.dart';
5 | import 'package:kaiyan/page/search.dart';
6 | import 'package:kaiyan/util/constant.dart';
7 | import 'package:kaiyan/util/for_test.dart';
8 | import 'package:kaiyan/widget/kaiyan_indictor.dart';
9 | import 'package:dio/dio.dart';
10 | import 'package:kaiyan/widget/route_animation.dart';
11 |
12 | class Page0 extends StatefulWidget {
13 | @override
14 | State createState() {
15 | return _Page0State();
16 | }
17 | }
18 |
19 | class _Page0State extends State with SingleTickerProviderStateMixin {
20 | List tabs = [];
21 | List ids = [];
22 |
23 | TabController _tabController;
24 | TabController _tempController;
25 |
26 | @override
27 | void initState() {
28 | _tempController = new TabController(vsync: this, length: 0);
29 | super.initState();
30 | Dio().get('http://www.wanandroid.com/tools/mockapi/8977/kanyan_tag').then((res) {
31 | tabs = Constant.tabs_name.map((it) {
32 | return Tab(
33 | text: it,
34 | );
35 | }).toList();
36 |
37 | res.data.forEach((it) {
38 | tabs.add(Tab(
39 | text: it['name'],
40 | ));
41 | ids.add(it['id']);
42 | });
43 |
44 | _tabController = new TabController(vsync: this, length: tabs.length);
45 | setState(() {});
46 | _tabController.animateTo(1);
47 |
48 | });
49 | }
50 |
51 | @override
52 | Widget build(BuildContext context) {
53 | return Container(
54 | width: double.infinity,
55 | child: Column(
56 | children: [
57 | buildTopBar(),
58 | Expanded(
59 | child: TabBarView(
60 | controller: tabs.length > 5 ? _tabController : _tempController,
61 | children: buildTabPage(),
62 | ))
63 | ],
64 | ));
65 | }
66 |
67 | Widget buildTopBar() {
68 | return Container(
69 | width: double.infinity,
70 | padding: EdgeInsets.symmetric(horizontal: 8.0),
71 | height: 36.0,
72 | child: Row(
73 | children: [
74 | GestureDetector(
75 | onTap: () {
76 | Navigator.push(
77 | context,
78 | AnimationPageRoute(
79 | slideTween:
80 | Tween(begin: Offset(0.0, 0.0), end: Offset.zero),
81 | builder: (c) {
82 | return Test1();
83 | },
84 | ));
85 | },
86 | child: Icon(
87 | Icons.menu,
88 | size: 23.0,
89 | ),
90 | ),
91 | SizedBox(
92 | width: 10.0,
93 | ),
94 | Expanded(
95 | child: TabBar(
96 | tabs: tabs.length > 5 ? tabs : [],
97 | isScrollable: true,
98 | labelColor: Colors.black,
99 | unselectedLabelColor: Colors.grey[400],
100 | indicator: KaiyanIndictor(),
101 | controller: tabs.length > 5 ? _tabController : _tempController,
102 | ),
103 | ),
104 | SizedBox(
105 | width: 10.0,
106 | ),
107 | GestureDetector(
108 | child: Icon(Icons.search),
109 | onTap: () {
110 | Navigator.push(
111 | context,
112 | AnimationPageRoute(
113 | slideTween:
114 | Tween(begin: Offset(0.0, -1.0), end: Offset.zero),
115 | builder: (c) {
116 | return Search();
117 | // return Test1();
118 | },
119 | ));
120 | },
121 | ),
122 | ],
123 | ),
124 | );
125 | }
126 |
127 | List buildTabPage() {
128 | List list = [];
129 |
130 | list.insert(0, Found());
131 | list.insert(1, Recomand());
132 |
133 | ids.forEach((it) {
134 | list.add(ComontTabPage(
135 | id: it.toString(),
136 | ));
137 | });
138 |
139 | return list;
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/lib/page/main/page0/comont_tab_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/page/detail.dart';
4 | import 'package:kaiyan/widget/comon_wiget.dart';
5 | import 'package:kaiyan/widget/route_animation.dart';
6 | import 'package:video_player/video_player.dart';
7 |
8 | final pic_url =
9 | "https://upload.jianshu.io/collections/images/16/computer_guy.jpg";
10 |
11 | class ComontTabPage extends StatefulWidget {
12 | final String id;
13 |
14 | const ComontTabPage({this.id});
15 |
16 | @override
17 | State createState() {
18 | return _ComontTabPageState();
19 | }
20 | }
21 |
22 | class _ComontTabPageState extends State {
23 | dynamic _data;
24 | List widget_list = [];
25 | ScrollController scrollController = ScrollController();
26 | bool isPerforming = false;
27 |
28 | @override
29 | void initState() {
30 | super.initState();
31 | Dio()
32 | .get(
33 | 'http://www.wanandroid.com/tools/mockapi/8977/kanyan')
34 | .then((res) {
35 | _data = res;
36 | _buildList();
37 | });
38 |
39 | scrollController.addListener(() {
40 | if (scrollController.position.maxScrollExtent ==
41 | scrollController.position.pixels) {
42 | if (!isPerforming) {
43 | isPerforming = true;
44 | _buildList();
45 | }
46 | }
47 | });
48 | }
49 |
50 | void _buildList() {
51 | // if (widget_list.length > 0 &&
52 | // widget_list.last is Center) {
53 | // widget_list.removeLast();
54 | // }
55 |
56 | final data = _data.data['itemList'];
57 | for (var i = 0; i < data.length - 1; i++) {
58 | var item = data[i]['data'];
59 | switch (i % 3) {
60 | case 0:
61 | widget_list.add(TitleItem(
62 | text: '近期热门',
63 | followGone: true,
64 | ));
65 | widget_list.add(ImageItem(
66 | imgUrl: item['cover']['feed'],
67 | ));
68 | widget_list.add(AvatarItem(
69 | text1: item['title'],
70 | text2: '#' + item['category'],
71 | ));
72 | break;
73 | case 1:
74 | widget_list.add(GestureDetector(
75 | onTap: () {
76 | Navigator.of(context).push(AnimationPageRoute(
77 | // fullscreenDialog: true,
78 | slideTween:
79 | Tween(begin: Offset(0.0, 1.0), end: Offset.zero),
80 | builder: (c) => Detail(
81 | item: item,
82 | )));
83 | },
84 | child: PicTextItem(
85 | imgUrl: item['cover']['feed'],
86 | text1: item['title'],
87 | text2: '#' + item['category'],
88 | ),
89 | ));
90 | break;
91 | case 2:
92 | widget_list.add(PicTextItem(
93 | imgUrl: item['cover']['feed'],
94 | text1: item['title'],
95 | text2: '#' + item['category'],
96 | ));
97 | break;
98 | }
99 | }
100 |
101 | isPerforming = false;
102 | setState(() {});
103 | }
104 |
105 | @override
106 | Widget build(BuildContext context) {
107 | return Padding(
108 | padding: const EdgeInsets.symmetric(horizontal: 10.0),
109 | child: _data == null
110 | ? Center(
111 | child: CircularProgressIndicator(),
112 | )
113 | : ListView.builder(
114 | controller: scrollController,
115 | itemCount: widget_list.length,
116 | itemBuilder: (c, i) {
117 | return widget_list[i];
118 | },
119 | ),
120 | );
121 | }
122 |
123 | Widget buildItem() {
124 | return Column(
125 | children: [
126 | TitleItem(
127 | text: '测试',
128 | followGone: true,
129 | ),
130 | ImageItem(
131 | imgUrl: pic_url,
132 | ),
133 | AvatarItem(
134 | text1: '水水水水',
135 | text2: '四大法王',
136 | ),
137 | PicTextItem(),
138 | PicTextItem(),
139 | ],
140 | );
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/lib/page/main/page0/found.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/util/constant.dart';
4 | import 'package:kaiyan/widget/comon_wiget.dart';
5 |
6 | class Found extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _FoundState();
10 | }
11 | }
12 |
13 | class _FoundState extends State {
14 | dynamic _data;
15 | List widget_list = [];
16 | ScrollController scrollController = ScrollController();
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | Dio()
22 | .get('http://www.wanandroid.com/tools/mockapi/8977/kanyan')
23 | .then((res) {
24 | _data = res;
25 | updateData();
26 | });
27 |
28 | scrollController.addListener(() {
29 | if (scrollController.position.maxScrollExtent ==
30 | scrollController.position.pixels) {
31 | addComments();
32 | setState(() {});
33 | }
34 | });
35 | }
36 |
37 | void updateData() {
38 | final items = _data.data['itemList'];
39 | String img2 = items[2]['data']['cover']['feed'];
40 | String img3 = items[3]['data']['cover']['feed'];
41 | String img1 = items[1]['data']['cover']['feed'];
42 | widget_list = [
43 | buildPageView(),
44 | TitleItem(
45 | text: '本周排行',
46 | ),
47 | ImageItem(
48 | imgUrl: img2,
49 | ),
50 | PicTextItem(
51 | imgUrl: img3,
52 | text1: items[3]['data']['title'],
53 | text2: '#' + items[3]['data']['category'] + '/ 开眼精选',
54 | ),
55 | PicTextItem(
56 | imgUrl: img1,
57 | text1: items[1]['data']['title'],
58 | text2: '#' + items[1]['data']['category'] + '/ 开眼精选',
59 | ),
60 | TitleItem(
61 | text: '热门分类',
62 | ),
63 | RoundRectItem(
64 | imgUrl: items[3]['data']['author']['icon'],
65 | text1: items[3]['data']['author']['name'],
66 | ),
67 | RoundRectItem(
68 | imgUrl: items[2]['data']['author']['icon'],
69 | text1: items[2]['data']['author']['name'],
70 | ),
71 | RoundRectItem(
72 | imgUrl: items[1]['data']['author']['icon'],
73 | text1: items[1]['data']['author']['name'],
74 | ),
75 | TitleItem(
76 | text: '近期专题',
77 | ),
78 | buildPageView(),
79 | TitleItem(
80 | text: '热门评论',
81 | ),
82 | ];
83 |
84 | addComments();
85 | setState(() {});
86 | }
87 |
88 | @override
89 | Widget build(BuildContext context) {
90 | return _data == null
91 | ? Center(
92 | child: CircularProgressIndicator(),
93 | )
94 | : ListView.builder(
95 | controller: scrollController,
96 | itemCount: widget_list.length,
97 | itemBuilder: (c, i) {
98 | return widget_list[i];
99 | });
100 | }
101 |
102 | Widget buildPageView() {
103 | final items = _data.data['itemList'];
104 | return Container(
105 | // 注意 在 listview 里要处理height
106 | height: 200.0,
107 | width: double.infinity,
108 | child: PageView.builder(
109 | controller: PageController(viewportFraction: 0.85),
110 | physics: AlwaysScrollableScrollPhysics(),
111 | itemBuilder: (c, i) {
112 | final item = items[i]['data'];
113 | return Padding(
114 | padding: const EdgeInsets.all(3.0),
115 | child: Image.network(
116 | item['cover']['feed'],
117 | fit: BoxFit.cover,
118 | ),
119 | );
120 | // return Container(
121 | // color: Colors.blueAccent[i * 200], child: Text('data'));
122 | },
123 | itemCount: 5,
124 | ),
125 | );
126 | }
127 |
128 | Widget buildItem(
129 | String imgUrl, String imgAvatar, String name, String itemText1) {
130 | return Column(
131 | children: [
132 | AvatarItem(
133 | imgUrl: imgAvatar,
134 | text1: name,
135 | ),
136 | Container(
137 | padding: EdgeInsets.only(left: 50.0),
138 | height: 120.0,
139 | child: Container(
140 | decoration: BoxDecoration(
141 | borderRadius: BorderRadius.circular(7.0),
142 | color: Colors.grey[200],
143 | shape: BoxShape.rectangle),
144 | padding: EdgeInsets.all(10.0),
145 | child: PicTextItem(
146 | imgUrl: imgUrl,
147 | ),
148 | ),
149 | )
150 | ],
151 | );
152 | }
153 |
154 | void addComments() {
155 | print('执行了');
156 | // widget_list.addAll(_data.data['itemList'].map((it) {
157 | // final item = it['data'];
158 | // return buildItem(item['cover']['feed'], item['author']['icon'],
159 | // item['author']['name'], item['title']);
160 | // }).toList());
161 | _data.data['itemList'].forEach((it) {
162 | print('object');
163 | final item = it['data'];
164 | widget_list.add(buildItem(item['cover']['feed'], item['author']['icon'],
165 | item['author']['name'], item['title']));
166 | });
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/lib/page/main/page0/recomand.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/page/detail.dart';
4 | import 'package:kaiyan/page/main/page0/comont_tab_page.dart';
5 | import 'package:kaiyan/widget/comon_wiget.dart';
6 |
7 | class Recomand extends StatefulWidget {
8 | @override
9 | State createState() {
10 | return _RecomandState();
11 | }
12 | }
13 |
14 | class _RecomandState extends State {
15 | dynamic _data;
16 | List widget_list = [];
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | Dio()
22 | .get('http://www.wanandroid.com/tools/mockapi/8977/kanyan')
23 | .then((res) {
24 | _data = res;
25 | _buildList();
26 | });
27 | }
28 |
29 | void _buildList() {
30 | final list = [];
31 | _data.data['itemList'].sublist(0, 5).forEach((it) {
32 | final item = it['data'];
33 | list.add(Padding(
34 | padding: const EdgeInsets.only(right: 8.0),
35 | child: Column(
36 | children: [
37 | ImageItem(
38 | imgUrl: item['cover']['feed'],
39 | ),
40 | AvatarItem(
41 | imgUrl: item['author']['icon'],
42 | text1: item['author']['name'],
43 | text2: item['author']['description'],
44 | )
45 | ],
46 | ),
47 | ));
48 | });
49 |
50 | widget_list.add(Padding(
51 | padding: const EdgeInsets.symmetric(vertical: 10.0),
52 | child: Text('FRIDAY,JULY 13',
53 | style: TextStyle(
54 | color: Colors.grey[400], fontFamily: 'Lobster', fontSize: 16.0)),
55 | ));
56 |
57 | widget_list.add(TitleItem(
58 | text: '开眼今日编辑精选',
59 | ));
60 |
61 | widget_list.add(buildPageView(list));
62 |
63 | final data = _data.data['itemList'];
64 | for (var i = 0; i < data.length - 1; i++) {
65 | var item = data[i]['data'];
66 | switch (i % 3) {
67 | case 0:
68 | widget_list.add(TitleItem(
69 | text: '近期热门',
70 | followGone: true,
71 | ));
72 | widget_list.add(ImageItem(
73 | imgUrl: item['cover']['feed'],
74 | ));
75 | widget_list.add(AvatarItem(
76 | text1: item['title'],
77 | text2: '#' + item['category'],
78 | ));
79 | break;
80 | case 1:
81 | widget_list.add(GestureDetector(
82 | onTap: () {
83 | Navigator.of(context).push(MaterialPageRoute(
84 | builder: (c) => Detail(
85 | item: item,
86 | )));
87 | },
88 | child: PicTextItem(
89 | imgUrl: item['cover']['feed'],
90 | text1: item['title'],
91 | text2: '#' + item['category'],
92 | ),
93 | ));
94 | break;
95 | case 2:
96 | widget_list.add(PicTextItem(
97 | imgUrl: item['cover']['feed'],
98 | text1: item['title'],
99 | text2: '#' + item['category'],
100 | ));
101 | break;
102 | }
103 | }
104 | setState(() {});
105 | }
106 |
107 | @override
108 | Widget build(BuildContext context) {
109 | return Padding(
110 | padding: const EdgeInsets.symmetric(horizontal: 8.0),
111 | child: _data == null
112 | ? Center(
113 | child: CircularProgressIndicator(),
114 | )
115 | : ListView.builder(
116 | itemCount: widget_list.length,
117 | itemBuilder: (c, i) => widget_list[i],
118 | ),
119 | );
120 | }
121 |
122 | Widget buildPageView(List list) {
123 | print(list.length);
124 | return Container(
125 | height: 276.0,
126 | width: double.infinity,
127 | child: PageView.builder(
128 | controller: PageController(viewportFraction: 0.85),
129 | physics: AlwaysScrollableScrollPhysics(),
130 | itemBuilder: (c, i) {
131 | return list[i];
132 | },
133 | itemCount: 5,
134 | ),
135 | );
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/lib/page/main/page1.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/page/main/page1/dynamic.dart';
3 | import 'package:kaiyan/page/main/page1/works.dart';
4 | import 'package:kaiyan/widget/kaiyan_indictor.dart';
5 |
6 | class Page1 extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _Page1State();
10 | }
11 | }
12 |
13 | class _Page1State extends State with SingleTickerProviderStateMixin {
14 | TabController _tabController;
15 | @override
16 | void initState() {
17 | super.initState();
18 | _tabController = TabController(vsync: this, length: 2);
19 | }
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return NestedScrollView(
24 | body: TabBarView(
25 | controller: _tabController,
26 | children: [Works(), Dynamic()],
27 | ),
28 | headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
29 | return [
30 | SliverAppBar(
31 | floating: true,
32 | pinned: true,
33 | title: Text('subscription',
34 | style: TextStyle(color: Colors.black, fontFamily: 'Lobster')),
35 | centerTitle: true,
36 | backgroundColor: Colors.white,
37 | bottom: PreferredSize(
38 | preferredSize: Size(double.infinity, 34.0),
39 | child: Container(
40 | height: 34.0,
41 | child: new TabBar(
42 | labelColor: Colors.black,
43 | unselectedLabelColor: Colors.grey[400],
44 | indicator: KaiyanIndictor(),
45 | tabs: [
46 | new Tab(
47 | text: "作品",
48 | ),
49 | new Tab(
50 | text: "动态",
51 | ),
52 | ],
53 | controller: _tabController,
54 | ),
55 | ),
56 | ),
57 | )
58 | ];
59 | },
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/page/main/page1/dynamic.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/util/constant.dart';
4 | import 'package:kaiyan/widget/comon_wiget.dart';
5 |
6 | class Dynamic extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _DynamicState();
10 | }
11 | }
12 |
13 | class _DynamicState extends State {
14 | dynamic _data;
15 | List widget_list = [];
16 |
17 | @override
18 | void initState() {
19 | super.initState();
20 |
21 | Dio()
22 | .get('http://www.wanandroid.com/tools/mockapi/8977/kanyan')
23 | .then((res) {
24 | _data = res;
25 | _buildList();
26 | });
27 | }
28 |
29 | void _buildList() {
30 | _data.data['itemList'].forEach((it) {
31 | final item = it['data'];
32 | widget_list.add(AvatarItem(
33 | text1: item['author']['name'],
34 | imgUrl: item['author']['icon'],
35 | text2: '评论',
36 | ));
37 | widget_list.add(Container(
38 | padding: EdgeInsets.only(left: 50.0),
39 | height: 120.0,
40 | child: Container(
41 | decoration: BoxDecoration(
42 | borderRadius: BorderRadius.circular(7.0),
43 | color: Colors.grey[200],
44 | shape: BoxShape.rectangle),
45 | padding: EdgeInsets.all(10.0),
46 | child: PicTextItem(
47 | imgUrl: item['cover']['feed'],
48 | ),
49 | ),
50 | ));
51 | });
52 |
53 | setState(() {});
54 | }
55 |
56 | @override
57 | Widget build(BuildContext context) {
58 | return ListView.builder(
59 | padding: EdgeInsets.symmetric(horizontal: 10.0),
60 | itemCount: widget_list.length,
61 | itemBuilder: (c, i) => widget_list[i],
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/page/main/page1/works.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/util/constant.dart';
4 | import 'package:kaiyan/widget/comon_wiget.dart';
5 |
6 | class Works extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _WorksState();
10 | }
11 |
12 |
13 | }
14 |
15 | class _WorksState extends State {
16 | dynamic _data;
17 |
18 | List widget_list = [];
19 |
20 | void _buildList() {
21 | _data.data['itemList'].forEach((it) {
22 | final item = it['data'];
23 | widget_list.add(AvatarItem(
24 | text1: item['author']['name'],
25 | text2: '发布:',
26 | text3: item['title'],
27 | ));
28 | widget_list.add(Text(item['description'],
29 | style: TextStyle(color: Colors.grey, fontSize: 13.0)));
30 | widget_list.add(Padding(
31 | padding: const EdgeInsets.symmetric(vertical: 8.0),
32 | child: Row(
33 | children: buildTagRow(item['tags']),
34 | ),
35 | ));
36 | widget_list.add(ImageItem(
37 | imgUrl: item['cover']['feed'],
38 | ));
39 | widget_list.add(Padding(
40 | padding: const EdgeInsets.symmetric(vertical: 8.0),
41 | child: buidAction(),
42 | ));
43 | widget_list.add(Divider());
44 | });
45 | print('长度: ${widget_list.length}');
46 | setState(() {});
47 | }
48 |
49 |
50 | List buildTagRow(tags) {
51 | List list = [];
52 | for (var i = 0; i < tags.length; i++) {
53 | if (i != 0) {
54 | list.add(Padding(
55 | padding: const EdgeInsets.symmetric(horizontal: 5.0),
56 | child: buildTag(tags[i]['name']),
57 | ));
58 | continue;
59 | }
60 | list.add(buildTag(tags[i]['name']));
61 | }
62 | return list;
63 | }
64 |
65 | @override
66 | void initState() {
67 | super.initState();
68 | Dio()
69 | .get('http://www.wanandroid.com/tools/mockapi/8977/kanyan')
70 | .then((res) {
71 | _data = res;
72 | // print(_data.data['itemList'][0]['data']['category']);
73 | _buildList();
74 | });
75 | }
76 |
77 | @override
78 | Widget build(BuildContext context) {
79 | return ListView.builder(
80 | padding: EdgeInsets.symmetric(horizontal: 10.0),
81 | itemCount: widget_list.length,
82 | itemBuilder: (c, i) => widget_list[i],
83 | );
84 | }
85 |
86 | Widget buildTag(String text) {
87 | return TagItem(
88 | text: text,
89 | paddingH: 5.0,
90 | paddingV: 1.0,
91 | bgColor: Colors.blue[50],
92 | textColor: Colors.blue,
93 | );
94 | }
95 |
96 | Widget buidAction() {
97 | return Row(
98 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
99 | children: [
100 | Icon(
101 | Icons.favorite_border,
102 | color: Colors.grey,
103 | ),
104 | Icon(Icons.forum, color: Colors.grey),
105 | Text('08:31'),
106 | Icon(Icons.file_download, color: Colors.grey),
107 | ],
108 | );
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/lib/page/main/page2.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/page/main/page2/interaction.dart';
3 | import 'package:kaiyan/page/main/page2/notification1.dart';
4 | import 'package:kaiyan/widget/kaiyan_indictor.dart';
5 |
6 | class Page2 extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _Page2State();
10 | }
11 | }
12 |
13 | class _Page2State extends State with SingleTickerProviderStateMixin {
14 | TabController _tabController;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 | _tabController = TabController(vsync: this, length: 2);
20 | }
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return NestedScrollView(
25 | body: TabBarView(
26 | controller: _tabController,
27 | children: [FormNotification(), Interaction()],
28 | ),
29 | headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
30 | return [
31 | new SliverAppBar(
32 | title: Text(
33 | 'Notification',
34 | style: TextStyle(color: Colors.black, fontFamily: 'Lobster'),
35 | ),
36 | centerTitle: true,
37 | backgroundColor: Colors.white,
38 | pinned: true,
39 | floating: true,
40 | bottom: PreferredSize(
41 | preferredSize: Size(double.infinity, 34.0),
42 | child: Container(
43 | height: 34.0,
44 | child: new TabBar(
45 | labelColor: Colors.black,
46 | unselectedLabelColor: Colors.grey[400],
47 | indicator: KaiyanIndictor(),
48 | tabs: [
49 | new Tab(
50 | text: "官方",
51 | ),
52 | new Tab(
53 | text: "互动",
54 | ),
55 | ],
56 | controller: _tabController,
57 | ),
58 | ),
59 | ),
60 | ),
61 | ];
62 | },
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/page/main/page2/interaction.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/util/constant.dart';
3 |
4 | class Interaction extends StatefulWidget {
5 | @override
6 | State createState() {
7 | return _InteractionState();
8 | }
9 | }
10 |
11 | class _InteractionState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Column(
15 | mainAxisAlignment: MainAxisAlignment.center,
16 | children: [
17 | Image.asset(
18 | Constant.dir_image + 'pgc_default_avatar.png',
19 | width: 60.0,
20 | ),
21 | Container(
22 | margin: EdgeInsets.only(top: 50.0),
23 | child: Text("别错过重要的信息",
24 | style: TextStyle(
25 | color: Colors.black,
26 | fontWeight: FontWeight.bold,
27 | fontSize: 20.0))),
28 | Text(
29 | '登录后即可查看评论回复、点赞及关注等通知',
30 | style: TextStyle(color: Colors.grey, fontSize: 15.0),
31 | ),
32 | Container(
33 | margin: EdgeInsets.only(top: 50.0),
34 | width: 200.0,
35 | height: 40.0,
36 | color: Colors.blue,
37 | child: Center(
38 | child: Text(
39 | '登录',
40 | style: TextStyle(color: Colors.white),
41 | ),
42 | ),
43 | )
44 | ],
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/page/main/page2/notification1.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/widget/comon_wiget.dart';
3 |
4 | class FormNotification extends StatefulWidget {
5 | @override
6 | State createState() {
7 | return _NotificationState();
8 | }
9 | }
10 |
11 | class _NotificationState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return ListView.builder(
15 | itemCount: 10,
16 | itemBuilder: (c, i) => Padding(
17 | padding: const EdgeInsets.all(8.0),
18 | child: Column(
19 | children: [
20 | AvatarItem(
21 | text1: '官方通知',
22 | text2: '一周前',
23 | ),
24 | Text(
25 | 'balalbalbalblalblbalblalbalblalblalblalblalblalblalblalbllalblalbalblabbalbalalbalbalblalblbalblalbalblalblalblalblalblalblalblalbllalblalbalblabbal')
26 | ],
27 | ),
28 | ),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/page/main/page3.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/util/constant.dart';
3 |
4 | class Page3 extends StatefulWidget {
5 | @override
6 | State createState() {
7 | return _Page3State();
8 | }
9 | }
10 |
11 | class _Page3State extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | width: double.infinity,
16 | child: Column(children: [
17 | buildTopBar(),
18 | Padding(
19 | padding: const EdgeInsets.symmetric(vertical: 10.0),
20 | child: Image.asset(
21 | Constant.dir_image + 'pgc_default_avatar.png',
22 | width: 70.0,
23 | ),
24 | ),
25 | Text('点击登陆即可发表评论及同步已喜欢视频'),
26 | Padding(
27 | padding: const EdgeInsets.symmetric(vertical: 15.0),
28 | child: Row(
29 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
30 | children: [
31 | Row(
32 | children: [Icon(Icons.ac_unit), Text('喜欢')],
33 | ),
34 | Container(
35 | width: 0.4,
36 | height: 25.0,
37 | color: Colors.grey,
38 | ),
39 | Row(
40 | children: [Icon(Icons.ac_unit), Text('缓存')],
41 | ),
42 | ],
43 | ),
44 | ),
45 | Divider(),
46 | Padding(padding: EdgeInsets.only(top: 35.0), child: Text('我的关注')),
47 | Padding(
48 | padding: EdgeInsets.only(top: 35.0),
49 | child: Text('观看记录'),
50 | ),
51 | Padding(
52 | padding: EdgeInsets.only(top: 35.0),
53 | child: Text('意见反馈'),
54 | ),
55 | Padding(
56 | padding: EdgeInsets.only(top: 35.0),
57 | child: Text('我要投稿'),
58 | ),
59 | Expanded(
60 | child: Container(),
61 | ),
62 | Text(
63 | 'Version 1.1.1',
64 | style: TextStyle(fontSize: 13.0, color: Colors.grey),
65 | ),
66 | ]),
67 | );
68 | }
69 |
70 | Widget buildTopBar() {
71 | return Container(
72 | width: double.infinity,
73 | height: 36.0,
74 | padding: EdgeInsets.symmetric(horizontal: 10.0),
75 | child: Row(
76 | mainAxisAlignment: MainAxisAlignment.end,
77 | children: [
78 | Icon(
79 | Icons.settings,
80 | size: 23.0,
81 | )
82 | ],
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/page/search.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kaiyan/widget/comon_wiget.dart';
3 |
4 | class Search extends StatefulWidget {
5 | @override
6 | State createState() {
7 | return _SearchState();
8 | }
9 | }
10 |
11 | class _SearchState extends State with SingleTickerProviderStateMixin {
12 | String test_txt = '我是士大夫!';
13 | Tween tween;
14 | AnimationController animationController;
15 | Animation animation;
16 | String text;
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | animationController =
22 | new AnimationController(vsync: this, duration: Duration(seconds: 1));
23 |
24 | animation = IntTween(begin: 0, end: test_txt.length).animate(
25 | CurvedAnimation(parent: animationController, curve: Curves.easeIn));
26 |
27 | animation.addListener(() {
28 | print('${animation.value}');
29 | setState(() {
30 | text = test_txt.substring(0, animation.value);
31 | });
32 | });
33 |
34 | animationController.forward(from: 0.0);
35 | }
36 |
37 | final List items = [
38 | '开眼世界杯',
39 | '世界杯',
40 | '阅后即瞎',
41 | '日食',
42 | '谷阿莫',
43 | '励志',
44 | '健身',
45 | '美食',
46 | '一条'
47 | ];
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | return Scaffold(
52 | body: SafeArea(
53 | child: Container(
54 | width: double.infinity,
55 | child: Column(
56 | children: [
57 | Row(
58 | children: [
59 | Expanded(
60 | child: Container(
61 | child: TextField(
62 | decoration: InputDecoration(
63 | hintText: '这个功能暂时不可以用',
64 | suffixIcon: Icon(Icons.search),
65 | icon: Icon(
66 | Icons.search,
67 | color: Colors.red,
68 | ),
69 | border: UnderlineInputBorder(),
70 | prefixIcon: Icon(Icons.save)))),
71 | ),
72 | GestureDetector(
73 | onTap: () {
74 | Navigator.pop(context);
75 | },
76 | child: Text('取消'))
77 | ],
78 | ),
79 | TitleItem(
80 | text: '热搜关键词',
81 | ),
82 | Expanded(
83 | child: Padding(
84 | padding: EdgeInsets.symmetric(horizontal: 8.0),
85 | child: ListView.builder(
86 | itemCount: items.length,
87 | itemBuilder: (c, i) {
88 | return Container(
89 | height: 35.0,
90 | child: Text(items[i],
91 | style: TextStyle(
92 | color: Colors.blue,
93 | fontWeight: FontWeight.bold)));
94 | }),
95 | ),
96 | )
97 | ],
98 | ),
99 | ),
100 | ));
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/lib/util/constant.dart:
--------------------------------------------------------------------------------
1 | class Constant {
2 | static final top_bar_height = 30.0;
3 | static final List tabs_name = [
4 | '发现',
5 | '推荐',
6 | ];
7 |
8 | static final dir_image = 'asset/images/';
9 |
10 | static final pic_url =
11 | "https://upload.jianshu.io/collections/images/16/computer_guy.jpg";
12 | }
13 |
--------------------------------------------------------------------------------
/lib/util/for_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:kaiyan/util/constant.dart';
4 | import 'package:kaiyan/widget/comon_wiget.dart';
5 |
6 | class Test1 extends StatefulWidget {
7 | @override
8 | State createState() {
9 | return _Test1State();
10 | }
11 | }
12 |
13 | class _Test1State extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | request();
17 | return Scaffold(
18 | body: SafeArea(
19 | child: Column(
20 | children: [
21 | // buildPageView(),
22 | // TitleItem(
23 | // text: '本周排行',
24 | // ),
25 | // ImageItem(
26 | // imgUrl: Constant.pic_url,
27 | // ),
28 | // PicTextItem(),
29 | // PicTextItem(),
30 | // TitleItem(
31 | // text: '热门分类',
32 | // ),
33 | // RoundRectItem(),
34 | // RoundRectItem(),
35 | // RoundRectItem(),
36 | // TitleItem(
37 | // text: '近期专题',
38 | // ),
39 | // buildPageView(),
40 | // AvatarItem(),
41 | // TitleItem(
42 | // text: '热门评论',
43 | // ),
44 | // buildItem()
45 | ],
46 | ),
47 | ),
48 | );
49 | }
50 |
51 | Widget buildPageView() {
52 | // final items = _data.data['itemList'];
53 | return Container(
54 | // 注意 在 listview 里要处理height
55 | height: 200.0,
56 | width: double.infinity,
57 | child: PageView.builder(
58 | controller: PageController(viewportFraction: 0.85),
59 | physics: AlwaysScrollableScrollPhysics(),
60 | itemBuilder: (c, i) {
61 | // return Image.network(items[i]['data']['playUrl']);
62 | return Padding(
63 | padding: const EdgeInsets.all(3.0),
64 | child: Image.network(
65 | Constant.pic_url,
66 | fit: BoxFit.cover,
67 | ),
68 | );
69 | // return Container(
70 | // color: Colors.blueAccent[i * 200], child: Text('data'));
71 | },
72 | itemCount: 5,
73 | ),
74 | );
75 | }
76 |
77 | Widget buildItem(
78 | String imgUrl, String imgAvatar, String name, String itemText1) {
79 | return Column(
80 | children: [
81 | AvatarItem(
82 | imgUrl: imgAvatar,
83 | text1: name,
84 | ),
85 | Container(
86 | padding: EdgeInsets.only(left: 50.0),
87 | height: 120.0,
88 | child: Container(
89 | decoration: BoxDecoration(
90 | borderRadius: BorderRadius.circular(7.0),
91 | color: Colors.grey[200],
92 | shape: BoxShape.rectangle),
93 | padding: EdgeInsets.all(10.0),
94 | child: PicTextItem(
95 | imgUrl: imgUrl,
96 | ),
97 | ),
98 | )
99 | ],
100 | );
101 | }
102 | }
103 |
104 | buildItems() {}
105 |
106 | void request() {
107 | Dio()
108 | .get('http://www.wanandroid.com/tools/mockapi/8977/kanyan')
109 | .then((res) {
110 | final _data = res;
111 | final items = _data.data['itemList'];
112 | var item = _data.data['itemList'][2]['data'];
113 |
114 | _data.data['itemList'].forEach((it) {
115 | final item = it['data'];
116 | print(item['cover']['feed']);
117 | print(item['author']['icon']);
118 | print(item['author']['name']);
119 | print(item['title']);
120 | });
121 |
122 | });
123 | }
124 |
--------------------------------------------------------------------------------
/lib/widget/comon_wiget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const pic_url =
4 | "https://upload.jianshu.io/collections/images/16/computer_guy.jpg";
5 |
6 | class AvatarItem extends StatelessWidget {
7 | final double radius;
8 | final String imgUrl;
9 | final String text1;
10 | final String text2;
11 | final String text3;
12 | final IconData icon;
13 | final Color titleColor;
14 |
15 | const AvatarItem(
16 | {this.radius: 20.0,
17 | this.imgUrl: pic_url,
18 | this.text1: '',
19 | this.text2: '',
20 | this.text3: '',
21 | this.titleColor: Colors.black,
22 | this.icon});
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Padding(
27 | padding: const EdgeInsets.symmetric(vertical: 8.0),
28 | child: Row(
29 | children: [
30 | CircleAvatar(
31 | radius: this.radius,
32 | backgroundImage: NetworkImage(this.imgUrl),
33 | ),
34 | Expanded(
35 | child: Padding(
36 | padding: const EdgeInsets.only(left: 8.0),
37 | child: Column(
38 | crossAxisAlignment: CrossAxisAlignment.start,
39 | children: [
40 | Text(this.text1,
41 | style: TextStyle(
42 | fontSize: 16.0,
43 | color: this.titleColor,
44 | fontWeight: FontWeight.bold)),
45 | Row(
46 | children: [
47 | Text(
48 | this.text2,
49 | maxLines: 1,
50 | overflow: TextOverflow.clip,
51 | style: TextStyle(color: Colors.grey, fontSize: 14.0),
52 | ),
53 | Text(
54 | this.text3,
55 | maxLines: 1,
56 | overflow: TextOverflow.ellipsis,
57 | style: TextStyle(
58 | color: Colors.black, fontWeight: FontWeight.bold),
59 | ),
60 | ],
61 | )
62 | ],
63 | ),
64 | ),
65 | ),
66 | Icon(
67 | Icons.save_alt,
68 | size: 18.0,
69 | )
70 | ],
71 | ),
72 | );
73 | }
74 | }
75 |
76 | class PicTextItem extends StatelessWidget {
77 | final String text1;
78 | final String text2;
79 | final String imgUrl;
80 |
81 | const PicTextItem({this.text1: '', this.text2: '', this.imgUrl: pic_url});
82 |
83 | @override
84 | Widget build(BuildContext context) {
85 | return Container(
86 | height: 100.0,
87 | padding: const EdgeInsets.symmetric(vertical: 8.0),
88 | child: Row(
89 | children: [
90 | Expanded(
91 | flex: 4,
92 | child: ImageItem(
93 | imgUrl: this.imgUrl,
94 | ),
95 | ),
96 | SizedBox(
97 | width: 8.0,
98 | ),
99 | Expanded(
100 | flex: 5,
101 | child: Column(
102 | mainAxisAlignment: MainAxisAlignment.spaceAround,
103 | crossAxisAlignment: CrossAxisAlignment.start,
104 | mainAxisSize: MainAxisSize.max,
105 | children: [
106 | Text(this.text1,
107 | style:
108 | TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
109 | Row(
110 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
111 | children: [
112 | Text(this.text2,
113 | style: TextStyle(
114 | color: Colors.grey[400],
115 | fontSize: 14.0,
116 | )),
117 | Icon(
118 | Icons.scanner,
119 | color: Colors.grey[400],
120 | )
121 | ],
122 | )
123 | ],
124 | ),
125 | )
126 | ],
127 | ),
128 | );
129 | }
130 | }
131 |
132 | class ImageItem extends StatelessWidget {
133 | final String imgUrl;
134 |
135 | const ImageItem({@required this.imgUrl});
136 |
137 | @override
138 | Widget build(BuildContext context) {
139 | return Container(
140 | width: double.infinity,
141 | height: 220.0,
142 | child: Stack(children: [
143 | Container(
144 | decoration: BoxDecoration(
145 | borderRadius: BorderRadius.circular(7.0),
146 | image: DecorationImage(
147 | image: NetworkImage(this.imgUrl), fit: BoxFit.cover),
148 | color: Colors.amber),
149 | ),
150 | Positioned(
151 | bottom: 5.0,
152 | right: 5.0,
153 | child: Container(
154 | padding: EdgeInsets.all(2.0),
155 | decoration: BoxDecoration(
156 | borderRadius: BorderRadius.circular(3.0), color: Colors.black),
157 | child: Text(
158 | '01:48',
159 | style:
160 | TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
161 | ),
162 | ),
163 | )
164 | ]),
165 | );
166 | }
167 | }
168 |
169 | class TitleItem extends StatelessWidget {
170 | String text;
171 | bool followGone;
172 | double fontSize = 34.0;
173 | TitleItem({@required this.text, this.followGone: true, this.fontSize: 25.0});
174 | @override
175 | Widget build(BuildContext context) {
176 | return Padding(
177 | padding: const EdgeInsets.symmetric(vertical: 10.0),
178 | child: Row(
179 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
180 | crossAxisAlignment: CrossAxisAlignment.center,
181 | children: [
182 | Row(
183 | children: [
184 | Text(
185 | this.text,
186 | style: TextStyle(fontSize: fontSize, fontFamily: 'FZLanTing'),
187 | ),
188 | Icon(Icons.arrow_right)
189 | ],
190 | ),
191 | Row(
192 | children: [
193 | Offstage(offstage: followGone, child: FollowBtn()),
194 | ],
195 | )
196 | ]),
197 | );
198 | }
199 | }
200 |
201 | class RoundRectItem extends StatelessWidget {
202 | final String text1;
203 | final String text2;
204 | final String imgUrl;
205 |
206 | const RoundRectItem({this.text1: '', this.text2: '', this.imgUrl: pic_url});
207 | @override
208 | Widget build(BuildContext context) {
209 | return Padding(
210 | padding: const EdgeInsets.symmetric(vertical: 8.0),
211 | child: Row(
212 | children: [
213 | Container(
214 | width: 38.0,
215 | height: 38.0,
216 | decoration: BoxDecoration(
217 | borderRadius: BorderRadius.circular(5.0),
218 | image: DecorationImage(
219 | image: NetworkImage(this.imgUrl), fit: BoxFit.cover)),
220 | ),
221 | Expanded(
222 | child: Padding(
223 | padding: const EdgeInsets.only(left: 8.0),
224 | child: Column(
225 | crossAxisAlignment: CrossAxisAlignment.start,
226 | children: [
227 | Text(this.text1,
228 | style: TextStyle(
229 | fontSize: 17.0, fontWeight: FontWeight.bold)),
230 | Text(
231 | this.text2,
232 | style: TextStyle(color: Colors.grey),
233 | )
234 | ],
235 | ),
236 | ),
237 | ),
238 | FollowBtn()
239 | ],
240 | ),
241 | );
242 | }
243 | }
244 |
245 | class FollowBtn extends StatelessWidget {
246 | @override
247 | Widget build(BuildContext context) {
248 | return Container(
249 | padding: EdgeInsets.all(2.0),
250 | decoration: BoxDecoration(
251 | borderRadius: BorderRadius.all(Radius.circular(4.0)),
252 | border: Border.all(width: 0.7, color: Colors.grey)),
253 | child: Text(
254 | '+ 关 注',
255 | style: TextStyle(fontSize: 11.0, fontWeight: FontWeight.bold),
256 | ));
257 | }
258 | }
259 |
260 | class TagItem extends StatelessWidget {
261 | final String text;
262 | final Color bgColor;
263 | final Color textColor;
264 | final double paddingH;
265 | final double paddingV;
266 | final bool hasBorder;
267 | final Color borderColor;
268 |
269 | const TagItem(
270 | {this.text,
271 | this.bgColor: Colors.pink,
272 | this.textColor: Colors.red,
273 | this.hasBorder: false,
274 | this.paddingH: 2.0,
275 | this.paddingV: 2.0,
276 | this.borderColor});
277 |
278 | @override
279 | Widget build(BuildContext context) {
280 | return Container(
281 | padding:
282 | EdgeInsets.symmetric(vertical: this.paddingV, horizontal: paddingH),
283 | decoration: BoxDecoration(
284 | color: this.bgColor,
285 | borderRadius: BorderRadius.all(Radius.circular(4.0)),
286 | border: this.hasBorder
287 | ? Border.all(width: 1.0, color: this.borderColor)
288 | : null),
289 | child: Text(
290 | this.text,
291 | style: TextStyle(fontSize: 11.0, color: this.textColor),
292 | ));
293 | }
294 | }
295 |
296 | class MyDivider extends StatelessWidget {
297 | @override
298 | Widget build(BuildContext context) {
299 | return Container(
300 | color: Colors.green[700],
301 | height: 0.3,
302 | width: double.infinity,
303 | );
304 | }
305 | }
306 |
--------------------------------------------------------------------------------
/lib/widget/kaiyan_indictor.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/widgets.dart';
3 |
4 | class KaiyanIndictor extends Decoration {
5 | @override
6 | BoxPainter createBoxPainter([VoidCallback onChanged]) {
7 | return _KaiyanIndictorPainter();
8 | }
9 | }
10 |
11 | class _KaiyanIndictorPainter extends BoxPainter {
12 | @override
13 | void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
14 | final Paint paint = Paint();
15 | paint.color = Colors.black;
16 | paint.style = PaintingStyle.fill;
17 | // final w = configuration.size.width / 10;
18 | // final h = configuration.size.width / 20;
19 | final w = 7.0;
20 | final h = 3.0;
21 | canvas.drawRect(
22 | Rect.fromLTWH(offset.dx - w / 2 + configuration.size.width / 2,
23 | configuration.size.height - h, w, h),
24 | paint);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/widget/route_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimationPageRoute extends MaterialPageRoute {
4 | Tween slideTween;
5 | Tween fadeTween;
6 |
7 | AnimationPageRoute(
8 | {WidgetBuilder builder,
9 | RouteSettings settings,
10 | bool maintainState: true,
11 | bool fullscreenDialog: false,
12 | this.slideTween,
13 | this.fadeTween})
14 | : super(
15 | builder: builder,
16 | settings: settings,
17 | maintainState: maintainState,
18 | fullscreenDialog: fullscreenDialog);
19 |
20 | @override
21 | Widget buildTransitions(BuildContext context, Animation animation,
22 | Animation secondaryAnimation, Widget child) {
23 | Widget widget = SlideTransition(
24 | position: _getSlideAnimation(animation),
25 | child: FadeTransition(
26 | opacity: _getFadeAnimation(animation),
27 | child: child,
28 | ),
29 | );
30 |
31 | return widget;
32 | }
33 |
34 | Animation _getSlideAnimation(Animation animation) {
35 | if (slideTween == null) {
36 | slideTween = new Tween(
37 | begin: new Offset(0.0, 0.0),
38 | end: Offset.zero,
39 | );
40 | }
41 |
42 | return slideTween.animate(
43 | new CurvedAnimation(parent: animation, curve: Curves.fastOutSlowIn));
44 | }
45 |
46 | Animation _getFadeAnimation(Animation animation) {
47 | if (fadeTween == null) {
48 | fadeTween = new Tween(
49 | begin: 1.0,
50 | end: 1.0,
51 | );
52 | }
53 |
54 | return fadeTween.animate(
55 | new CurvedAnimation(parent: animation, curve: Curves.easeIn));
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/widget/type_text.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class TypeText extends StatefulWidget {
6 | final String text;
7 | final TextStyle style;
8 | final int milliseconds;
9 | final int delay;
10 |
11 | const TypeText(
12 | {this.text,
13 | this.style: const TextStyle(color: Colors.black),
14 | this.milliseconds: 1000,
15 | this.delay: 0});
16 |
17 | @override
18 | State createState() {
19 | return _TypeTextState();
20 | }
21 | }
22 |
23 | class _TypeTextState extends State
24 | with SingleTickerProviderStateMixin {
25 | AnimationController animationController;
26 | Animation animation;
27 | String showText = '';
28 | String hideText = '';
29 | @override
30 | void initState() {
31 | super.initState();
32 | animationController = new AnimationController(
33 | vsync: this, duration: Duration(milliseconds: widget.milliseconds));
34 |
35 | animation = IntTween(begin: 0, end: widget.text.length).animate(
36 | CurvedAnimation(parent: animationController, curve: Curves.easeIn));
37 |
38 | animation.addListener(() {
39 | print('${animation.value}');
40 | setState(() {
41 | showText = widget.text.substring(0, animation.value);
42 | hideText = widget.text.substring(animation.value, widget.text.length);
43 | });
44 | });
45 |
46 | Future.delayed(Duration(milliseconds: widget.delay), () {
47 | animationController.forward(from: 0.0);
48 | });
49 | }
50 |
51 | @override
52 | Widget build(BuildContext context) {
53 | // return Text(showText);
54 | return RichText(
55 | maxLines: 5,
56 | overflow: TextOverflow.ellipsis,
57 | text: TextSpan(children: [
58 | TextSpan(text: showText, style: widget.style),
59 | TextSpan(
60 | text: hideText,
61 | style: widget.style.copyWith(color: Colors.transparent))
62 | ]),
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/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 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.0.3"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "1.1.1"
39 | chewie:
40 | dependency: "direct main"
41 | description:
42 | name: chewie
43 | url: "https://pub.flutter-io.cn"
44 | source: hosted
45 | version: "0.6.1"
46 | collection:
47 | dependency: transitive
48 | description:
49 | name: collection
50 | url: "https://pub.flutter-io.cn"
51 | source: hosted
52 | version: "1.14.6"
53 | convert:
54 | dependency: transitive
55 | description:
56 | name: convert
57 | url: "https://pub.flutter-io.cn"
58 | source: hosted
59 | version: "2.0.1"
60 | cookie_jar:
61 | dependency: transitive
62 | description:
63 | name: cookie_jar
64 | url: "https://pub.flutter-io.cn"
65 | source: hosted
66 | version: "0.0.4"
67 | crypto:
68 | dependency: transitive
69 | description:
70 | name: crypto
71 | url: "https://pub.flutter-io.cn"
72 | source: hosted
73 | version: "2.0.3"
74 | csslib:
75 | dependency: transitive
76 | description:
77 | name: csslib
78 | url: "https://pub.flutter-io.cn"
79 | source: hosted
80 | version: "0.14.4"
81 | cupertino_icons:
82 | dependency: "direct main"
83 | description:
84 | name: cupertino_icons
85 | url: "https://pub.flutter-io.cn"
86 | source: hosted
87 | version: "0.1.2"
88 | dio:
89 | dependency: "direct main"
90 | description:
91 | name: dio
92 | url: "https://pub.flutter-io.cn"
93 | source: hosted
94 | version: "0.0.14"
95 | flutter:
96 | dependency: "direct main"
97 | description: flutter
98 | source: sdk
99 | version: "0.0.0"
100 | flutter_test:
101 | dependency: "direct dev"
102 | description: flutter
103 | source: sdk
104 | version: "0.0.0"
105 | front_end:
106 | dependency: transitive
107 | description:
108 | name: front_end
109 | url: "https://pub.flutter-io.cn"
110 | source: hosted
111 | version: "0.1.0-alpha.12"
112 | glob:
113 | dependency: transitive
114 | description:
115 | name: glob
116 | url: "https://pub.flutter-io.cn"
117 | source: hosted
118 | version: "1.1.5"
119 | html:
120 | dependency: transitive
121 | description:
122 | name: html
123 | url: "https://pub.flutter-io.cn"
124 | source: hosted
125 | version: "0.13.3"
126 | http:
127 | dependency: transitive
128 | description:
129 | name: http
130 | url: "https://pub.flutter-io.cn"
131 | source: hosted
132 | version: "0.11.3+16"
133 | http_multi_server:
134 | dependency: transitive
135 | description:
136 | name: http_multi_server
137 | url: "https://pub.flutter-io.cn"
138 | source: hosted
139 | version: "2.0.4"
140 | http_parser:
141 | dependency: transitive
142 | description:
143 | name: http_parser
144 | url: "https://pub.flutter-io.cn"
145 | source: hosted
146 | version: "3.1.2"
147 | io:
148 | dependency: transitive
149 | description:
150 | name: io
151 | url: "https://pub.flutter-io.cn"
152 | source: hosted
153 | version: "0.3.2+1"
154 | js:
155 | dependency: transitive
156 | description:
157 | name: js
158 | url: "https://pub.flutter-io.cn"
159 | source: hosted
160 | version: "0.6.1"
161 | kernel:
162 | dependency: transitive
163 | description:
164 | name: kernel
165 | url: "https://pub.flutter-io.cn"
166 | source: hosted
167 | version: "0.3.0-alpha.12"
168 | logging:
169 | dependency: transitive
170 | description:
171 | name: logging
172 | url: "https://pub.flutter-io.cn"
173 | source: hosted
174 | version: "0.11.3+1"
175 | matcher:
176 | dependency: transitive
177 | description:
178 | name: matcher
179 | url: "https://pub.flutter-io.cn"
180 | source: hosted
181 | version: "0.12.2+1"
182 | meta:
183 | dependency: transitive
184 | description:
185 | name: meta
186 | url: "https://pub.flutter-io.cn"
187 | source: hosted
188 | version: "1.1.5"
189 | mime:
190 | dependency: transitive
191 | description:
192 | name: mime
193 | url: "https://pub.flutter-io.cn"
194 | source: hosted
195 | version: "0.9.6"
196 | multi_server_socket:
197 | dependency: transitive
198 | description:
199 | name: multi_server_socket
200 | url: "https://pub.flutter-io.cn"
201 | source: hosted
202 | version: "1.0.1"
203 | node_preamble:
204 | dependency: transitive
205 | description:
206 | name: node_preamble
207 | url: "https://pub.flutter-io.cn"
208 | source: hosted
209 | version: "1.4.1"
210 | open_iconic_flutter:
211 | dependency: transitive
212 | description:
213 | name: open_iconic_flutter
214 | url: "https://pub.flutter-io.cn"
215 | source: hosted
216 | version: "0.2.0"
217 | package_config:
218 | dependency: transitive
219 | description:
220 | name: package_config
221 | url: "https://pub.flutter-io.cn"
222 | source: hosted
223 | version: "1.0.3"
224 | package_resolver:
225 | dependency: transitive
226 | description:
227 | name: package_resolver
228 | url: "https://pub.flutter-io.cn"
229 | source: hosted
230 | version: "1.0.2"
231 | path:
232 | dependency: transitive
233 | description:
234 | name: path
235 | url: "https://pub.flutter-io.cn"
236 | source: hosted
237 | version: "1.5.1"
238 | plugin:
239 | dependency: transitive
240 | description:
241 | name: plugin
242 | url: "https://pub.flutter-io.cn"
243 | source: hosted
244 | version: "0.2.0+2"
245 | pool:
246 | dependency: transitive
247 | description:
248 | name: pool
249 | url: "https://pub.flutter-io.cn"
250 | source: hosted
251 | version: "1.3.4"
252 | pub_semver:
253 | dependency: transitive
254 | description:
255 | name: pub_semver
256 | url: "https://pub.flutter-io.cn"
257 | source: hosted
258 | version: "1.4.1"
259 | quiver:
260 | dependency: transitive
261 | description:
262 | name: quiver
263 | url: "https://pub.flutter-io.cn"
264 | source: hosted
265 | version: "0.29.0+1"
266 | scoped_model:
267 | dependency: "direct main"
268 | description:
269 | name: scoped_model
270 | url: "https://pub.flutter-io.cn"
271 | source: hosted
272 | version: "0.2.0"
273 | shelf:
274 | dependency: transitive
275 | description:
276 | name: shelf
277 | url: "https://pub.flutter-io.cn"
278 | source: hosted
279 | version: "0.7.3"
280 | shelf_packages_handler:
281 | dependency: transitive
282 | description:
283 | name: shelf_packages_handler
284 | url: "https://pub.flutter-io.cn"
285 | source: hosted
286 | version: "1.0.3"
287 | shelf_static:
288 | dependency: transitive
289 | description:
290 | name: shelf_static
291 | url: "https://pub.flutter-io.cn"
292 | source: hosted
293 | version: "0.2.7"
294 | shelf_web_socket:
295 | dependency: transitive
296 | description:
297 | name: shelf_web_socket
298 | url: "https://pub.flutter-io.cn"
299 | source: hosted
300 | version: "0.2.2"
301 | sky_engine:
302 | dependency: transitive
303 | description: flutter
304 | source: sdk
305 | version: "0.0.99"
306 | source_map_stack_trace:
307 | dependency: transitive
308 | description:
309 | name: source_map_stack_trace
310 | url: "https://pub.flutter-io.cn"
311 | source: hosted
312 | version: "1.1.4"
313 | source_maps:
314 | dependency: transitive
315 | description:
316 | name: source_maps
317 | url: "https://pub.flutter-io.cn"
318 | source: hosted
319 | version: "0.10.5"
320 | source_span:
321 | dependency: transitive
322 | description:
323 | name: source_span
324 | url: "https://pub.flutter-io.cn"
325 | source: hosted
326 | version: "1.4.0"
327 | stack_trace:
328 | dependency: transitive
329 | description:
330 | name: stack_trace
331 | url: "https://pub.flutter-io.cn"
332 | source: hosted
333 | version: "1.9.2"
334 | stream_channel:
335 | dependency: transitive
336 | description:
337 | name: stream_channel
338 | url: "https://pub.flutter-io.cn"
339 | source: hosted
340 | version: "1.6.6"
341 | string_scanner:
342 | dependency: transitive
343 | description:
344 | name: string_scanner
345 | url: "https://pub.flutter-io.cn"
346 | source: hosted
347 | version: "1.0.2"
348 | term_glyph:
349 | dependency: transitive
350 | description:
351 | name: term_glyph
352 | url: "https://pub.flutter-io.cn"
353 | source: hosted
354 | version: "1.0.0"
355 | test:
356 | dependency: transitive
357 | description:
358 | name: test
359 | url: "https://pub.flutter-io.cn"
360 | source: hosted
361 | version: "0.12.37"
362 | typed_data:
363 | dependency: transitive
364 | description:
365 | name: typed_data
366 | url: "https://pub.flutter-io.cn"
367 | source: hosted
368 | version: "1.1.5"
369 | utf:
370 | dependency: transitive
371 | description:
372 | name: utf
373 | url: "https://pub.flutter-io.cn"
374 | source: hosted
375 | version: "0.9.0+4"
376 | vector_math:
377 | dependency: transitive
378 | description:
379 | name: vector_math
380 | url: "https://pub.flutter-io.cn"
381 | source: hosted
382 | version: "2.0.6"
383 | video_player:
384 | dependency: transitive
385 | description:
386 | name: video_player
387 | url: "https://pub.flutter-io.cn"
388 | source: hosted
389 | version: "0.6.4"
390 | watcher:
391 | dependency: transitive
392 | description:
393 | name: watcher
394 | url: "https://pub.flutter-io.cn"
395 | source: hosted
396 | version: "0.9.7+7"
397 | web_socket_channel:
398 | dependency: transitive
399 | description:
400 | name: web_socket_channel
401 | url: "https://pub.flutter-io.cn"
402 | source: hosted
403 | version: "1.0.7"
404 | yaml:
405 | dependency: transitive
406 | description:
407 | name: yaml
408 | url: "https://pub.flutter-io.cn"
409 | source: hosted
410 | version: "2.1.13"
411 | sdks:
412 | dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760"
413 | flutter: ">=0.2.5 <2.0.0"
414 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: kaiyan
2 | description: A new Flutter project.
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 | scoped_model: "^0.2.0"
12 | dio: ^0.0.10
13 | chewie: "^0.6.1"
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 |
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://www.dartlang.org/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter.
24 | flutter:
25 |
26 | # The following line ensures that the Material Icons font is
27 | # included with your application, so that you can use the icons in
28 | # the material Icons class.
29 | uses-material-design: true
30 |
31 | # To add assets to your application, add an assets section, like this:
32 | assets:
33 | # - asset/images/ic_tab_strip_icon_feed.png
34 | - asset/images/
35 | # - images/a_dot_ham.jpeg
36 |
37 | # An image asset can refer to one or more resolution-specific "variants", see
38 | # https://flutter.io/assets-and-images/#resolution-aware.
39 |
40 | # For details regarding adding assets from package dependencies, see
41 | # https://flutter.io/assets-and-images/#from-packages
42 |
43 | # To add custom fonts to your application, add a fonts section here,
44 | # in this "flutter" section. Each entry in this list should have a
45 | # "family" key with the font family name, and a "fonts" key with a
46 | # list giving the asset and other descriptors for the font. For
47 | # example:
48 | fonts:
49 | - family: Lobster
50 | fonts:
51 | - asset: asset/fonts/Lobster-1.4.otf
52 | - family: FZLanTing
53 | fonts:
54 | - asset: asset/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF
55 | # style: italic
56 | # - family: Trajan Pro
57 | # fonts:
58 | # - asset: fonts/TrajanPro.ttf
59 | # - asset: fonts/TrajanPro_Bold.ttf
60 | # weight: 700
61 | #
62 | # For details regarding fonts from package dependencies,
63 | # see https://flutter.io/custom-fonts/#from-packages
64 |
--------------------------------------------------------------------------------
/test/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:flutter/material.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | import 'package:kaiyan/main.dart';
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 |
--------------------------------------------------------------------------------