├── .gitignore ├── .metadata ├── README.md ├── WechatIMG1.jpeg ├── android ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── flutterboss │ │ │ └── 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 ├── effect.gif ├── effect2.gif ├── images ├── ic_main_tab_company_nor.png ├── ic_main_tab_company_pre.png ├── ic_main_tab_contacts_nor.png ├── ic_main_tab_contacts_pre.png ├── ic_main_tab_find_nor.png ├── ic_main_tab_find_pre.png ├── ic_main_tab_my_nor.png └── ic_main_tab_my_pre.png ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── WorkspaceSettings.xcsettings └── 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 ├── common │ ├── config │ │ └── config.dart │ ├── utils │ │ └── common_util.dart │ └── widget │ │ └── scroll_img_item.dart ├── layout_type.dart ├── main.dart ├── model │ ├── company.dart │ ├── company_detail.dart │ └── job.dart ├── routers │ └── hero_dialog_route.dart ├── splash.dart └── widgets │ ├── chat_page.dart │ ├── company │ ├── company_detail_page.dart │ ├── company_item.dart │ └── welfare_item.dart │ ├── company_page.dart │ ├── gallery_page.dart │ ├── job │ └── job_item.dart │ ├── job_page.dart │ ├── mine │ ├── contact_item.dart │ └── menu_item.dart │ └── mine_page.dart ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /.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: f914e701c51cfaa835f68aee08899997892a5040 8 | channel: beta 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter仿BOSS直聘(二),大前端技术实现 2 | 3 | ## 项目简介 4 | 记得上一篇的写作时间还在2018年2月份,已经很久没更新了,而flutter的版本更新了好几次,自flutter 1.0正式版推出之后,一直有打算把之前的项目重写一下,因为flutter本身更新了许多新特性,老的已经是过去式了,也老有人来问我,之前的项目运行不了,是的,因为sdk太老了,而且之前的项目纯粹是练手玩。 5 | 6 | 在过去的这段时间里,踊跃出了很多关于flutter的技术文章和开源项目例子,基本上每天都有,同比RN刚出来时,热情度远超RN。于是,笔者怀着对新技术热情的学习态度重写了这个开源项目,并且后续也会不断完善。 7 | 8 | 为什么选仿BOSS直聘作为题材? 9 | 因为这款APP相信大家都在使用,里面组件繁多且有一定复杂度,能衍生出来许多基于flutter组件库的子项目,里面有些功能,比如地图,IM,后面都会使用flutter来实现。为了让项目更接近真实,这次连服务端也实现了。先把开源地址提供给大家: 10 | 11 | ## github地址: 12 | 服务端版本:[flutter仿boss直聘服务端](https://github.com/heruijun/flutter-boss-server). 13 | 14 | flutter版本:[flutter仿boss直聘](https://github.com/heruijun/flutter_boss). 15 | 16 | ## 项目效果图: 17 | ![img](https://user-gold-cdn.xitu.io/2019/1/20/1686a0c4b2fb9cda?w=252&h=528&f=gif&s=1194865) 18 | 19 | ## 相关技术点 20 | 服务端: 21 | * 基于puppeteer + mongo + nodejs实现爬虫服务器,使用nuxt + koa2 + vue实现服务端渲染以及api服务接口。这里就不过多占用篇幅了,本文主要还是讲flutter,对前端感兴趣的会另外分享相关技术话题。 22 | 23 | flutter端: 24 | * 项目中使用以下组件,请记住一句咒语:flutter一切皆组件。 25 | Container, Row, Column, Flex, ListView, CustomListView, Wrap, Padding, Center, Future, FutureBuilder, Expanded, Navigator, BottomNavigationBar, GesureDetector, Listener, CircleAvatar等以及一些自定义组件。 26 | * 布局语义化,不滥用布局组件,并尽量简化组件嵌套结构 27 | 28 | ## 技术细节 29 | * 实现启动画面,在启动1.5秒后,跳转到app里,并且把启动画面的路由remove掉。 30 | 31 | ``` 32 | Navigator.of(context).pushAndRemoveUntil( 33 | PageRouteBuilder( 34 | pageBuilder: (BuildContext context, Animation animation, 35 | Animation secondaryAnimation) { 36 | return AnimatedBuilder( 37 | animation: animation, 38 | builder: (BuildContext context, Widget child) { 39 | return Opacity( 40 | opacity: animation.value, 41 | child: new MainPage(title: 'Boss直聘'), 42 | ); 43 | }, 44 | ); 45 | }, 46 | transitionDuration: Duration(milliseconds: 300), 47 | ), 48 | (Route route) => route == null); 49 | ``` 50 | 51 | * 列表页面,没啥好说的,ListView大家应该都用过,只是需要记住一点,列表再跳转详情时需要记录当前列表的滚动位置,只需加入以下代码即可: 52 | `key: new PageStorageKey('key-name')` 53 | 54 | * Hero动画,在详情页面里,用了2处Hero动画,Hero动画是在route切换过程中执行的动画。需要当前页和目标页一一对应起来。 55 | 56 | ``` 57 | Hero( 58 | tag: heroLogo, 59 | child: ClipRRect( 60 | borderRadius: new BorderRadius.circular(8.0), 61 | child: Image.network( 62 | widget.company.logo, 63 | width: 70, 64 | height: 70, 65 | ), 66 | ), 67 | )), 68 | ``` 69 | 70 | * CustomListView滑动时appBar显示隐藏title。大家都知道,flexibleSpace里的CollapseMode.parallax属性可以在屏幕滚动时把title移动到appBar里,可实际上,布局是定制的,实现不了官方的那种效果,于是通过监听ScrollController并计算滚动位置的方式修改state属性让appBar的title根据滚动位置显示隐藏。 71 | 72 | ``` 73 | _scrollListener() { 74 | setState(() { 75 | if (_scrollController.offset < 56 && _isShow) { 76 | _isShow = false; 77 | } else if (_scrollController.offset >= 56 && _isShow == false) { 78 | _isShow = true; 79 | } 80 | }); 81 | } 82 | ``` 83 | 84 | ## TODO-LIST 85 | * 公司详情页slidePanel控件实现 86 | * 公共弹层组件封装 87 | * 消息列表控件封装并实现测滑删除功能 88 | 89 | ## qq技术Flutter讨论千人群号:468010872 90 | ![img](https://user-gold-cdn.xitu.io/2019/1/20/1686a0d003f4a331?w=541&h=741&f=jpeg&s=55386) 91 | 92 | ## 联系方式 93 | 微信:heruijun2258,注明来意。 -------------------------------------------------------------------------------- /WechatIMG1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/WechatIMG1.jpeg -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.flutterboss" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /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/flutterboss/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutterboss; 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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /effect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/effect.gif -------------------------------------------------------------------------------- /effect2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/effect2.gif -------------------------------------------------------------------------------- /images/ic_main_tab_company_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_company_nor.png -------------------------------------------------------------------------------- /images/ic_main_tab_company_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_company_pre.png -------------------------------------------------------------------------------- /images/ic_main_tab_contacts_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_contacts_nor.png -------------------------------------------------------------------------------- /images/ic_main_tab_contacts_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_contacts_pre.png -------------------------------------------------------------------------------- /images/ic_main_tab_find_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_find_nor.png -------------------------------------------------------------------------------- /images/ic_main_tab_find_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_find_pre.png -------------------------------------------------------------------------------- /images/ic_main_tab_my_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_my_nor.png -------------------------------------------------------------------------------- /images/ic_main_tab_my_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/images/ic_main_tab_my_pre.png -------------------------------------------------------------------------------- /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 "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /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 | 1B3DBB438913B836C444ABEF /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 90284498434C36FAD28A9D63 /* libPods-Runner.a */; }; 12 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 13 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 14 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 15 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.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 | 90284498434C36FAD28A9D63 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 53 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 54 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 56 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 57 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 58 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 59 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 68 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 69 | 1B3DBB438913B836C444ABEF /* libPods-Runner.a in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 76A0B5EF5F975608DF492EB9 /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 90284498434C36FAD28A9D63 /* libPods-Runner.a */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 9740EEB11CF90186004384FC /* Flutter */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 88 | 3B80C3931E831B6300D905FE /* App.framework */, 89 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 90 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 91 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 92 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 93 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 94 | ); 95 | name = Flutter; 96 | sourceTree = ""; 97 | }; 98 | 97C146E51CF9000F007C117D = { 99 | isa = PBXGroup; 100 | children = ( 101 | 9740EEB11CF90186004384FC /* Flutter */, 102 | 97C146F01CF9000F007C117D /* Runner */, 103 | 97C146EF1CF9000F007C117D /* Products */, 104 | F01BE1CF7C225B756EE2E624 /* Pods */, 105 | 76A0B5EF5F975608DF492EB9 /* Frameworks */, 106 | ); 107 | sourceTree = ""; 108 | }; 109 | 97C146EF1CF9000F007C117D /* Products */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 97C146EE1CF9000F007C117D /* Runner.app */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 97C146F01CF9000F007C117D /* Runner */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 121 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 122 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 123 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 124 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 125 | 97C147021CF9000F007C117D /* Info.plist */, 126 | 97C146F11CF9000F007C117D /* Supporting Files */, 127 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 128 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 129 | ); 130 | path = Runner; 131 | sourceTree = ""; 132 | }; 133 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 97C146F21CF9000F007C117D /* main.m */, 137 | ); 138 | name = "Supporting Files"; 139 | sourceTree = ""; 140 | }; 141 | F01BE1CF7C225B756EE2E624 /* Pods */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | ); 145 | name = Pods; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 97C146ED1CF9000F007C117D /* Runner */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 154 | buildPhases = ( 155 | 9F4CF1A16ECED2D945704602 /* [CP] Check Pods Manifest.lock */, 156 | 9740EEB61CF901F6004384FC /* Run Script */, 157 | 97C146EA1CF9000F007C117D /* Sources */, 158 | 97C146EB1CF9000F007C117D /* Frameworks */, 159 | 97C146EC1CF9000F007C117D /* Resources */, 160 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 161 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 162 | 8A283E4DCAA924016FCFAB18 /* [CP] Embed Pods Frameworks */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = Runner; 169 | productName = Runner; 170 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | /* End PBXNativeTarget section */ 174 | 175 | /* Begin PBXProject section */ 176 | 97C146E61CF9000F007C117D /* Project object */ = { 177 | isa = PBXProject; 178 | attributes = { 179 | LastUpgradeCheck = 0910; 180 | ORGANIZATIONNAME = "The Chromium Authors"; 181 | TargetAttributes = { 182 | 97C146ED1CF9000F007C117D = { 183 | CreatedOnToolsVersion = 7.3.1; 184 | }; 185 | }; 186 | }; 187 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 188 | compatibilityVersion = "Xcode 3.2"; 189 | developmentRegion = English; 190 | hasScannedForEncodings = 0; 191 | knownRegions = ( 192 | en, 193 | Base, 194 | ); 195 | mainGroup = 97C146E51CF9000F007C117D; 196 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 197 | projectDirPath = ""; 198 | projectRoot = ""; 199 | targets = ( 200 | 97C146ED1CF9000F007C117D /* Runner */, 201 | ); 202 | }; 203 | /* End PBXProject section */ 204 | 205 | /* Begin PBXResourcesBuildPhase section */ 206 | 97C146EC1CF9000F007C117D /* Resources */ = { 207 | isa = PBXResourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 212 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 214 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 215 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXResourcesBuildPhase section */ 220 | 221 | /* Begin PBXShellScriptBuildPhase section */ 222 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 223 | isa = PBXShellScriptBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | inputPaths = ( 228 | ); 229 | name = "Thin Binary"; 230 | outputPaths = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | shellPath = /bin/sh; 234 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 235 | }; 236 | 8A283E4DCAA924016FCFAB18 /* [CP] Embed Pods Frameworks */ = { 237 | isa = PBXShellScriptBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | inputFileListPaths = ( 242 | ); 243 | inputPaths = ( 244 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 245 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 246 | ); 247 | name = "[CP] Embed Pods Frameworks"; 248 | outputFileListPaths = ( 249 | ); 250 | outputPaths = ( 251 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | shellPath = /bin/sh; 255 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 256 | showEnvVarsInLog = 0; 257 | }; 258 | 9740EEB61CF901F6004384FC /* Run Script */ = { 259 | isa = PBXShellScriptBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | ); 263 | inputPaths = ( 264 | ); 265 | name = "Run Script"; 266 | outputPaths = ( 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | shellPath = /bin/sh; 270 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 271 | }; 272 | 9F4CF1A16ECED2D945704602 /* [CP] Check Pods Manifest.lock */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputFileListPaths = ( 278 | ); 279 | inputPaths = ( 280 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 281 | "${PODS_ROOT}/Manifest.lock", 282 | ); 283 | name = "[CP] Check Pods Manifest.lock"; 284 | outputFileListPaths = ( 285 | ); 286 | outputPaths = ( 287 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | shellPath = /bin/sh; 291 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 292 | showEnvVarsInLog = 0; 293 | }; 294 | /* End PBXShellScriptBuildPhase section */ 295 | 296 | /* Begin PBXSourcesBuildPhase section */ 297 | 97C146EA1CF9000F007C117D /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 302 | 97C146F31CF9000F007C117D /* main.m in Sources */, 303 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXVariantGroup section */ 310 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 311 | isa = PBXVariantGroup; 312 | children = ( 313 | 97C146FB1CF9000F007C117D /* Base */, 314 | ); 315 | name = Main.storyboard; 316 | sourceTree = ""; 317 | }; 318 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 319 | isa = PBXVariantGroup; 320 | children = ( 321 | 97C147001CF9000F007C117D /* Base */, 322 | ); 323 | name = LaunchScreen.storyboard; 324 | sourceTree = ""; 325 | }; 326 | /* End PBXVariantGroup section */ 327 | 328 | /* Begin XCBuildConfiguration section */ 329 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 330 | isa = XCBuildConfiguration; 331 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_NONNULL = YES; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_COMMA = YES; 342 | CLANG_WARN_CONSTANT_CONVERSION = YES; 343 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 344 | CLANG_WARN_EMPTY_BODY = YES; 345 | CLANG_WARN_ENUM_CONVERSION = YES; 346 | CLANG_WARN_INFINITE_RECURSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 349 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 352 | CLANG_WARN_STRICT_PROTOTYPES = YES; 353 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 354 | CLANG_WARN_UNREACHABLE_CODE = YES; 355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 356 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 357 | COPY_PHASE_STRIP = NO; 358 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 359 | ENABLE_NS_ASSERTIONS = NO; 360 | ENABLE_STRICT_OBJC_MSGSEND = YES; 361 | GCC_C_LANGUAGE_STANDARD = gnu99; 362 | GCC_NO_COMMON_BLOCKS = YES; 363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 365 | GCC_WARN_UNDECLARED_SELECTOR = YES; 366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 367 | GCC_WARN_UNUSED_FUNCTION = YES; 368 | GCC_WARN_UNUSED_VARIABLE = YES; 369 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 370 | MTL_ENABLE_DEBUG_INFO = NO; 371 | SDKROOT = iphoneos; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | VALIDATE_PRODUCT = YES; 374 | }; 375 | name = Profile; 376 | }; 377 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 378 | isa = XCBuildConfiguration; 379 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 380 | buildSettings = { 381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 382 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 383 | DEVELOPMENT_TEAM = S8QB4VV633; 384 | ENABLE_BITCODE = NO; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(PROJECT_DIR)/Flutter", 388 | ); 389 | INFOPLIST_FILE = Runner/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 391 | LIBRARY_SEARCH_PATHS = ( 392 | "$(inherited)", 393 | "$(PROJECT_DIR)/Flutter", 394 | ); 395 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBoss; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | VERSIONING_SYSTEM = "apple-generic"; 398 | }; 399 | name = Profile; 400 | }; 401 | 97C147031CF9000F007C117D /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 404 | buildSettings = { 405 | ALWAYS_SEARCH_USER_PATHS = NO; 406 | CLANG_ANALYZER_NONNULL = YES; 407 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 408 | CLANG_CXX_LIBRARY = "libc++"; 409 | CLANG_ENABLE_MODULES = YES; 410 | CLANG_ENABLE_OBJC_ARC = YES; 411 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 412 | CLANG_WARN_BOOL_CONVERSION = YES; 413 | CLANG_WARN_COMMA = YES; 414 | CLANG_WARN_CONSTANT_CONVERSION = YES; 415 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 416 | CLANG_WARN_EMPTY_BODY = YES; 417 | CLANG_WARN_ENUM_CONVERSION = YES; 418 | CLANG_WARN_INFINITE_RECURSION = YES; 419 | CLANG_WARN_INT_CONVERSION = YES; 420 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 422 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 423 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 424 | CLANG_WARN_STRICT_PROTOTYPES = YES; 425 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 426 | CLANG_WARN_UNREACHABLE_CODE = YES; 427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 428 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 429 | COPY_PHASE_STRIP = NO; 430 | DEBUG_INFORMATION_FORMAT = dwarf; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | ENABLE_TESTABILITY = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu99; 434 | GCC_DYNAMIC_NO_PIC = NO; 435 | GCC_NO_COMMON_BLOCKS = YES; 436 | GCC_OPTIMIZATION_LEVEL = 0; 437 | GCC_PREPROCESSOR_DEFINITIONS = ( 438 | "DEBUG=1", 439 | "$(inherited)", 440 | ); 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 448 | MTL_ENABLE_DEBUG_INFO = YES; 449 | ONLY_ACTIVE_ARCH = YES; 450 | SDKROOT = iphoneos; 451 | TARGETED_DEVICE_FAMILY = "1,2"; 452 | }; 453 | name = Debug; 454 | }; 455 | 97C147041CF9000F007C117D /* Release */ = { 456 | isa = XCBuildConfiguration; 457 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_ANALYZER_NONNULL = YES; 461 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 462 | CLANG_CXX_LIBRARY = "libc++"; 463 | CLANG_ENABLE_MODULES = YES; 464 | CLANG_ENABLE_OBJC_ARC = YES; 465 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 466 | CLANG_WARN_BOOL_CONVERSION = YES; 467 | CLANG_WARN_COMMA = YES; 468 | CLANG_WARN_CONSTANT_CONVERSION = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 477 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 478 | CLANG_WARN_STRICT_PROTOTYPES = YES; 479 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 480 | CLANG_WARN_UNREACHABLE_CODE = YES; 481 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 482 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 483 | COPY_PHASE_STRIP = NO; 484 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 485 | ENABLE_NS_ASSERTIONS = NO; 486 | ENABLE_STRICT_OBJC_MSGSEND = YES; 487 | GCC_C_LANGUAGE_STANDARD = gnu99; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 490 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 491 | GCC_WARN_UNDECLARED_SELECTOR = YES; 492 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 493 | GCC_WARN_UNUSED_FUNCTION = YES; 494 | GCC_WARN_UNUSED_VARIABLE = YES; 495 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 496 | MTL_ENABLE_DEBUG_INFO = NO; 497 | SDKROOT = iphoneos; 498 | TARGETED_DEVICE_FAMILY = "1,2"; 499 | VALIDATE_PRODUCT = YES; 500 | }; 501 | name = Release; 502 | }; 503 | 97C147061CF9000F007C117D /* Debug */ = { 504 | isa = XCBuildConfiguration; 505 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 506 | buildSettings = { 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 509 | ENABLE_BITCODE = NO; 510 | FRAMEWORK_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "$(PROJECT_DIR)/Flutter", 513 | ); 514 | INFOPLIST_FILE = Runner/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 516 | LIBRARY_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "$(PROJECT_DIR)/Flutter", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBoss; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | VERSIONING_SYSTEM = "apple-generic"; 523 | }; 524 | name = Debug; 525 | }; 526 | 97C147071CF9000F007C117D /* Release */ = { 527 | isa = XCBuildConfiguration; 528 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 529 | buildSettings = { 530 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 531 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 532 | ENABLE_BITCODE = NO; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "$(PROJECT_DIR)/Flutter", 536 | ); 537 | INFOPLIST_FILE = Runner/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 539 | LIBRARY_SEARCH_PATHS = ( 540 | "$(inherited)", 541 | "$(PROJECT_DIR)/Flutter", 542 | ); 543 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterBoss; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | VERSIONING_SYSTEM = "apple-generic"; 546 | }; 547 | name = Release; 548 | }; 549 | /* End XCBuildConfiguration section */ 550 | 551 | /* Begin XCConfigurationList section */ 552 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | 97C147031CF9000F007C117D /* Debug */, 556 | 97C147041CF9000F007C117D /* Release */, 557 | 249021D3217E4FDB00AE95B9 /* Profile */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 97C147061CF9000F007C117D /* Debug */, 566 | 97C147071CF9000F007C117D /* Release */, 567 | 249021D4217E4FDB00AE95B9 /* Profile */, 568 | ); 569 | defaultConfigurationIsVisible = 0; 570 | defaultConfigurationName = Release; 571 | }; 572 | /* End XCConfigurationList section */ 573 | }; 574 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 575 | } 576 | -------------------------------------------------------------------------------- /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 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/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 | flutter_boss 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/common/config/config.dart: -------------------------------------------------------------------------------- 1 | class Config { 2 | static const PAGE_SIZE = 10; 3 | // static const BASE_URL = "http://172.20.10.3:3000"; 4 | static const BASE_URL = "http://192.168.11.104:3000"; 5 | } 6 | -------------------------------------------------------------------------------- /lib/common/utils/common_util.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_boss/82e03b9885a9183118720814592f49398297e7d2/lib/common/utils/common_util.dart -------------------------------------------------------------------------------- /lib/common/widget/scroll_img_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScrollImageItem extends StatelessWidget { 4 | ScrollImageItem({Key key, this.url, this.onPressed, this.heroTag}) : super(key: key); 5 | final String url; 6 | final String heroTag; 7 | VoidCallback onPressed; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return GestureDetector( 12 | onTap: onPressed, 13 | child: Hero( 14 | tag: heroTag, 15 | child: Container( 16 | margin: EdgeInsets.only(right: 20.0), 17 | child: ClipRRect( 18 | borderRadius: new BorderRadius.circular(8.0), 19 | child: Image.network(url, width: 300, fit: BoxFit.cover), 20 | ), 21 | ))); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/layout_type.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | abstract class HasLayoutGroup { 4 | VoidCallback get onLayoutToggle; 5 | } 6 | 7 | enum LayoutType { 8 | job, 9 | company, 10 | chat, 11 | mine, 12 | } 13 | 14 | String layoutName(LayoutType layoutType) { 15 | switch (layoutType) { 16 | case LayoutType.job: 17 | return '职位'; 18 | case LayoutType.company: 19 | return '公司'; 20 | case LayoutType.chat: 21 | return '消息'; 22 | case LayoutType.mine: 23 | return '我的'; 24 | default: 25 | return ''; 26 | } 27 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_boss/splash.dart'; 3 | import 'package:redux/redux.dart'; 4 | import 'package:flutter_boss/widgets/chat_page.dart'; 5 | import 'package:flutter_boss/widgets/company_page.dart'; 6 | import 'package:flutter_boss/widgets/mine_page.dart'; 7 | import 'package:flutter_boss/widgets/job_page.dart'; 8 | import 'package:flutter_boss/layout_type.dart'; 9 | 10 | void main() => runApp(new App()); 11 | 12 | class App extends StatelessWidget { 13 | final Store store; 14 | final String title; 15 | 16 | App({Key key, this.store, this.title}) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return new MaterialApp( 21 | theme: new ThemeData( 22 | primaryIconTheme: const IconThemeData(color: Colors.white), 23 | brightness: Brightness.light, 24 | primaryColor: new Color.fromARGB(255, 0, 215, 198), 25 | accentColor: Colors.cyan[300], 26 | ), 27 | home: SplashPage(), 28 | // home: new MainPage(title: 'Boss直聘'), 29 | ); 30 | } 31 | } 32 | 33 | class MainPage extends StatefulWidget { 34 | MainPage({Key key, this.title}) : super(key: key); 35 | final String title; 36 | 37 | @override 38 | _MainPageState createState() => new _MainPageState(); 39 | } 40 | 41 | class _MainPageState extends State { 42 | LayoutType _layoutSelection = LayoutType.job; 43 | 44 | Color _colorTabMatching({LayoutType layoutSelection}) { 45 | return _layoutSelection == layoutSelection ? Colors.cyan[300] : Colors.grey; 46 | } 47 | 48 | BottomNavigationBarItem _buildItem( 49 | {String icon, LayoutType layoutSelection}) { 50 | String text = layoutName(layoutSelection); 51 | return BottomNavigationBarItem( 52 | icon: new Image.asset( 53 | icon, 54 | width: 35.0, 55 | height: 35.0, 56 | ), 57 | title: Text( 58 | text, 59 | style: TextStyle( 60 | color: _colorTabMatching(layoutSelection: layoutSelection), 61 | ), 62 | ), 63 | ); 64 | } 65 | 66 | Widget _buildButtonNavBar() { 67 | return BottomNavigationBar( 68 | type: BottomNavigationBarType.fixed, 69 | items: [ 70 | _buildItem( 71 | icon: _layoutSelection == LayoutType.job 72 | ? "images/ic_main_tab_find_pre.png" 73 | : "images/ic_main_tab_find_nor.png", 74 | layoutSelection: LayoutType.job), 75 | _buildItem( 76 | icon: _layoutSelection == LayoutType.company 77 | ? "images/ic_main_tab_company_pre.png" 78 | : "images/ic_main_tab_company_nor.png", 79 | layoutSelection: LayoutType.company), 80 | _buildItem( 81 | icon: _layoutSelection == LayoutType.chat 82 | ? "images/ic_main_tab_contacts_pre.png" 83 | : "images/ic_main_tab_contacts_nor.png", 84 | layoutSelection: LayoutType.chat), 85 | _buildItem( 86 | icon: _layoutSelection == LayoutType.mine 87 | ? "images/ic_main_tab_my_pre.png" 88 | : "images/ic_main_tab_my_nor.png", 89 | layoutSelection: LayoutType.mine), 90 | ], 91 | onTap: _onSelectTab, 92 | ); 93 | } 94 | 95 | void _onLayoutSelected(LayoutType selection) { 96 | setState(() { 97 | _layoutSelection = selection; 98 | }); 99 | } 100 | 101 | void _onSelectTab(int index) { 102 | switch (index) { 103 | case 0: 104 | _onLayoutSelected(LayoutType.job); 105 | break; 106 | case 1: 107 | _onLayoutSelected(LayoutType.company); 108 | break; 109 | case 2: 110 | _onLayoutSelected(LayoutType.chat); 111 | break; 112 | case 3: 113 | _onLayoutSelected(LayoutType.mine); 114 | break; 115 | } 116 | } 117 | 118 | Widget _buildBody() { 119 | LayoutType layoutSelection = _layoutSelection; 120 | switch (layoutSelection) { 121 | case LayoutType.job: 122 | return JobPage(); 123 | case LayoutType.company: 124 | return CompanyPage(); 125 | case LayoutType.chat: 126 | return ChatPage(); 127 | case LayoutType.mine: 128 | return MinePage(); 129 | } 130 | } 131 | 132 | @override 133 | Widget build(BuildContext context) { 134 | return new Scaffold( 135 | body: _buildBody(), 136 | bottomNavigationBar: _buildButtonNavBar(), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/model/company.dart: -------------------------------------------------------------------------------- 1 | class Company { 2 | final String id; 3 | final String company; 4 | final String logo; 5 | final String info; 6 | final String hot; 7 | 8 | Company({this.id, this.company, this.logo, this.info, this.hot}); 9 | 10 | factory Company.fromJson(Map json) { 11 | return Company( 12 | id: json['id'], 13 | company: json['company'], 14 | logo: json['logo'], 15 | info: json['info'], 16 | hot: json['hot']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/model/company_detail.dart: -------------------------------------------------------------------------------- 1 | class CompanyDetail { 2 | final String id; 3 | final String inc; 4 | final List companyImgsResult; 5 | 6 | CompanyDetail({this.id, this.inc, this.companyImgsResult}); 7 | 8 | factory CompanyDetail.fromJson(Map json) { 9 | return CompanyDetail( 10 | id: json['id'], 11 | inc: json['inc'], 12 | companyImgsResult: json['companyImgsResult'] as List); 13 | } 14 | } -------------------------------------------------------------------------------- /lib/model/job.dart: -------------------------------------------------------------------------------- 1 | class Job { 2 | final String id; 3 | final String title; 4 | final String salary; 5 | final String company; 6 | final String info; 7 | final String category; 8 | final String head; 9 | final String publish; 10 | 11 | Job( 12 | {this.id, 13 | this.title, 14 | this.salary, 15 | this.company, 16 | this.info, 17 | this.category, 18 | this.head, 19 | this.publish}); 20 | 21 | factory Job.fromJson(Map json) { 22 | return Job( 23 | title: json['title'], 24 | salary: json['salary'], 25 | company: json['company'], 26 | info: json['info'], 27 | category: json['category'], 28 | head: json['head'], 29 | publish: json['publish'], 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/routers/hero_dialog_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HeroDialogRoute extends PageRoute { 4 | HeroDialogRoute({this.builder}) : super(); 5 | 6 | final WidgetBuilder builder; 7 | 8 | @override 9 | bool get opaque => false; 10 | 11 | @override 12 | bool get barrierDismissible => true; 13 | 14 | @override 15 | Duration get transitionDuration => const Duration(milliseconds: 500); 16 | 17 | @override 18 | bool get maintainState => true; 19 | 20 | @override 21 | Color get barrierColor => Colors.black54; 22 | 23 | @override 24 | Widget buildTransitions(BuildContext context, Animation animation, 25 | Animation secondaryAnimation, Widget child) { 26 | return new FadeTransition( 27 | opacity: new CurvedAnimation(parent: animation, curve: Curves.easeOut), 28 | child: child); 29 | } 30 | 31 | @override 32 | Widget buildPage(BuildContext context, Animation animation, 33 | Animation secondaryAnimation) { 34 | return builder(context); 35 | } 36 | 37 | // TODO: implement barrierLabel 38 | @override 39 | String get barrierLabel => null; 40 | } 41 | -------------------------------------------------------------------------------- /lib/splash.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_boss/main.dart'; 5 | 6 | class SplashPage extends StatefulWidget { 7 | @override 8 | SplashState createState() => new SplashState(); 9 | } 10 | 11 | class SplashState extends State { 12 | Timer _t; 13 | 14 | @override 15 | void initState() { 16 | super.initState(); 17 | _t = new Timer(const Duration(milliseconds: 1500), () { 18 | try { 19 | Navigator.of(context).pushAndRemoveUntil( 20 | PageRouteBuilder( 21 | pageBuilder: (BuildContext context, Animation animation, 22 | Animation secondaryAnimation) { 23 | return AnimatedBuilder( 24 | animation: animation, 25 | builder: (BuildContext context, Widget child) { 26 | return Opacity( 27 | opacity: animation.value, 28 | child: new MainPage(title: 'Boss直聘'), 29 | ); 30 | }, 31 | ); 32 | }, 33 | transitionDuration: Duration(milliseconds: 300), 34 | ), 35 | (Route route) => route == null); 36 | } catch (e) {} 37 | }); 38 | } 39 | 40 | @override 41 | void dispose() { 42 | _t.cancel(); 43 | super.dispose(); 44 | } 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return new Material( 49 | color: new Color.fromARGB(255, 0, 215, 198), 50 | child: Container( 51 | alignment: Alignment(0, -0.3), 52 | child: new Text( 53 | "BOSS直聘", 54 | style: new TextStyle( 55 | color: Colors.white, fontSize: 50.0, fontWeight: FontWeight.bold), 56 | ), 57 | ), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/widgets/chat_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ChatPage extends StatefulWidget { 4 | @override 5 | _ChatPageState createState() => _ChatPageState(); 6 | } 7 | 8 | class _ChatPageState extends State 9 | with AutomaticKeepAliveClientMixin { 10 | @override 11 | bool get wantKeepAlive => true; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return new Scaffold( 16 | appBar: new AppBar( 17 | elevation: 0.0, 18 | centerTitle: true, 19 | title: new Text('聊 天', 20 | style: new TextStyle(fontSize: 20.0, color: Colors.white)), 21 | ), 22 | body: new Center( 23 | child: new Column( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | new Text( 27 | '暂无消息', 28 | style: TextStyle(color: Colors.grey, fontSize: 26.0), 29 | ), 30 | ], 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/widgets/company/company_detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_boss/common/config/config.dart'; 4 | import 'package:flutter_boss/common/widget/scroll_img_item.dart'; 5 | import 'package:flutter_boss/model/company.dart'; 6 | import 'package:flutter_boss/model/company_detail.dart'; 7 | import 'package:flutter_boss/widgets/company/welfare_item.dart'; 8 | import 'package:flutter_boss/widgets/gallery_page.dart'; 9 | import 'package:http/http.dart' as http; 10 | 11 | class CompanyDetailPage extends StatefulWidget { 12 | final Company company; 13 | final String heroLogo; 14 | 15 | CompanyDetailPage({Key key, @required this.company, @required this.heroLogo}) 16 | : super(key: key); 17 | 18 | @override 19 | _CompanyDetailPageState createState() => _CompanyDetailPageState(); 20 | } 21 | 22 | class _CompanyDetailPageState extends State 23 | with SingleTickerProviderStateMixin { 24 | ScrollController _scrollController; 25 | bool _isShow = false; 26 | 27 | // Animation animation; 28 | // AnimationController _animationController; 29 | // bool _isExpanded = false; 30 | // double _begin = -700.0; 31 | // double _end = -100.0; 32 | 33 | Future _fetchCompany() async { 34 | final response = await http 35 | .get('${Config.BASE_URL}/companyDetail/5c3b757fffd9a60984d706c6'); 36 | if (response.statusCode == 200) { 37 | CompanyDetail companyDetail = CompanyDetail.fromJson( 38 | json.decode(response.body)['data']['companyDetail']); 39 | return companyDetail; 40 | } 41 | } 42 | 43 | _scrollListener() { 44 | setState(() { 45 | if (_scrollController.offset < 56 && _isShow) { 46 | _isShow = false; 47 | } else if (_scrollController.offset >= 56 && _isShow == false) { 48 | _isShow = true; 49 | } 50 | }); 51 | } 52 | 53 | // _onBotttomBarTap() { 54 | // if (!_isExpanded) { 55 | // _animationController.forward(); 56 | // } else { 57 | // _animationController.reverse(); 58 | // } 59 | // } 60 | 61 | @override 62 | void initState() { 63 | _scrollController = ScrollController(); 64 | _scrollController.addListener(_scrollListener); 65 | super.initState(); 66 | // _animationController = AnimationController( 67 | // duration: const Duration(milliseconds: 300), vsync: this); 68 | // animation = Tween(begin: _begin, end: _end).animate(_animationController) 69 | // ..addListener(() { 70 | // setState(() {}); 71 | // }) 72 | // ..addStatusListener((status) { 73 | // if (status == AnimationStatus.completed) { 74 | // setState(() { 75 | // _isExpanded = true; 76 | // }); 77 | // } else if (status == AnimationStatus.dismissed) { 78 | // setState(() { 79 | // _isExpanded = false; 80 | // }); 81 | // } 82 | // }); 83 | } 84 | 85 | @override 86 | void dispose() { 87 | // _animationController.dispose(); 88 | _scrollController.removeListener(_scrollListener); 89 | _scrollController.dispose(); 90 | super.dispose(); 91 | } 92 | 93 | @override 94 | Widget build(BuildContext context) { 95 | return new Center( 96 | child: Scaffold( 97 | backgroundColor: new Color.fromARGB(255, 68, 76, 96), 98 | body: Container( 99 | decoration: BoxDecoration( 100 | image: DecorationImage( 101 | colorFilter: new ColorFilter.mode( 102 | Colors.black.withOpacity(0.1), BlendMode.dstATop), 103 | fit: BoxFit.cover, 104 | image: new NetworkImage(widget.company.logo), 105 | alignment: Alignment.center), 106 | ), 107 | child: _companyDetailView(context), 108 | ), 109 | )); 110 | } 111 | 112 | // 公司详情页面 113 | Widget _companyDetailView(BuildContext context) { 114 | return Stack( 115 | alignment: Alignment.bottomCenter, 116 | children: [ 117 | CustomScrollView( 118 | controller: _scrollController, 119 | slivers: [ 120 | new SliverAppBar( 121 | elevation: 0.0, 122 | pinned: true, 123 | backgroundColor: 124 | new Color.fromARGB(_isShow == true ? 255 : 0, 68, 76, 96), 125 | centerTitle: false, 126 | title: new Text( 127 | widget.company.company, 128 | style: new TextStyle( 129 | fontSize: 20.0, 130 | color: new Color.fromARGB( 131 | _isShow == true ? 255 : 0, 255, 255, 255), 132 | ), 133 | ), 134 | actions: [ 135 | new IconButton( 136 | icon: new Icon( 137 | Icons.search, 138 | color: Colors.white, 139 | ), 140 | onPressed: () {}, 141 | ) 142 | ], 143 | ), 144 | SliverList( 145 | delegate: new SliverChildListDelegate([ 146 | new Row( 147 | children: [ 148 | new Expanded( 149 | flex: 3, 150 | child: new Column( 151 | crossAxisAlignment: CrossAxisAlignment.start, 152 | children: [ 153 | new Padding( 154 | padding: const EdgeInsets.only( 155 | top: 20.0, 156 | left: 25.0, 157 | bottom: 10.0, 158 | ), 159 | child: new Text( 160 | '${widget.company.company}', 161 | style: new TextStyle( 162 | color: Colors.white, 163 | fontWeight: FontWeight.bold, 164 | fontSize: 25.0), 165 | ), 166 | ), 167 | new Padding( 168 | padding: const EdgeInsets.only( 169 | left: 25.0, 170 | ), 171 | child: new Text( 172 | '${widget.company.info}', 173 | style: new TextStyle( 174 | color: Colors.white, fontSize: 15.0), 175 | ), 176 | ), 177 | ], 178 | ), 179 | ), 180 | new Expanded( 181 | flex: 1, 182 | child: new Padding( 183 | padding: const EdgeInsets.only( 184 | top: 25.0, 185 | right: 30.0, 186 | ), 187 | child: Hero( 188 | tag: widget.heroLogo, 189 | child: ClipRRect( 190 | borderRadius: new BorderRadius.circular(8.0), 191 | child: Image.network( 192 | widget.company.logo, 193 | width: 70, 194 | height: 70, 195 | ), 196 | ), 197 | )), 198 | ), 199 | ], 200 | ), 201 | FutureBuilder( 202 | future: _fetchCompany(), 203 | builder: (context, snapshot) { 204 | if (snapshot.hasData) { 205 | return _companyBody(context, snapshot); 206 | } else if (snapshot.hasError) { 207 | return Text("${snapshot.error}"); 208 | } 209 | return Center(child: CircularProgressIndicator()); 210 | }, 211 | ), 212 | ])), 213 | ], 214 | ), 215 | // Positioned( 216 | // bottom: animation.value, 217 | // child: GestureDetector( 218 | // onTap: _onBotttomBarTap, 219 | // child: Container( 220 | // height: MediaQuery.of(context).size.height - 100, 221 | // width: MediaQuery.of(context).size.width, 222 | // alignment: Alignment.centerLeft, 223 | // padding: EdgeInsets.all(12.0), 224 | // margin: EdgeInsets.symmetric(horizontal: 6.0), 225 | // decoration: BoxDecoration( 226 | // borderRadius: BorderRadius.only( 227 | // topLeft: Radius.circular(24.0), 228 | // topRight: Radius.circular(24.0)), 229 | // color: Colors.white, 230 | // ), 231 | // child: Column( 232 | // mainAxisSize: MainAxisSize.max, 233 | // children: [], 234 | // ), 235 | // )), 236 | // ) // new AnimatedContainer(animation: animation) 237 | ], 238 | ); 239 | } 240 | 241 | // 主体 242 | Widget _companyBody(BuildContext context, AsyncSnapshot snapshot) { 243 | return Column( 244 | crossAxisAlignment: CrossAxisAlignment.start, 245 | children: [ 246 | Padding( 247 | padding: EdgeInsets.only(top: 30.0, left: 25.0, right: 20.0), 248 | child: _createWorkHours()), 249 | _createWelfareItem(), 250 | Padding( 251 | padding: EdgeInsets.only(left: 25.0, bottom: 20.0), 252 | child: Text( 253 | "公司介绍", 254 | style: new TextStyle(color: Colors.white, fontSize: 20.0), 255 | ), 256 | ), 257 | Padding( 258 | padding: EdgeInsets.only(left: 25.0, bottom: 10.0, right: 25.0), 259 | child: Text( 260 | snapshot.data.inc, 261 | textAlign: TextAlign.justify, 262 | style: new TextStyle(color: Colors.white, fontSize: 16.0), 263 | ), 264 | ), 265 | Padding( 266 | padding: EdgeInsets.only(top: 20.0, left: 25.0, bottom: 10.0), 267 | child: Text( 268 | "公司照片", 269 | style: new TextStyle(color: Colors.white, fontSize: 20.0), 270 | ), 271 | ), 272 | Container( 273 | margin: 274 | EdgeInsets.only(left: 20.0, top: 20.0, right: 0.0, bottom: 50.0), 275 | height: 120.0, 276 | child: _createImgList(context, snapshot), 277 | ) 278 | ], 279 | ); 280 | } 281 | 282 | // 上班时间 283 | Widget _createWorkHours() { 284 | return Wrap( 285 | spacing: 40.0, 286 | runSpacing: 16.0, 287 | direction: Axis.horizontal, 288 | children: [ 289 | Row( 290 | mainAxisSize: MainAxisSize.min, 291 | children: [ 292 | Icon( 293 | Icons.access_alarm, 294 | color: Colors.white, 295 | size: 18.0, 296 | ), 297 | Padding( 298 | padding: EdgeInsets.only(right: 6.0), 299 | ), 300 | Text( 301 | '下午1:00-下午10:00', 302 | style: new TextStyle(color: Colors.white, fontSize: 16.0), 303 | ), 304 | ], 305 | ), 306 | Row( 307 | mainAxisSize: MainAxisSize.min, 308 | children: [ 309 | Icon( 310 | Icons.account_balance_wallet, 311 | color: Colors.white, 312 | size: 18.0, 313 | ), 314 | Padding( 315 | padding: EdgeInsets.only(right: 6.0), 316 | ), 317 | Text( 318 | '大小周', 319 | style: new TextStyle(color: Colors.white, fontSize: 16.0), 320 | ), 321 | ], 322 | ), 323 | Row( 324 | mainAxisSize: MainAxisSize.min, 325 | children: [ 326 | Icon( 327 | Icons.movie, 328 | color: Colors.white, 329 | size: 18.0, 330 | ), 331 | Padding( 332 | padding: EdgeInsets.only(right: 6.0), 333 | ), 334 | Text( 335 | '偶尔加班', 336 | style: new TextStyle(color: Colors.white, fontSize: 16.0), 337 | ), 338 | ], 339 | ), 340 | ], 341 | ); 342 | } 343 | 344 | // 公司福利 345 | Widget _createWelfareItem() { 346 | return Padding( 347 | padding: const EdgeInsets.only( 348 | top: 30.0, 349 | bottom: 10.0, 350 | ), 351 | child: Container( 352 | margin: EdgeInsets.only(left: 20.0, top: 0.0, right: 0.0, bottom: 20.0), 353 | height: 120.0, 354 | child: ListView( 355 | scrollDirection: Axis.horizontal, 356 | children: [ 357 | WelfareItem(iconData: Icons.flip, title: "五险一金"), 358 | WelfareItem(iconData: Icons.security, title: "补充医疗\n保险"), 359 | WelfareItem(iconData: Icons.access_alarm, title: "定期体检"), 360 | WelfareItem(iconData: Icons.face, title: "年终奖"), 361 | WelfareItem(iconData: Icons.brightness_5, title: "带薪年假"), 362 | ], 363 | ), 364 | ), 365 | ); 366 | } 367 | 368 | // 公司照片 369 | Widget _createImgList(BuildContext context, AsyncSnapshot snapshot) { 370 | List imgList = snapshot.data.companyImgsResult; 371 | return ListView.builder( 372 | key: new PageStorageKey('img-list'), 373 | scrollDirection: Axis.horizontal, 374 | itemCount: imgList.length, 375 | itemBuilder: (BuildContext context, int index) { 376 | return ScrollImageItem( 377 | onPressed: () { 378 | Navigator.of(context).push( 379 | PageRouteBuilder( 380 | pageBuilder: (BuildContext context, Animation animation, 381 | Animation secondaryAnimation) { 382 | return AnimatedBuilder( 383 | animation: animation, 384 | builder: (BuildContext context, Widget child) { 385 | return Opacity( 386 | opacity: animation.value, 387 | child: GalleryPage( 388 | url: imgList[index], heroTag: 'heroTag${index}'), 389 | ); 390 | }, 391 | ); 392 | }, 393 | transitionDuration: Duration(milliseconds: 300), 394 | ), 395 | ); 396 | }, 397 | url: imgList[index], 398 | heroTag: 'heroTag${index}', 399 | ); 400 | }, 401 | ); 402 | } 403 | } 404 | -------------------------------------------------------------------------------- /lib/widgets/company/company_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_boss/model/company.dart'; 3 | 4 | class CompanyItem extends StatelessWidget { 5 | final Company company; 6 | final String heroLogo; 7 | 8 | CompanyItem({Key key, this.company, this.onPressed, @required this.heroLogo}) 9 | : super(key: key); 10 | VoidCallback onPressed; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return new GestureDetector( 15 | onTap: onPressed, 16 | child: new Container( 17 | margin: const EdgeInsets.only(bottom: 10.0), 18 | padding: const EdgeInsets.only( 19 | left: 18.0, top: 10.0, right: 18.0, bottom: 10.0), 20 | color: Colors.white, 21 | child: new Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | mainAxisSize: MainAxisSize.min, 24 | children: [ 25 | new Row( 26 | children: [ 27 | Padding( 28 | padding: EdgeInsets.only(right: 20.0), 29 | child: Hero( 30 | tag: heroLogo, 31 | child: Image.network( 32 | company.logo, 33 | width: 40, 34 | ), 35 | ), 36 | ), 37 | new Column( 38 | crossAxisAlignment: CrossAxisAlignment.start, 39 | children: [ 40 | Padding( 41 | padding: EdgeInsets.only(bottom: 6.0), 42 | child: Text( 43 | company.company, 44 | style: new TextStyle(color: Colors.black, fontSize: 16), 45 | ), 46 | ), 47 | Text( 48 | company.info, 49 | style: new TextStyle(color: Colors.grey, fontSize: 12), 50 | ), 51 | ], 52 | ), 53 | ], 54 | ), 55 | new Container( 56 | decoration: new BoxDecoration( 57 | color: new Color(0xFFF6F6F8), 58 | borderRadius: new BorderRadius.all(new Radius.circular(6.0))), 59 | padding: const EdgeInsets.only( 60 | top: 3.0, bottom: 3.0, left: 8.0, right: 8.0), 61 | margin: const EdgeInsets.only(top: 12.0), 62 | child: Text( 63 | company.hot, 64 | style: new TextStyle(color: new Color(0xFF9fa3b0)), 65 | ), 66 | ), 67 | ], 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/widgets/company/welfare_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WelfareItem extends StatelessWidget { 4 | WelfareItem({Key key, this.iconData, this.title}) : super(key: key); 5 | 6 | final IconData iconData; 7 | final String title; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | width: 100.0, 13 | height: 120.0, 14 | alignment: Alignment.centerLeft, 15 | padding: EdgeInsets.all(12.0), 16 | margin: EdgeInsets.symmetric(horizontal: 6.0), 17 | decoration: BoxDecoration( 18 | borderRadius: BorderRadius.all(Radius.circular(6.0)), 19 | border: Border.all( 20 | color: Colors.white, 21 | width: 0.25, 22 | ), 23 | ), 24 | child: Column( 25 | crossAxisAlignment: CrossAxisAlignment.start, 26 | children: [ 27 | Icon( 28 | iconData, 29 | color: Colors.white, 30 | size: 32.0, 31 | ), 32 | Padding( 33 | padding: EdgeInsets.only(top: 8.0), 34 | ), 35 | Text( 36 | title, 37 | style: new TextStyle(color: Colors.white, fontSize: 18.0), 38 | ), 39 | ], 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/widgets/company_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_boss/common/config/config.dart'; 4 | import 'package:flutter_boss/model/company.dart'; 5 | import 'package:flutter_boss/widgets/company/company_detail_page.dart'; 6 | import 'package:flutter_boss/widgets/company/company_item.dart'; 7 | import 'package:http/http.dart' as http; 8 | 9 | class CompanyPage extends StatefulWidget { 10 | @override 11 | _CompanyPageState createState() => _CompanyPageState(); 12 | } 13 | 14 | class _CompanyPageState extends State 15 | with AutomaticKeepAliveClientMixin { 16 | List companyList = List(); 17 | 18 | Future> _fetchCompanyList() async { 19 | final response = await http.get('${Config.BASE_URL}/company/list/1'); 20 | 21 | List companyList = List(); 22 | 23 | if (response.statusCode == 200) { 24 | Map result = json.decode(response.body); 25 | for (dynamic data in result['data']['companies']) { 26 | Company companyData = Company.fromJson(data); 27 | companyList.add(companyData); 28 | } 29 | } 30 | return companyList; 31 | } 32 | 33 | @override 34 | bool get wantKeepAlive => true; 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return new Scaffold( 39 | appBar: new AppBar( 40 | elevation: 0.0, 41 | centerTitle: true, 42 | title: new Text('公 司', 43 | style: new TextStyle(fontSize: 20.0, color: Colors.white)), 44 | actions: [ 45 | new IconButton( 46 | icon: new Icon( 47 | Icons.search, 48 | color: Colors.white, 49 | ), 50 | onPressed: () {}, 51 | ) 52 | ], 53 | ), 54 | body: new Center( 55 | child: FutureBuilder( 56 | future: _fetchCompanyList(), 57 | builder: (context, AsyncSnapshot snapshot) { 58 | switch (snapshot.connectionState) { 59 | case ConnectionState.none: 60 | case ConnectionState.waiting: 61 | return new CircularProgressIndicator(); 62 | default: 63 | if (snapshot.hasError) 64 | return new Text('Error: ${snapshot.error}'); 65 | else 66 | return _createListView(context, snapshot); 67 | } 68 | }, 69 | ), 70 | ), 71 | ); 72 | } 73 | 74 | Widget _createListView(BuildContext context, AsyncSnapshot snapshot) { 75 | List companyList = snapshot.data; 76 | return ListView.builder( 77 | key: new PageStorageKey('company-list'), 78 | itemCount: companyList.length, 79 | itemBuilder: (BuildContext context, int index) { 80 | return CompanyItem( 81 | onPressed: () { 82 | Navigator.push( 83 | context, 84 | MaterialPageRoute( 85 | // fullscreenDialog: true, 86 | builder: (context) => CompanyDetailPage( 87 | company: companyList[index], heroLogo: "heroLogo${index}"), 88 | ), 89 | ); 90 | }, 91 | company: companyList[index], 92 | heroLogo: "heroLogo${index}", 93 | ); 94 | }, 95 | ); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /lib/widgets/gallery_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GalleryPage extends StatelessWidget { 4 | final String url; 5 | final String heroTag; 6 | 7 | GalleryPage( 8 | {Key key, 9 | @required this.url, 10 | @required this.heroTag}) 11 | : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: Color.fromARGB(100, 0, 0, 0), 17 | appBar: new AppBar( 18 | backgroundColor: Color.fromARGB(100, 0, 0, 0), 19 | ), 20 | body: Padding( 21 | padding: EdgeInsets.all(30.0), 22 | child: Stack( 23 | children: [ 24 | Align( 25 | alignment: Alignment(0, -0.2), 26 | child: Hero( 27 | tag: heroTag, 28 | child: Container( 29 | width: MediaQuery.of(context).size.width, 30 | child: Image.network(url, width: 300, fit: BoxFit.cover), 31 | ), 32 | ), 33 | ), 34 | ], 35 | ), 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/widgets/job/job_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_boss/model/job.dart'; 3 | 4 | class JobItem extends StatelessWidget { 5 | final Job job; 6 | 7 | JobItem({Key key, this.job, this.onPressed}) : super(key: key); 8 | VoidCallback onPressed; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return new GestureDetector( 13 | onTap: onPressed, 14 | child: new Container( 15 | margin: const EdgeInsets.only(bottom: 10.0), 16 | padding: const EdgeInsets.only( 17 | left: 18.0, top: 10.0, right: 18.0, bottom: 10.0), 18 | color: Colors.white, 19 | child: new Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | mainAxisSize: MainAxisSize.min, 22 | children: [ 23 | new Row( 24 | children: [ 25 | new Expanded( 26 | child: Text( 27 | job.title, 28 | style: new TextStyle(color: Colors.black, fontSize: 16), 29 | )), 30 | Text( 31 | job.salary, 32 | style: 33 | new TextStyle(color: new Color(0xFF54cbc4), fontSize: 18), 34 | ), 35 | ], 36 | ), 37 | new Padding( 38 | padding: EdgeInsets.only(top: 8.0), 39 | child: Text(job.company), 40 | ), 41 | new Container( 42 | decoration: new BoxDecoration( 43 | color: new Color(0xFFF6F6F8), 44 | borderRadius: new BorderRadius.all(new Radius.circular(6.0))), 45 | padding: const EdgeInsets.only( 46 | top: 3.0, bottom: 3.0, left: 8.0, right: 8.0), 47 | margin: const EdgeInsets.only(top: 12.0, bottom: 8.0), 48 | child: Text( 49 | job.info, 50 | style: new TextStyle(color: new Color(0xFF9fa3b0)), 51 | ), 52 | ), 53 | new Row( 54 | children: [ 55 | CircleAvatar( 56 | backgroundImage: NetworkImage(job.head), 57 | radius: 15, 58 | ), 59 | new Padding( 60 | padding: EdgeInsets.only(left: 8.0), 61 | child: Text(job.publish), 62 | ), 63 | ], 64 | ) 65 | ], 66 | ), 67 | ), 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/widgets/job_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_boss/common/config/config.dart'; 4 | import 'package:flutter_boss/model/job.dart'; 5 | import 'package:flutter_boss/widgets/job/job_item.dart'; 6 | import 'package:http/http.dart' as http; 7 | 8 | class JobPage extends StatefulWidget { 9 | @override 10 | _JobPageState createState() => _JobPageState(); 11 | } 12 | 13 | class _JobPageState extends State with AutomaticKeepAliveClientMixin { 14 | List jobList = List(); 15 | 16 | Future> _fetchJobList() async { 17 | final response = await http.get('${Config.BASE_URL}/jobs/list/1'); 18 | 19 | List jobList = List(); 20 | 21 | if (response.statusCode == 200) { 22 | Map result = json.decode(response.body); 23 | for (dynamic data in result['data']['jobs']) { 24 | Job jobData = Job.fromJson(data); 25 | jobList.add(jobData); 26 | } 27 | } 28 | return jobList; 29 | } 30 | 31 | @override 32 | bool get wantKeepAlive => true; 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return new Scaffold( 37 | appBar: new AppBar( 38 | elevation: 0.0, 39 | centerTitle: true, 40 | title: new Text('职 位', 41 | style: new TextStyle(fontSize: 20.0, color: Colors.white)), 42 | ), 43 | body: new Center( 44 | child: FutureBuilder( 45 | future: _fetchJobList(), 46 | builder: (context, AsyncSnapshot snapshot) { 47 | switch (snapshot.connectionState) { 48 | case ConnectionState.none: 49 | case ConnectionState.waiting: 50 | return CircularProgressIndicator(); 51 | default: 52 | if (snapshot.hasError) 53 | return new Text('Error: ${snapshot.error}'); 54 | else 55 | return _createListView(context, snapshot); 56 | } 57 | }, 58 | ), 59 | ), 60 | ); 61 | } 62 | 63 | Widget _createListView(BuildContext context, AsyncSnapshot snapshot) { 64 | List jobList = snapshot.data; 65 | return ListView.builder( 66 | key: new PageStorageKey('job-list'), 67 | itemCount: jobList.length, 68 | itemBuilder: (BuildContext context, int index) { 69 | return new JobItem(onPressed: () {}, job: jobList[index]); 70 | }, 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/widgets/mine/contact_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ContactItem extends StatelessWidget { 4 | ContactItem({Key key, this.count, this.title, this.onPressed}) 5 | : super(key: key); 6 | 7 | final String count; 8 | final String title; 9 | final VoidCallback onPressed; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return new GestureDetector( 14 | onTap: onPressed, 15 | child: new Column( 16 | children: [ 17 | new Padding( 18 | padding: const EdgeInsets.only( 19 | bottom: 4.0, 20 | ), 21 | child: new Text(count, style: new TextStyle(fontSize: 18.0)), 22 | ), 23 | new Text(title, 24 | style: new TextStyle(color: Colors.black54, fontSize: 14.0)), 25 | ], 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/widgets/mine/menu_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MenuItem extends StatelessWidget { 4 | MenuItem({Key key, this.icon, this.title, this.onPressed}) : super(key: key); 5 | 6 | final IconData icon; 7 | final String title; 8 | final VoidCallback onPressed; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return new GestureDetector( 13 | onTap: onPressed, 14 | child: new Column( 15 | children: [ 16 | new Padding( 17 | padding: const EdgeInsets.only( 18 | left: 20.0, 19 | top: 12.0, 20 | right: 20.0, 21 | bottom: 10.0, 22 | ), 23 | child: new Row( 24 | children: [ 25 | new Padding( 26 | padding: const EdgeInsets.only( 27 | right: 8.0, 28 | ), 29 | child: new Icon( 30 | icon, 31 | color: Colors.black54, 32 | ), 33 | ), 34 | new Expanded( 35 | child: new Text( 36 | title, 37 | style: new TextStyle(color: Colors.black54, fontSize: 16.0), 38 | ), 39 | ), 40 | new Icon( 41 | Icons.chevron_right, 42 | color: Colors.grey, 43 | ) 44 | ], 45 | ), 46 | ), 47 | new Padding( 48 | padding: const EdgeInsets.only(left: 20.0, right: 20.0), 49 | child: new Divider(), 50 | ) 51 | ], 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/widgets/mine_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_boss/widgets/mine/contact_item.dart'; 3 | import 'package:flutter_boss/widgets/mine/menu_item.dart'; 4 | 5 | class MinePage extends StatefulWidget { 6 | @override 7 | _MinePageState createState() => _MinePageState(); 8 | } 9 | 10 | class _MinePageState extends State 11 | with AutomaticKeepAliveClientMixin { 12 | final double _appBarHeight = 180.0; 13 | final String _userHead = 14 | 'https://img.bosszhipin.com/beijin/mcs/useravatar/20171211/4d147d8bb3e2a3478e20b50ad614f4d02062e3aec7ce2519b427d24a3f300d68_s.jpg'; 15 | 16 | @override 17 | bool get wantKeepAlive => true; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return new Scaffold( 22 | backgroundColor: new Color.fromARGB(255, 242, 242, 245), 23 | body: new CustomScrollView( 24 | slivers: [ 25 | new SliverAppBar( 26 | expandedHeight: _appBarHeight, 27 | flexibleSpace: new FlexibleSpaceBar( 28 | collapseMode: CollapseMode.parallax, 29 | background: new Stack( 30 | fit: StackFit.expand, 31 | children: [ 32 | const DecoratedBox( 33 | decoration: const BoxDecoration( 34 | gradient: const LinearGradient( 35 | begin: const Alignment(0.0, -1.0), 36 | end: const Alignment(0.0, -0.4), 37 | colors: const [ 38 | const Color(0x00000000), 39 | const Color(0x00000000) 40 | ], 41 | ), 42 | ), 43 | ), 44 | new Row( 45 | mainAxisAlignment: MainAxisAlignment.start, 46 | children: [ 47 | new Expanded( 48 | flex: 3, 49 | child: new Column( 50 | mainAxisAlignment: MainAxisAlignment.center, 51 | crossAxisAlignment: CrossAxisAlignment.start, 52 | children: [ 53 | new Padding( 54 | padding: const EdgeInsets.only( 55 | top: 30.0, 56 | left: 30.0, 57 | bottom: 15.0, 58 | ), 59 | child: new Text( 60 | 'kimi he', 61 | style: new TextStyle( 62 | color: Colors.white, 63 | fontWeight: FontWeight.bold, 64 | fontSize: 35.0), 65 | ), 66 | ), 67 | new Padding( 68 | padding: const EdgeInsets.only( 69 | left: 30.0, 70 | ), 71 | child: new Text( 72 | '在职-不考虑机会', 73 | style: new TextStyle( 74 | color: Colors.white, fontSize: 15.0), 75 | ), 76 | ), 77 | ], 78 | ), 79 | ), 80 | new Expanded( 81 | flex: 1, 82 | child: new Padding( 83 | padding: const EdgeInsets.only( 84 | top: 40.0, 85 | right: 30.0, 86 | ), 87 | child: new CircleAvatar( 88 | radius: 35.0, 89 | backgroundImage: new NetworkImage(_userHead), 90 | ), 91 | ), 92 | ) 93 | ], 94 | ), 95 | ], 96 | ), 97 | ), 98 | ), 99 | new SliverList( 100 | delegate: new SliverChildListDelegate( 101 | [ 102 | new Container( 103 | color: Colors.white, 104 | child: new Padding( 105 | padding: const EdgeInsets.only( 106 | top: 10.0, 107 | bottom: 10.0, 108 | ), 109 | child: new Row( 110 | mainAxisAlignment: MainAxisAlignment.spaceAround, 111 | children: [ 112 | new ContactItem( 113 | count: '696', 114 | title: '沟通过', 115 | ), 116 | new ContactItem( 117 | count: '0', 118 | title: '面试', 119 | ), 120 | new ContactItem( 121 | count: '71', 122 | title: '已投递', 123 | ), 124 | new ContactItem( 125 | count: '53', 126 | title: '感兴趣', 127 | ), 128 | ], 129 | ), 130 | ), 131 | ), 132 | new Container( 133 | color: Colors.white, 134 | margin: const EdgeInsets.only(top: 10.0), 135 | child: Column( 136 | children: [ 137 | new MenuItem( 138 | icon: Icons.face, 139 | title: '体验新版本', 140 | ), 141 | new MenuItem( 142 | icon: Icons.print, 143 | title: '我的微简历', 144 | ), 145 | new MenuItem( 146 | icon: Icons.archive, 147 | title: '附件简历', 148 | ), 149 | new MenuItem( 150 | icon: Icons.home, 151 | title: '管理求职意向', 152 | ), 153 | new MenuItem( 154 | icon: Icons.title, 155 | title: '提升简历排名', 156 | ), 157 | new MenuItem( 158 | icon: Icons.chat, 159 | title: '牛人问答', 160 | ), 161 | new MenuItem( 162 | icon: Icons.assessment, 163 | title: '关注公司', 164 | ), 165 | new MenuItem( 166 | icon: Icons.add_shopping_cart, 167 | title: '钱包', 168 | ), 169 | new MenuItem( 170 | icon: Icons.security, 171 | title: '隐私设置', 172 | ), 173 | ], 174 | ), 175 | ), 176 | ], 177 | ), 178 | ) 179 | ], 180 | ), 181 | ); 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_boss 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | 19 | # The following adds the Cupertino Icons font to your application. 20 | # Use with the CupertinoIcons class for iOS style icons. 21 | cupertino_icons: ^0.1.2 22 | shared_preferences: ^0.4.2 23 | fluttertoast: 2.0.9 24 | event_bus: ^1.0.1 25 | flutter_html_view: ^0.5.10 26 | scoped_model: ^0.3.0 27 | http: ^0.12.0 28 | flutter_redux: ^0.5.2 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | 34 | 35 | # For information on the generic Dart part of this file, see the 36 | # following page: https://www.dartlang.org/tools/pub/pubspec 37 | 38 | # The following section is specific to Flutter. 39 | flutter: 40 | 41 | # The following line ensures that the Material Icons font is 42 | # included with your application, so that you can use the icons in 43 | # the material Icons class. 44 | uses-material-design: true 45 | assets: 46 | - images/ 47 | 48 | # To add assets to your application, add an assets section, like this: 49 | # assets: 50 | # - images/a_dot_burr.jpeg 51 | # - images/a_dot_ham.jpeg 52 | 53 | # An image asset can refer to one or more resolution-specific "variants", see 54 | # https://flutter.io/assets-and-images/#resolution-aware. 55 | 56 | # For details regarding adding assets from package dependencies, see 57 | # https://flutter.io/assets-and-images/#from-packages 58 | 59 | # To add custom fonts to your application, add a fonts section here, 60 | # in this "flutter" section. Each entry in this list should have a 61 | # "family" key with the font family name, and a "fonts" key with a 62 | # list giving the asset and other descriptors for the font. For 63 | # example: 64 | # fonts: 65 | # - family: Schyler 66 | # fonts: 67 | # - asset: fonts/Schyler-Regular.ttf 68 | # - asset: fonts/Schyler-Italic.ttf 69 | # style: italic 70 | # - family: Trajan Pro 71 | # fonts: 72 | # - asset: fonts/TrajanPro.ttf 73 | # - asset: fonts/TrajanPro_Bold.ttf 74 | # weight: 700 75 | # 76 | # For details regarding fonts from package dependencies, 77 | # see https://flutter.io/custom-fonts/#from-packages 78 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_boss/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(App()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------