├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── cn │ │ │ │ └── net │ │ │ │ └── polyglot │ │ │ │ └── socialvertexflutter │ │ │ │ └── MainActivity.kt │ │ └── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── assets ├── i18n │ ├── en.json │ └── zh_Hans.json └── images │ ├── addfriend.png │ ├── contacts.png │ ├── dark.png │ ├── flutter.png │ ├── group.png │ ├── loginIcon.png │ ├── message.png │ ├── person.png │ ├── picture.png │ ├── search.png │ ├── setting.png │ ├── snop.png │ ├── user.png │ ├── userIcon.png │ ├── user_background.jpeg │ └── voice.png ├── ios ├── .gitignore ├── Flutter │ ├── .last_build_id │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── 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 │ └── Runner-Bridging-Header.h ├── lib ├── config │ ├── constants.dart │ └── ui_variables.dart ├── main.dart ├── register.dart ├── search_interface.dart ├── user_interface.dart └── utils │ └── util.dart ├── pubspec.lock ├── pubspec.yaml └── test ├── utils └── util_test.dart └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | # idea 5 | .idea/ 6 | *.iml 7 | 8 | .packages 9 | .pub/ 10 | 11 | build/ 12 | 13 | .flutter-plugins -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b 8 | channel: beta 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Social Vertex Flutter 2 | 3 | A new Flutter client application for Social Vertex. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "cn.net.polyglot.socialvertexflutter" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/cn/net/polyglot/socialvertexflutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package cn.net.polyglot.socialvertexflutter 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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-5.6.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 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /assets/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "language" : "en", 3 | "login" : "Login", 4 | "username" : "Username", 5 | "password" : "Password", 6 | "register" : "Register", 7 | "login_fail" : "Login failed", 8 | "server_error" : "Server error, please try later", 9 | "user_pw_null" : "Please input username and password", 10 | "nickname" : "Nickname", 11 | "pw_confirm" : "Password confirm", 12 | "msg" : "Message", 13 | "ok" : "OK", 14 | "pw_not_match" : "Those passwords did not match", 15 | "info_incomplete" : "Your infomation is incomplete", 16 | "system_error" : "System Error", 17 | "network_error" : "Network Error", 18 | "search" : "Search", 19 | "update" : "Update", 20 | "quit" : "Quit", 21 | "no_msg" : "No message", 22 | "sent" : "Sent", 23 | "send" : "Send", 24 | "friend_add" : "Please add me as a friend! I'm ", 25 | "friend_add_refuse": " has refused your request", 26 | "accept" : "Accept", 27 | "refuse" : "Refuse", 28 | "friends" : "Friends" 29 | } -------------------------------------------------------------------------------- /assets/i18n/zh_Hans.json: -------------------------------------------------------------------------------- 1 | { 2 | "language" : "zh_Hans", 3 | "login" : "登录", 4 | "username" : "用户名", 5 | "password" : "密码", 6 | "register" : "注册", 7 | "login_fail" : "登录失败", 8 | "server_error" : "系统错误,请稍后再试", 9 | "user_pw_null" : "请输入用户名和密码", 10 | "nickname" : "昵称", 11 | "pw_confirm" : "密码确认", 12 | "msg" : "消息", 13 | "ok" : "确认", 14 | "pw_not_match" : "两次密码输入不一致", 15 | "info_incomplete" : "信息不完整", 16 | "system_error" : "系统异常", 17 | "network_error" : "网络错误", 18 | "search" : "搜索", 19 | "update" : "更新", 20 | "quit" : "退出", 21 | "no_msg" : "无消息", 22 | "sent" : "消息已发送", 23 | "send" : "发送", 24 | "friend_add" : "请添加我为你的好友! 我是", 25 | "friend_add_refuse": "拒绝了您的好友请求", 26 | "accept" : "接受", 27 | "refuse" : "拒绝", 28 | "friends" : "好友" 29 | } -------------------------------------------------------------------------------- /assets/images/addfriend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/addfriend.png -------------------------------------------------------------------------------- /assets/images/contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/contacts.png -------------------------------------------------------------------------------- /assets/images/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/dark.png -------------------------------------------------------------------------------- /assets/images/flutter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/flutter.png -------------------------------------------------------------------------------- /assets/images/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/group.png -------------------------------------------------------------------------------- /assets/images/loginIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/loginIcon.png -------------------------------------------------------------------------------- /assets/images/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/message.png -------------------------------------------------------------------------------- /assets/images/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/person.png -------------------------------------------------------------------------------- /assets/images/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/picture.png -------------------------------------------------------------------------------- /assets/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/search.png -------------------------------------------------------------------------------- /assets/images/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/setting.png -------------------------------------------------------------------------------- /assets/images/snop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/snop.png -------------------------------------------------------------------------------- /assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/user.png -------------------------------------------------------------------------------- /assets/images/userIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/userIcon.png -------------------------------------------------------------------------------- /assets/images/user_background.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/user_background.jpeg -------------------------------------------------------------------------------- /assets/images/voice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/assets/images/voice.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | a3ce9d23eb506be2a995d16f552957cf -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 97C146F11CF9000F007C117D /* Supporting Files */, 94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 98 | ); 99 | path = Runner; 100 | sourceTree = ""; 101 | }; 102 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 97C146ED1CF9000F007C117D /* Runner */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 115 | buildPhases = ( 116 | 9740EEB61CF901F6004384FC /* Run Script */, 117 | 97C146EA1CF9000F007C117D /* Sources */, 118 | 97C146EB1CF9000F007C117D /* Frameworks */, 119 | 97C146EC1CF9000F007C117D /* Resources */, 120 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = Runner; 128 | productName = Runner; 129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 97C146E61CF9000F007C117D /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 1020; 139 | ORGANIZATIONNAME = ""; 140 | TargetAttributes = { 141 | 97C146ED1CF9000F007C117D = { 142 | CreatedOnToolsVersion = 7.3.1; 143 | LastSwiftMigration = 1100; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = 97C146E51CF9000F007C117D; 156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | 97C146ED1CF9000F007C117D /* Runner */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | 97C146EC1CF9000F007C117D /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXShellScriptBuildPhase section */ 180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "Thin Binary"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 193 | }; 194 | 9740EEB61CF901F6004384FC /* Run Script */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Run Script"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 97C146EA1CF9000F007C117D /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C146FB1CF9000F007C117D /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 97C147001CF9000F007C117D /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_ANALYZER_NONNULL = YES; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 252 | CLANG_WARN_BOOL_CONVERSION = YES; 253 | CLANG_WARN_COMMA = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 256 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INFINITE_RECURSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 263 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 266 | CLANG_WARN_STRICT_PROTOTYPES = YES; 267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 273 | ENABLE_NS_ASSERTIONS = NO; 274 | ENABLE_STRICT_OBJC_MSGSEND = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu99; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 279 | GCC_WARN_UNDECLARED_SELECTOR = YES; 280 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 281 | GCC_WARN_UNUSED_FUNCTION = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 284 | MTL_ENABLE_DEBUG_INFO = NO; 285 | SDKROOT = iphoneos; 286 | SUPPORTED_PLATFORMS = iphoneos; 287 | TARGETED_DEVICE_FAMILY = "1,2"; 288 | VALIDATE_PRODUCT = YES; 289 | }; 290 | name = Profile; 291 | }; 292 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 293 | isa = XCBuildConfiguration; 294 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CLANG_ENABLE_MODULES = YES; 298 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 299 | ENABLE_BITCODE = NO; 300 | FRAMEWORK_SEARCH_PATHS = ( 301 | "$(inherited)", 302 | "$(PROJECT_DIR)/Flutter", 303 | ); 304 | INFOPLIST_FILE = Runner/Info.plist; 305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 306 | LIBRARY_SEARCH_PATHS = ( 307 | "$(inherited)", 308 | "$(PROJECT_DIR)/Flutter", 309 | ); 310 | PRODUCT_BUNDLE_IDENTIFIER = cn.net.polyglot.socialvertexflutter; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 313 | SWIFT_VERSION = 5.0; 314 | VERSIONING_SYSTEM = "apple-generic"; 315 | }; 316 | name = Profile; 317 | }; 318 | 97C147031CF9000F007C117D /* Debug */ = { 319 | isa = XCBuildConfiguration; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_ANALYZER_NONNULL = YES; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INFINITE_RECURSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 342 | CLANG_WARN_STRICT_PROTOTYPES = YES; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | DEBUG_INFORMATION_FORMAT = dwarf; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | ENABLE_TESTABILITY = YES; 351 | GCC_C_LANGUAGE_STANDARD = gnu99; 352 | GCC_DYNAMIC_NO_PIC = NO; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_OPTIMIZATION_LEVEL = 0; 355 | GCC_PREPROCESSOR_DEFINITIONS = ( 356 | "DEBUG=1", 357 | "$(inherited)", 358 | ); 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 366 | MTL_ENABLE_DEBUG_INFO = YES; 367 | ONLY_ACTIVE_ARCH = YES; 368 | SDKROOT = iphoneos; 369 | TARGETED_DEVICE_FAMILY = "1,2"; 370 | }; 371 | name = Debug; 372 | }; 373 | 97C147041CF9000F007C117D /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ALWAYS_SEARCH_USER_PATHS = NO; 377 | CLANG_ANALYZER_NONNULL = YES; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu99; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 415 | MTL_ENABLE_DEBUG_INFO = NO; 416 | SDKROOT = iphoneos; 417 | SUPPORTED_PLATFORMS = iphoneos; 418 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | VALIDATE_PRODUCT = YES; 421 | }; 422 | name = Release; 423 | }; 424 | 97C147061CF9000F007C117D /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 427 | buildSettings = { 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | CLANG_ENABLE_MODULES = YES; 430 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 431 | ENABLE_BITCODE = NO; 432 | FRAMEWORK_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "$(PROJECT_DIR)/Flutter", 435 | ); 436 | INFOPLIST_FILE = Runner/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | LIBRARY_SEARCH_PATHS = ( 439 | "$(inherited)", 440 | "$(PROJECT_DIR)/Flutter", 441 | ); 442 | PRODUCT_BUNDLE_IDENTIFIER = cn.net.polyglot.socialvertexflutter; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 445 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 446 | SWIFT_VERSION = 5.0; 447 | VERSIONING_SYSTEM = "apple-generic"; 448 | }; 449 | name = Debug; 450 | }; 451 | 97C147071CF9000F007C117D /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 454 | buildSettings = { 455 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 456 | CLANG_ENABLE_MODULES = YES; 457 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 458 | ENABLE_BITCODE = NO; 459 | FRAMEWORK_SEARCH_PATHS = ( 460 | "$(inherited)", 461 | "$(PROJECT_DIR)/Flutter", 462 | ); 463 | INFOPLIST_FILE = Runner/Info.plist; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 465 | LIBRARY_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "$(PROJECT_DIR)/Flutter", 468 | ); 469 | PRODUCT_BUNDLE_IDENTIFIER = cn.net.polyglot.socialvertexflutter; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 472 | SWIFT_VERSION = 5.0; 473 | VERSIONING_SYSTEM = "apple-generic"; 474 | }; 475 | name = Release; 476 | }; 477 | /* End XCBuildConfiguration section */ 478 | 479 | /* Begin XCConfigurationList section */ 480 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 481 | isa = XCConfigurationList; 482 | buildConfigurations = ( 483 | 97C147031CF9000F007C117D /* Debug */, 484 | 97C147041CF9000F007C117D /* Release */, 485 | 249021D3217E4FDB00AE95B9 /* Profile */, 486 | ); 487 | defaultConfigurationIsVisible = 0; 488 | defaultConfigurationName = Release; 489 | }; 490 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | 97C147061CF9000F007C117D /* Debug */, 494 | 97C147071CF9000F007C117D /* Release */, 495 | 249021D4217E4FDB00AE95B9 /* Profile */, 496 | ); 497 | defaultConfigurationIsVisible = 0; 498 | defaultConfigurationName = Release; 499 | }; 500 | /* End XCConfigurationList section */ 501 | }; 502 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 503 | } 504 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitewoodcity/social_vertex_flutter/431d8a0eab2553a3e10c10979fcde3b4bdc78dca/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 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | socialvertexflutter 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/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/config/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const double currentVersion = 0.2; 4 | 5 | const String server = "polyglot.net.cn"; 6 | const int tcpPort = 7373; 7 | final ThemeData applicationTheme = ThemeData.light(); 8 | 9 | const language = "language"; 10 | 11 | const int loginPage = 0; 12 | const int userPage = 1; 13 | const int messagePage = 2; 14 | const int dialog = 3; 15 | const int searchPage = 4; 16 | const int systemPage=5; 17 | const String message = "message"; 18 | const String search = "search"; 19 | const String friend = "friend"; 20 | const String messages = "messages"; 21 | const String friends = "friends"; 22 | const String notifications = "notifications"; 23 | const String user = "user"; 24 | const String history = "history"; 25 | const String request = "request"; 26 | const String response = "response"; 27 | const String delete = "delete"; 28 | const String login = "login"; 29 | const String username = "username"; 30 | const String register = "register"; 31 | const String type = "type"; 32 | const String subtype = "subtype"; 33 | const String version = "version"; 34 | const String from = "from"; 35 | const String to = "to"; 36 | const String info = "info"; 37 | const String nickname = "nickname"; 38 | const String id = "id"; 39 | const String password = "password"; 40 | const String password2 = "password2"; 41 | const String dir = "dir"; 42 | const String host = "host"; 43 | const String body = "body"; 44 | const String accept = "accept"; 45 | const String text = "text"; 46 | const String tcp_port = "tcp-port"; 47 | const String http_port = "http-port"; 48 | const String keyword = "keyword"; 49 | const String offline = "offline"; 50 | const String date = "date"; 51 | const String time = "time"; 52 | const String uuid = "uuid"; 53 | const String protocol = "http://"; 54 | 55 | const String end = "\r\n"; 56 | 57 | -------------------------------------------------------------------------------- /lib/config/ui_variables.dart: -------------------------------------------------------------------------------- 1 | const languageDescriptions = ["English", "简体中文"]; 2 | const languageValues = ["en", "zh_Hans"]; 3 | 4 | Map uiVariables = { 5 | "language" : "en", 6 | "login" : "Login", 7 | "username" : "Username", 8 | "password" : "Password", 9 | "register" : "Register", 10 | "login_fail" : "Login failed", 11 | "server_error" : "Server error, please try later", 12 | "user_pw_null" : "Please input username and password", 13 | "nickname" : "Nickname", 14 | "pw_confirm" : "Password confirm", 15 | "msg" : "message", 16 | "ok" : "OK", 17 | "pw_not_match" : "Those passwords did not match", 18 | "info_incomplete" : "Your infomation is incomplete", 19 | "system_error" : "System Error", 20 | "network_error" : "Network Error", 21 | "search" : "Search", 22 | "update" : "Update", 23 | "quit" : "Quit", 24 | "no_msg" : "No message", 25 | "sent" : "Sent", 26 | "send" : "Send", 27 | "friend_add" : "Please add me as a friend! I'm ", 28 | "friend_add_refuse": " has refused your request", 29 | "accept" : "Accept", 30 | "refuse" : "Refuse", 31 | "friends" : "Friends" 32 | }; 33 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | import 'package:http/http.dart'; 6 | import 'config/ui_variables.dart'; 7 | import 'search_interface.dart'; 8 | import 'user_interface.dart'; 9 | import 'utils/util.dart'; 10 | 11 | import 'register.dart'; 12 | import 'config/constants.dart' as constants; 13 | import 'dart:ui' as ui; 14 | import 'package:flutter/services.dart' show rootBundle; 15 | 16 | void main() => runApp(Application()); //整个应用的入口 17 | 18 | class Application extends StatelessWidget { 19 | @override 20 | Widget build(BuildContext context) => 21 | MaterialApp( 22 | initialRoute: "/", 23 | routes: { 24 | "/": (_) => HomePage(), 25 | "/register": (_) => RegisterPage(), 26 | "/login": (_) => UserInterface(), 27 | "/search": (_) => SearchInterface(), 28 | }, 29 | ); 30 | } 31 | 32 | class HomePage extends StatefulWidget { 33 | @override 34 | HomePageState createState() => HomePageState(); 35 | } 36 | 37 | class HomePageState extends State { 38 | 39 | TextEditingController id = TextEditingController(); 40 | TextEditingController pw = TextEditingController(); 41 | 42 | void initState() { 43 | super.initState(); 44 | Locale locale = ui.window.locale == null ? ui.window.locale : Locale.fromSubtags(); 45 | loadSystemUIVariables(locale); 46 | } 47 | 48 | void loadSystemUIVariables(Locale locale) { 49 | if (locale == null) return; 50 | rootBundle.loadString("assets/i18n/$locale.json") 51 | .then((string) => setState(() => uiVariables = json.decode(string))) 52 | .catchError((error) { 53 | var scriptCode = locale.scriptCode == null ? "" : "_${locale.scriptCode}"; 54 | rootBundle.loadString("assets/i18n/${locale.languageCode}$scriptCode.json") 55 | .then((string) => setState(() => uiVariables = json.decode(string))) 56 | .catchError((error) => 57 | rootBundle.loadString("assets/i18n/${locale.languageCode}.json") 58 | .then((string) => setState(() => uiVariables = json.decode(string))) 59 | .catchError((e) {}) 60 | ); 61 | }); 62 | } 63 | 64 | void loadUIVariablesByString(String param) { 65 | rootBundle.loadString("assets/i18n/$param.json") 66 | .then((string) => setState(() => uiVariables = json.decode(string))); 67 | } 68 | 69 | Widget build(BuildContext context) { 70 | SystemChrome.setEnabledSystemUIOverlays([]); 71 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 72 | 73 | List> languageList = []; 74 | for (int i = 0; i < languageValues.length; i++) { 75 | languageList.add(DropdownMenuItem( 76 | value: languageValues[i], 77 | child: Text(languageDescriptions[i]) 78 | )); 79 | } 80 | 81 | return Scaffold( 82 | key: Key(constants.login), 83 | appBar: AppBar( 84 | title: Text(uiVariables["login"]), 85 | ), 86 | body: Center( 87 | child: ListView( 88 | children: [ 89 | Padding( 90 | padding: const EdgeInsets.only( 91 | top: 50.0, left: 20.0, right: 20.0, bottom: 20.0), 92 | child: Align( 93 | child: LayoutBuilder(builder: (context, constraint) { 94 | return Image.asset( 95 | "assets/images/flutter.png", 96 | width: constraint.biggest.width / 2, 97 | height: constraint.biggest.width / 2, 98 | ); 99 | }), 100 | alignment: Alignment.center, 101 | ), 102 | ), 103 | Form( 104 | child: Column( 105 | children: [ 106 | TextFormField( 107 | textAlign: TextAlign.start, 108 | // onChanged: (value) => (state.id = value), 109 | controller: id, 110 | decoration: InputDecoration(labelText: uiVariables["username"]), 111 | ), 112 | TextFormField( 113 | textAlign: TextAlign.start, 114 | // onChanged: (value) => (state.password = value), 115 | controller: pw, 116 | obscureText: true, 117 | decoration: InputDecoration(labelText: uiVariables["password"]), 118 | ), 119 | SizedBox.fromSize( 120 | size: Size(0.00, 10.0), 121 | ), 122 | RaisedButton( 123 | onPressed: () { 124 | if (id.text.trim() != "" && pw.text.trim() != "") { 125 | var reqJson = { 126 | constants.type: constants.user, 127 | constants.subtype: constants.login, 128 | constants.id: id.text.trim(), 129 | constants.password: md5(pw.text.trim()) 130 | }; 131 | put("${constants.protocol}${constants.server}/", 132 | headers: {"Content-Type": "application/json"}, 133 | body: json.encode(reqJson)).then((response) { 134 | if (response.statusCode == 200) { 135 | var result = json.decode(utf8.decode(response.bodyBytes)); 136 | result[constants.password] = md5(pw.text.trim()); 137 | if (result[constants.login]) { 138 | Navigator.pushNamed(context, "/login", arguments: result); 139 | } else { 140 | showMessage(uiVariables["login_fail"]); 141 | } 142 | } else { 143 | showMessage(uiVariables["system_error"]); 144 | } 145 | }, onError: (error) => showMessage(uiVariables["system_error"])); 146 | } else { 147 | showMessage(uiVariables["user_pw_null"]); 148 | } 149 | }, 150 | child: Text(uiVariables["login"]), 151 | ), 152 | DropdownButton( 153 | value: uiVariables["language"], 154 | items: languageList, 155 | onChanged: (language) => 156 | rootBundle.loadString("assets/i18n/$language.json") 157 | .then((string) => setState(() => uiVariables = json.decode(string)))), 158 | ], 159 | ), 160 | ), 161 | ], 162 | ), 163 | ), 164 | floatingActionButton: SizedBox( 165 | width: 75.0, 166 | height: 75.0, 167 | child: FloatingActionButton( 168 | onPressed: () => 169 | (Navigator.pushNamed(context, "/register") 170 | .then((value) { 171 | if (value is Map) { 172 | Map map = value as Map; 173 | if (map.containsKey(constants.id)) 174 | id.text = map[constants.id]; 175 | if (map.containsKey(constants.password)) 176 | pw.text = map[constants.password]; 177 | } 178 | })), 179 | child: Text(uiVariables["register"]), 180 | ), 181 | ), 182 | ); 183 | } 184 | 185 | @override 186 | void dispose() { 187 | super.dispose(); 188 | id.dispose(); 189 | pw.dispose(); 190 | } 191 | 192 | void showMessage(String message) { 193 | showDialog( 194 | context: context, 195 | builder: (BuildContext context) => 196 | SimpleDialog( 197 | children: [ 198 | Center( 199 | child: Text(message), 200 | ) 201 | ], 202 | )); 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /lib/register.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:http/http.dart'; 5 | import 'config/ui_variables.dart'; 6 | import "config/constants.dart" as constants; 7 | import 'utils/util.dart' as util; 8 | 9 | class RegisterPage extends StatefulWidget { 10 | 11 | @override 12 | RegisterState createState() => RegisterState(); 13 | } 14 | 15 | class RegisterState extends State { 16 | String _userName = ""; 17 | String _password = ""; 18 | String _repassword = ""; 19 | String _nickname = ""; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | appBar: AppBar( 25 | title: Text(uiVariables["register"]), 26 | centerTitle: true, 27 | ), 28 | body: ListView( 29 | children: [ 30 | TextField( 31 | textAlign: TextAlign.start, 32 | onChanged: (value) => _userName = value, 33 | decoration: InputDecoration(labelText: uiVariables["username"]), 34 | ), 35 | TextField( 36 | textAlign: TextAlign.start, 37 | obscureText: true, 38 | onChanged: (String value) => _password = value, 39 | decoration: InputDecoration(labelText: uiVariables["password"]), 40 | ), 41 | TextField( 42 | obscureText: true, 43 | onChanged: (String value) => _repassword = value, 44 | decoration: InputDecoration(labelText: uiVariables["pw_confirm"]), 45 | ), 46 | TextField( 47 | onChanged: (String value) => _nickname = value, 48 | decoration: InputDecoration(labelText: uiVariables["nickname"]), 49 | ), 50 | SizedBox.fromSize( 51 | size: Size(0.0, 10.0), 52 | ), 53 | Center( 54 | child: RaisedButton( 55 | onPressed: () { 56 | if (_userName != "" && _password != "" && _repassword != "") { 57 | if (_password == _repassword) { 58 | _register(context); 59 | } else { 60 | _registerAlert(uiVariables["pw_not_match"]); 61 | } 62 | } else { 63 | _registerAlert(uiVariables["info_incomplete"]); 64 | } 65 | }, 66 | child: Text(uiVariables["register"]), 67 | ), 68 | ), 69 | ], 70 | ), 71 | ); 72 | } 73 | 74 | void _register(BuildContext context) async { 75 | var info = { 76 | constants.type: constants.user, 77 | constants.subtype: constants.register, 78 | constants.id: "$_userName", 79 | constants.password: "${util.md5(_userName+_password)}", 80 | constants.password2: "${util.md5(_userName+_repassword)}", 81 | constants.nickname: "$_nickname", 82 | constants.version: constants.currentVersion 83 | }; 84 | 85 | put("${constants.protocol}${constants.server}/", 86 | headers: {"Content-Type": "application/json"}, body: json.encode(info) + constants.end) 87 | .then((response) { 88 | if (response.statusCode == 200) { 89 | var result = json.decode(utf8.decode(response.bodyBytes)); 90 | if (result[constants.register]) { 91 | Navigator.popAndPushNamed(context, "/login", result: { 92 | constants.id: _userName, 93 | constants.password: _password 94 | }, arguments: { 95 | constants.id: _userName, 96 | constants.password: util.md5(_userName+_password), 97 | constants.nickname: _nickname 98 | }); 99 | } else { 100 | _registerAlert(result["info"]); 101 | } 102 | } else { 103 | _registerAlert(uiVariables["system_error"]); 104 | } 105 | }).catchError((error) => print(error)); 106 | } 107 | 108 | void _registerAlert(String info) { 109 | showDialog( 110 | context: context, 111 | builder: (BuildContext context) => SimpleDialog( 112 | title: Text(uiVariables["msg"]), 113 | children: [ 114 | Align( 115 | alignment: Alignment.center, 116 | child: Text(info), 117 | ), 118 | SizedBox.fromSize( 119 | size: Size(0.00, 10.00), 120 | ), 121 | Align( 122 | alignment: Alignment.center, 123 | child: RaisedButton( 124 | onPressed: () { 125 | Navigator.pop(context); 126 | }, 127 | child: Text(uiVariables["ok"]), 128 | ), 129 | ), 130 | ], 131 | ), 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/search_interface.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'config/ui_variables.dart'; 6 | 7 | import 'config/constants.dart' as constants; 8 | 9 | class SearchInterface extends StatefulWidget { 10 | @override 11 | SearchInterfaceState createState() => SearchInterfaceState(); 12 | } 13 | 14 | class SearchInterfaceState extends State { 15 | 16 | var id = TextEditingController(); 17 | var pw = TextEditingController(); 18 | var nickname = ""; 19 | var keyword = TextEditingController(); 20 | var httpClient = HttpClient(); 21 | var friendId, friendNickname; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | final Map arguments = ModalRoute.of(context).settings.arguments; 26 | id.text = arguments[constants.id]; 27 | pw.text = arguments[constants.password]; 28 | nickname = arguments[constants.nickname]; 29 | 30 | List itemList = []; 31 | 32 | if (friendId != null && friendNickname != null) { 33 | itemList.add(buildUserItem(context, friendId, friendNickname)); 34 | } 35 | 36 | return Scaffold( 37 | appBar: AppBar( 38 | title: Text(uiVariables["search"]), 39 | centerTitle: true, 40 | leading: IconButton( 41 | icon: InputDecorator( 42 | decoration: InputDecoration( 43 | icon: Icon(Icons.arrow_back), 44 | ), 45 | ), 46 | onPressed: () => Navigator.pop(context), 47 | ), 48 | ), 49 | body: Column( 50 | crossAxisAlignment: CrossAxisAlignment.stretch, 51 | children: [ //itemList 52 | Container( 53 | color: Colors.white, 54 | padding: EdgeInsets.fromLTRB(20, 10, 20, 0), 55 | child: Row( 56 | children: [ 57 | Expanded( 58 | child: TextField(controller: keyword), 59 | flex: 8, 60 | ), 61 | Expanded( 62 | child: RaisedButton( 63 | onPressed: () async { 64 | var message = { 65 | constants.type: constants.search, 66 | constants.keyword: keyword.text.trim(), 67 | constants.version: constants.currentVersion 68 | }; 69 | httpClient.badCertificateCallback = (X509Certificate cert, String host, int port) => true; 70 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/")); 71 | request.headers.add("content-type", "application/json;charset=utf-8"); 72 | request.write(json.encode(message)); 73 | var response = await request.close(); 74 | if (response.statusCode == 200) { 75 | response.transform(utf8.decoder).listen((data) { 76 | Map result = json.decode(data); 77 | // print(result); 78 | if (result.containsKey(constants.user)) { 79 | setState(() { 80 | this.friendId = result[constants.user][constants.id]; 81 | this.friendNickname = result[constants.user][constants.nickname]; 82 | }); 83 | } 84 | }); 85 | } else { 86 | this.showMessage(uiVariables["system_error"]); 87 | } 88 | }, 89 | child: Text(uiVariables["search"]), 90 | ), 91 | flex: 2, 92 | ) 93 | ], 94 | ), 95 | ), 96 | ...itemList, 97 | ], 98 | ), 99 | ); 100 | } 101 | 102 | @override 103 | void dispose() { 104 | super.dispose(); 105 | id.dispose(); 106 | pw.dispose(); 107 | httpClient.close(force: true); 108 | keyword.dispose(); 109 | } 110 | 111 | void showMessage(String message) { 112 | //显示系统消息 113 | showDialog( 114 | context: context, 115 | builder: (BuildContext context) => 116 | SimpleDialog( 117 | // title: Text("消息"), 118 | children: [ 119 | Center( 120 | child: Text(message), 121 | ) 122 | ], 123 | )); 124 | } 125 | 126 | Widget buildUserItem(BuildContext context, String friendId, String friendNickname) { 127 | return Container( 128 | // color: Colors.white, 129 | padding: EdgeInsets.fromLTRB(20, 10, 20, 0), 130 | child: Row( 131 | children: [ 132 | Expanded( 133 | child: Row( 134 | children: [ 135 | Column( 136 | children: [ 137 | Icon(Icons.account_box), 138 | ], 139 | ), 140 | Column( 141 | children: [ 142 | Padding( 143 | padding: EdgeInsets.only(left: 5.00), 144 | child: Text( 145 | "$friendId($friendNickname)", 146 | overflow: TextOverflow.ellipsis, 147 | )), 148 | ], 149 | ), 150 | ], 151 | ), 152 | flex: 8, 153 | ), 154 | Expanded( 155 | child: Align( 156 | alignment: Alignment.centerRight, 157 | child: IconButton( 158 | icon: InputDecorator( 159 | decoration: InputDecoration(icon: Icon(Icons.add)), 160 | ), 161 | onPressed: () async { 162 | 163 | var message = { 164 | constants.type: constants.friend, 165 | constants.subtype: constants.request, 166 | constants.id: this.id.text.trim(), 167 | constants.password: this.pw.text.trim(), 168 | constants.nickname: this.nickname, 169 | constants.to: friendId, 170 | constants.message: "${uiVariables['friend_add']} ${this.id.text.trim()}", 171 | constants.version: constants.currentVersion 172 | }; 173 | httpClient.badCertificateCallback = (X509Certificate cert, String host, int port) => true; 174 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/")); 175 | request.headers.add("content-type", "application/json;charset=utf-8"); 176 | request.write(json.encode(message)); 177 | var response = await request.close(); 178 | if (response.statusCode == 200) { 179 | this.showMessage(uiVariables["sent"]); 180 | setState(() { 181 | this.friendId = null; 182 | this.friendNickname = null; 183 | }); 184 | } else { 185 | this.showMessage(uiVariables["system_error"]); 186 | } 187 | }, 188 | ), 189 | ), 190 | flex: 2, 191 | ), 192 | ], 193 | ),) 194 | ; 195 | } 196 | } 197 | 198 | -------------------------------------------------------------------------------- /lib/user_interface.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'config/ui_variables.dart'; 6 | import 'config/constants.dart' as constants; 7 | 8 | class UserInterface extends StatefulWidget { 9 | @override 10 | UserInterfaceState createState() => UserInterfaceState(); 11 | } 12 | 13 | enum UserRoute{ 14 | init, friends, notifications, dialog, 15 | } 16 | 17 | class UserInterfaceState extends State { 18 | 19 | var id = TextEditingController(); 20 | var pw = TextEditingController(); 21 | var nickname = TextEditingController(); 22 | var friends = []; 23 | var notifications = []; 24 | var friendId = ""; 25 | var friendNickname = ""; 26 | var dialogTtileController = TextEditingController(); 27 | var scrollController = ScrollController(); 28 | var messages = []; 29 | var messageDate = ""; 30 | 31 | var currentRoute = UserRoute.init; 32 | 33 | Socket socket; 34 | var httpClient = HttpClient(); 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | if (currentRoute == UserRoute.init) { 39 | final Map arguments = ModalRoute 40 | .of(context) 41 | .settings 42 | .arguments; 43 | id.text = arguments[constants.id]; 44 | pw.text = arguments[constants.password]; 45 | nickname.text = arguments[constants.nickname]; 46 | friends = arguments[constants.friends]; 47 | notifications = arguments[constants.notifications]; 48 | currentRoute = UserRoute.friends; 49 | 50 | httpClient.badCertificateCallback = (X509Certificate cert, String host, int port) => true; 51 | 52 | var loading = false; 53 | scrollController.addListener(() async { 54 | if(loading) return; 55 | double maxScroll = scrollController.position.maxScrollExtent; 56 | double currentScroll = scrollController.position.pixels; 57 | double delta = 1.0; // or something else.. 58 | if ( (currentScroll - maxScroll).abs() <= delta) { // whatever you determine here 59 | loading = true; 60 | var msg = { 61 | constants.type: constants.message, 62 | constants.subtype: constants.history, 63 | constants.id: this.id.text.trim(), 64 | constants.password: this.pw.text.trim(), 65 | constants.friend: friendId, 66 | constants.date: messageDate, 67 | constants.version: constants.currentVersion 68 | }; 69 | 70 | try { 71 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/")); 72 | request.headers.add("content-type", "application/json;charset=utf-8"); 73 | request.write(json.encode(msg)); 74 | var response = await request.close(); 75 | if (response.statusCode == 200) { 76 | var string = await response.transform(utf8.decoder).join(); 77 | var result = json.decode(string); 78 | if (currentRoute == UserRoute.dialog && result[constants.friend] == friendId) { 79 | setState(() => messages.addAll((result[constants.history] as List).reversed)); 80 | messageDate = result[constants.date]; 81 | } 82 | } else { 83 | this.showMessage(uiVariables['system_error']); 84 | } 85 | }catch(e){ 86 | this.showMessage(uiVariables['network_error']); 87 | } 88 | 89 | loading = false; 90 | } 91 | }); 92 | 93 | Socket.connect(constants.server, constants.tcpPort) 94 | .then((socket) { 95 | this.socket = socket; 96 | var msg = { 97 | constants.type: constants.login, 98 | constants.id: id.text.trim(), 99 | constants.password: pw.text.trim(), 100 | constants.version: constants.currentVersion, 101 | }; 102 | socket.write(json.encode(msg) + constants.end); 103 | var message = List(); 104 | socket.forEach((packet) { 105 | message.addAll(packet); //粘包 106 | if (utf8.decode(message).endsWith(constants.end)) { 107 | List msgs = utf8.decode(message).trim().split(constants.end); //拆包 108 | for (String msg in msgs) { 109 | processMesssage(msg); 110 | } 111 | message.clear(); 112 | } 113 | }); 114 | var ctx = Navigator.of(context); 115 | socket.handleError(() => ctx.popUntil(ModalRoute.withName('/'))); 116 | socket.done.then((_) => ctx.popUntil(ModalRoute.withName('/'))); 117 | }); 118 | } 119 | 120 | if(currentRoute==UserRoute.dialog){ 121 | 122 | ListView dialog = ListView.builder( 123 | padding: EdgeInsets.all(10.0), 124 | controller: scrollController, 125 | reverse: true, 126 | itemBuilder: (BuildContext context, int index) { 127 | Map item = messages[index]; 128 | 129 | var align = MainAxisAlignment.start; 130 | if(item[constants.id] == id.text.trim()){ 131 | align = MainAxisAlignment.end; 132 | } 133 | 134 | var text = "${item[constants.id]}:\n${item[constants.body]}"; 135 | 136 | var row = Row( 137 | mainAxisAlignment: align, 138 | children: [ 139 | Padding( 140 | padding: EdgeInsets.all(10.0), 141 | child: Text("$text", textAlign: TextAlign.start,), 142 | ), 143 | ], 144 | ); 145 | 146 | if(item[constants.id] == id.text.trim()){ 147 | row.children.add(Icon(Icons.message)); 148 | }else{ 149 | row.children.insert(0, Icon(Icons.message)); 150 | } 151 | 152 | return row; 153 | }, 154 | itemCount: messages.length, 155 | ); 156 | 157 | return Scaffold( 158 | appBar: AppBar( 159 | title: Text("$friendId($friendNickname)"), 160 | centerTitle: true, 161 | leading: IconButton( 162 | icon: InputDecorator( 163 | decoration: InputDecoration(icon: Icon(Icons.arrow_back)), 164 | ), 165 | onPressed: () => setState(()=>currentRoute=UserRoute.friends), 166 | ), 167 | ), 168 | body: Column( 169 | crossAxisAlignment: CrossAxisAlignment.stretch, 170 | children: [ 171 | Expanded( 172 | child: dialog, 173 | ), 174 | Container( 175 | color: Colors.white, 176 | padding: EdgeInsets.all(10.0), 177 | child: Row( 178 | children: [ 179 | Expanded( 180 | child: TextField( 181 | controller: dialogTtileController, 182 | ), 183 | ), 184 | RaisedButton( 185 | child: Text(uiVariables['send']), 186 | onPressed: () async { 187 | if(dialogTtileController.text.isNotEmpty){ 188 | var msg = { 189 | constants.id: id.text.trim(), 190 | constants.password: pw.text.trim(), 191 | constants.type: constants.message, 192 | constants.subtype: constants.text, 193 | constants.body: dialogTtileController.text, 194 | constants.to: friendId, 195 | }; 196 | dialogTtileController.clear(); 197 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/${constants.message}")); 198 | request.headers.add("content-type", "application/json;charset=utf-8"); 199 | request.write(json.encode(msg)); 200 | var response = await request.close(); 201 | if (response.statusCode == 200) { 202 | setState(() => messages.insert(0,msg)); 203 | scrollController.position.jumpTo(0); 204 | } else { 205 | this.showMessage(uiVariables['network_error']); 206 | } 207 | } 208 | }, 209 | ), 210 | ], 211 | ), 212 | ), 213 | ], 214 | ), 215 | ); 216 | }else { 217 | return Scaffold( 218 | appBar: AppBar( 219 | title: Text(uiVariables['friends']), 220 | centerTitle: true, 221 | actions: [ 222 | IconButton( 223 | icon: InputDecorator( 224 | decoration: InputDecoration(icon: Icon(Icons.search)), 225 | ), 226 | onPressed: () { 227 | Navigator.pushNamed(context, "/search", arguments: {constants.id: id.text.trim(), constants.password: pw.text.trim(), constants.nickname: nickname.text.trim()}); 228 | }, 229 | ), 230 | ], 231 | ), 232 | drawer: Drawer( 233 | child: getDrawer(), 234 | ), 235 | body: getBody(friends ??= [], notifications ??= []), 236 | bottomNavigationBar: BottomNavigationBar( 237 | items: [ 238 | BottomNavigationBarItem( 239 | icon: Icon(Icons.account_box), title: Text(uiVariables['friends'])), 240 | BottomNavigationBarItem( 241 | icon: Icon(Icons.notifications_active), title: Text(uiVariables['msg']), 242 | ), 243 | ], 244 | onTap: (index) => setState(() => currentRoute = index==0?UserRoute.friends:UserRoute.notifications), 245 | currentIndex: currentRoute==UserRoute.friends?0:1, 246 | ), 247 | ); 248 | } 249 | } 250 | 251 | @override 252 | void dispose() { 253 | super.dispose(); 254 | id.dispose(); 255 | pw.dispose(); 256 | nickname.dispose(); 257 | if (this.socket != null) { 258 | socket.destroy(); 259 | } 260 | httpClient.close(force: true); 261 | scrollController.dispose(); 262 | dialogTtileController.dispose(); 263 | } 264 | 265 | processMesssage(String msg) { 266 | Map map = json.decode(msg); 267 | switch (map[constants.type]) { 268 | case constants.friend: 269 | switch (map[constants.subtype]) { 270 | case constants.request: 271 | setState(() { 272 | notifications.removeWhere((e) => e[constants.id] == map[constants.id]); 273 | notifications.insert(0, map); 274 | }); 275 | break; 276 | case constants.response: 277 | if (map.containsKey(constants.accept) && map[constants.accept]) { 278 | setState(() { 279 | friends.removeWhere((e) => e[constants.id] == map[constants.id]); 280 | friends.insert(0, {constants.id: map[constants.id], constants.nickname: map[constants.nickname]}); 281 | }); 282 | } else { 283 | this.showMessage("${map[constants.id]}${uiVariables['friend_add_refuse']}"); 284 | } 285 | break; 286 | default: 287 | break; 288 | } 289 | break; 290 | case constants.message: 291 | if(currentRoute == UserRoute.dialog && friendId == map[constants.id]) { 292 | setState(() => messages.insert(0,map)); 293 | scrollController.position.jumpTo(0); 294 | } 295 | break; 296 | default: 297 | break; 298 | } 299 | } 300 | 301 | getDrawer() { 302 | return Scaffold( 303 | body: ListView( 304 | children: [ 305 | Row( 306 | children: [ 307 | Container( 308 | width: 100.0, 309 | height: 100.0, 310 | child: Image.asset("assets/images/flutter.png"), 311 | ), 312 | ], 313 | mainAxisAlignment: MainAxisAlignment.center, 314 | ), 315 | Text( 316 | nickname.text, 317 | textAlign: TextAlign.center, 318 | style: TextStyle( 319 | fontSize: 20.0, 320 | fontFamily: "微软雅黑", 321 | ), 322 | ), 323 | ], 324 | ), 325 | bottomNavigationBar: BottomNavigationBar( 326 | items: [ 327 | BottomNavigationBarItem( 328 | icon: Icon(Icons.cloud_upload), title: Text(uiVariables['update'])), 329 | BottomNavigationBarItem( 330 | icon: Icon(Icons.exit_to_app), title: Text(uiVariables['quit'])) 331 | ], 332 | onTap: (value) { 333 | if (value == 1) { 334 | Navigator.popUntil(context, ModalRoute.withName('/')); 335 | } else { 336 | setState(() { 337 | 338 | }); 339 | } 340 | }, 341 | currentIndex: 1, 342 | ), 343 | ); 344 | } 345 | 346 | ListView getBody(List friends, List notifications) { 347 | List list = []; 348 | 349 | for (int i = 0; i < (currentRoute == UserRoute.friends ? friends.length : notifications.length); i++) { 350 | var widget; 351 | if (currentRoute == UserRoute.friends) { 352 | String fid = friends[i][constants.id]; 353 | String fnickname = friends[i][constants.nickname]; 354 | 355 | var row = Row( 356 | children: [ 357 | Icon(Icons.account_box), 358 | Expanded( 359 | child: Padding( 360 | padding: EdgeInsets.all(10.0), 361 | child: Column( 362 | crossAxisAlignment: CrossAxisAlignment.start, 363 | children: [ 364 | Text(fid + "($fnickname)"), 365 | Text(uiVariables['no_msg']) 366 | ], 367 | ), 368 | ), 369 | ), 370 | ], 371 | ); 372 | 373 | var container = Container( 374 | padding: EdgeInsets.all(10.0), 375 | child: row, 376 | ); 377 | 378 | widget = GestureDetector( 379 | onTap: () async { 380 | setState(() { 381 | messages.clear(); 382 | currentRoute = UserRoute.dialog; 383 | friendId = fid; 384 | friendNickname = fnickname; 385 | messageDate = ""; 386 | }); 387 | 388 | var msg = { 389 | constants.type: constants.message, 390 | constants.subtype: constants.history, 391 | constants.id: this.id.text.trim(), 392 | constants.password: this.pw.text.trim(), 393 | constants.friend: fid, 394 | constants.version: constants.currentVersion 395 | }; 396 | 397 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/")); 398 | request.headers.add("content-type", "application/json;charset=utf-8"); 399 | request.write(json.encode(msg)); 400 | var response = await request.close(); 401 | if (response.statusCode == 200) { 402 | var string = await response.transform(utf8.decoder).join(); 403 | var result = json.decode(string); 404 | if(currentRoute == UserRoute.dialog && result[constants.friend] == friendId){ 405 | setState(() => messages.addAll((result[constants.history] as List).reversed)); 406 | scrollController.position.animateTo(0, duration: Duration(seconds: 3), curve: Curves.decelerate); 407 | messageDate = result[constants.date]; 408 | } 409 | } else { 410 | this.showMessage(uiVariables['system_error']); 411 | } 412 | }, 413 | child: container, 414 | ); 415 | } else { 416 | var upperRow = Row( 417 | children: [ 418 | Icon(Icons.notifications_active), 419 | Expanded( 420 | child: Padding( 421 | padding: EdgeInsets.all(10.0), 422 | child: Column( 423 | crossAxisAlignment: CrossAxisAlignment.start, 424 | children: [ 425 | Text(notifications[i][constants.id]), 426 | Text(notifications[i][constants.message]) 427 | ], 428 | ), 429 | ), 430 | ) 431 | ], 432 | ); 433 | 434 | void _pressed(bool accept) async { 435 | //define a function, used below 436 | var id = notifications[i][constants.id]; 437 | var nickname = notifications[i][constants.nickname]; 438 | var msg = { 439 | constants.type: constants.friend, 440 | constants.subtype: constants.response, 441 | constants.id: this.id.text.trim(), 442 | constants.password: this.pw.text.trim(), 443 | constants.nickname: this.nickname.text.trim(), 444 | constants.to: id, 445 | constants.accept: accept, 446 | constants.version: constants.currentVersion 447 | }; 448 | 449 | var request = await httpClient.putUrl(Uri.parse("${constants.protocol}${constants.server}/")); 450 | request.headers.add("content-type", "application/json;charset=utf-8"); 451 | request.write(json.encode(msg)); 452 | var response = await request.close(); 453 | if (response.statusCode == 200) { 454 | if (accept) { 455 | friends.removeWhere((e) => e[constants.id] == id); 456 | friends.insert(0, {constants.id: id, constants.nickname: nickname}); 457 | } 458 | setState(() { 459 | notifications.removeWhere((e) => e[constants.id] == id); 460 | }); 461 | } else { 462 | this.showMessage(uiVariables['system_error']); 463 | } 464 | } 465 | 466 | var lowerRow = Row( 467 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 468 | children: [ 469 | RaisedButton( 470 | padding: EdgeInsets.all(10.0), 471 | onPressed: () => _pressed(true), 472 | child: Text(uiVariables['accept']), 473 | ), 474 | RaisedButton( 475 | padding: EdgeInsets.all(10.0), 476 | onPressed: () => _pressed(false), 477 | child: Text(uiVariables['refuse']), 478 | ), 479 | ], 480 | ); 481 | 482 | var col = Column( 483 | crossAxisAlignment: CrossAxisAlignment.center, 484 | children: [upperRow, lowerRow]); 485 | 486 | widget = Container( 487 | padding: EdgeInsets.all(10.0), 488 | child: col, 489 | ); 490 | } 491 | 492 | list.add(widget); 493 | } 494 | 495 | // var col = Column( 496 | // crossAxisAlignment: CrossAxisAlignment.stretch, 497 | // children: list, 498 | // ); 499 | 500 | return ListView.builder( 501 | padding: EdgeInsets.all(10.0), 502 | itemBuilder: (BuildContext context, int index) => list[index], 503 | itemCount: list.length, 504 | ); 505 | } 506 | 507 | void showMessage(String message) { 508 | //显示系统消息 509 | showDialog( 510 | context: context, 511 | builder: (BuildContext context) => 512 | SimpleDialog( 513 | // title: Text("消息"), 514 | children: [ 515 | Center( 516 | child: Text(message), 517 | ) 518 | ], 519 | )); 520 | } 521 | } -------------------------------------------------------------------------------- /lib/utils/util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:convert/convert.dart'; 3 | import 'package:crypto/crypto.dart' as crypto; 4 | import 'package:uuid/uuid.dart'; 5 | 6 | String md5(String data) { 7 | var content = Utf8Encoder().convert(data); 8 | var md5 = crypto.md5; 9 | var digest = md5.convert(content); 10 | var password = hex.encode(digest.bytes); 11 | return password; 12 | } 13 | 14 | String uuid(){ 15 | return Uuid().v4().toString().replaceAll("-", ""); 16 | } 17 | 18 | String convertToCountryCode(String description){ 19 | switch(description){ 20 | case "简体中文": 21 | return "zh_Hans"; 22 | default: 23 | return "en"; 24 | } 25 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.4.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "2.0.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.0.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.1.3" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.0.1" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.14.13" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "2.1.4" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "0.1.3" 67 | fake_async: 68 | dependency: transitive 69 | description: 70 | name: fake_async 71 | url: "https://pub.flutter-io.cn" 72 | source: hosted 73 | version: "1.1.0" 74 | flutter: 75 | dependency: "direct main" 76 | description: flutter 77 | source: sdk 78 | version: "0.0.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | http: 85 | dependency: "direct main" 86 | description: 87 | name: http 88 | url: "https://pub.flutter-io.cn" 89 | source: hosted 90 | version: "0.12.2" 91 | http_parser: 92 | dependency: transitive 93 | description: 94 | name: http_parser 95 | url: "https://pub.flutter-io.cn" 96 | source: hosted 97 | version: "3.1.4" 98 | intl: 99 | dependency: "direct main" 100 | description: 101 | name: intl 102 | url: "https://pub.flutter-io.cn" 103 | source: hosted 104 | version: "0.16.1" 105 | matcher: 106 | dependency: transitive 107 | description: 108 | name: matcher 109 | url: "https://pub.flutter-io.cn" 110 | source: hosted 111 | version: "0.12.8" 112 | meta: 113 | dependency: transitive 114 | description: 115 | name: meta 116 | url: "https://pub.flutter-io.cn" 117 | source: hosted 118 | version: "1.1.8" 119 | path: 120 | dependency: transitive 121 | description: 122 | name: path 123 | url: "https://pub.flutter-io.cn" 124 | source: hosted 125 | version: "1.7.0" 126 | pedantic: 127 | dependency: transitive 128 | description: 129 | name: pedantic 130 | url: "https://pub.flutter-io.cn" 131 | source: hosted 132 | version: "1.9.0" 133 | sky_engine: 134 | dependency: transitive 135 | description: flutter 136 | source: sdk 137 | version: "0.0.99" 138 | source_span: 139 | dependency: transitive 140 | description: 141 | name: source_span 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "1.7.0" 145 | stack_trace: 146 | dependency: transitive 147 | description: 148 | name: stack_trace 149 | url: "https://pub.flutter-io.cn" 150 | source: hosted 151 | version: "1.9.5" 152 | stream_channel: 153 | dependency: transitive 154 | description: 155 | name: stream_channel 156 | url: "https://pub.flutter-io.cn" 157 | source: hosted 158 | version: "2.0.0" 159 | string_scanner: 160 | dependency: transitive 161 | description: 162 | name: string_scanner 163 | url: "https://pub.flutter-io.cn" 164 | source: hosted 165 | version: "1.0.5" 166 | term_glyph: 167 | dependency: transitive 168 | description: 169 | name: term_glyph 170 | url: "https://pub.flutter-io.cn" 171 | source: hosted 172 | version: "1.1.0" 173 | test_api: 174 | dependency: transitive 175 | description: 176 | name: test_api 177 | url: "https://pub.flutter-io.cn" 178 | source: hosted 179 | version: "0.2.17" 180 | typed_data: 181 | dependency: transitive 182 | description: 183 | name: typed_data 184 | url: "https://pub.flutter-io.cn" 185 | source: hosted 186 | version: "1.2.0" 187 | uuid: 188 | dependency: "direct main" 189 | description: 190 | name: uuid 191 | url: "https://pub.flutter-io.cn" 192 | source: hosted 193 | version: "2.2.0" 194 | vector_math: 195 | dependency: transitive 196 | description: 197 | name: vector_math 198 | url: "https://pub.flutter-io.cn" 199 | source: hosted 200 | version: "2.0.8" 201 | sdks: 202 | dart: ">=2.9.0-14.0.dev <3.0.0" 203 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: socialvertexflutter 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | uuid: ^2.2.0 32 | http: ^0.12.2 33 | intl: ^0.16.1 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://dart.dev/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | assets: 50 | - assets/images/ 51 | - assets/i18n/ 52 | 53 | # To add assets to your application, add an assets section, like this: 54 | # assets: 55 | # - images/a_dot_burr.jpeg 56 | # - images/a_dot_ham.jpeg 57 | 58 | # An image asset can refer to one or more resolution-specific "variants", see 59 | # https://flutter.dev/assets-and-images/#resolution-aware. 60 | 61 | # For details regarding adding assets from package dependencies, see 62 | # https://flutter.dev/assets-and-images/#from-packages 63 | 64 | # To add custom fonts to your application, add a fonts section here, 65 | # in this "flutter" section. Each entry in this list should have a 66 | # "family" key with the font family name, and a "fonts" key with a 67 | # list giving the asset and other descriptors for the font. For 68 | # example: 69 | # fonts: 70 | # - family: Schyler 71 | # fonts: 72 | # - asset: fonts/Schyler-Regular.ttf 73 | # - asset: fonts/Schyler-Italic.ttf 74 | # style: italic 75 | # - family: Trajan Pro 76 | # fonts: 77 | # - asset: fonts/TrajanPro.ttf 78 | # - asset: fonts/TrajanPro_Bold.ttf 79 | # weight: 700 80 | # 81 | # For details regarding fonts from package dependencies, 82 | # see https://flutter.dev/custom-fonts/#from-packages 83 | -------------------------------------------------------------------------------- /test/utils/util_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:socialvertexflutter/utils/util.dart'; 5 | 6 | import 'package:uuid/uuid.dart'; 7 | 8 | void main() { 9 | test('test md5 encoding function', () { 10 | var result = md5("123456"); 11 | expect(result, "e10adc3949ba59abbe56e057f20f883e"); 12 | }); 13 | 14 | test('test uuid', () { 15 | 16 | var uuid = new Uuid(); 17 | 18 | print(uuid.v4().toString().replaceAll("-", "")); 19 | 20 | List colors = ['red', 'green', 'blue', 'orange', 'pink', ...["test"]]; 21 | print(colors); 22 | }); 23 | 24 | test('test utf-8',(){ 25 | var map = {"测试":"test"}; 26 | print(json.encode(map)); 27 | }); 28 | } -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | testWidgets('smoke test', (WidgetTester tester) async { 7 | Map map = json.decode("{}"); 8 | print(map); 9 | }); 10 | } --------------------------------------------------------------------------------