├── _config.yml ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-ldpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── xiaour_app │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── splash.jpg ├── Runner │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── icon-29.png │ │ │ ├── icon-40.png │ │ │ ├── icon-76.png │ │ │ ├── icon-1024.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-20-ipad.png │ │ │ ├── icon-29-ipad.png │ │ │ ├── icon-83.5@2x.png │ │ │ ├── icon-20@2x-ipad.png │ │ │ ├── icon-29@2x-ipad.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@1x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Podfile.lock └── Podfile ├── assets └── images │ ├── LOGO.png │ └── splash.jpg ├── lib ├── constants │ ├── System.dart │ └── Tips.dart ├── model │ ├── UserModel.dart │ └── MessageModel.dart ├── main.dart ├── event │ └── ChatEvent.dart ├── setting │ └── SettingPage.dart ├── ChatListState.dart └── chat │ └── ChatToUser.dart ├── .metadata ├── pubspec.yaml ├── README.md ├── test └── widget_test.dart ├── .gitignore └── pubspec.lock /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/splash.jpg -------------------------------------------------------------------------------- /assets/images/LOGO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/assets/images/LOGO.png -------------------------------------------------------------------------------- /assets/images/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/assets/images/splash.jpg -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaour/flutter-im/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /lib/constants/System.dart: -------------------------------------------------------------------------------- 1 | const String APP_NAME = "妙传"; 2 | 3 | const String APP_VERSION = "v1.0"; 4 | 5 | const String WS_DOMAIN = "msg_ws_url_domain"; 6 | 7 | const String WS_MSG = "msg_ws_"; 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /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 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /lib/constants/Tips.dart: -------------------------------------------------------------------------------- 1 | const String DEVICE_NOT_FOUND = "服务连接成功,但未发现设备"; 2 | 3 | const String DEVICE_REFRESH = "已刷新设备列表"; 4 | 5 | const String WS_SERVER_IS_ERROR = "服务地址填写不正确!"; 6 | 7 | const String WS_SERVER_NOT_CONNECT = "未连接到服务器\n点击右上角设置按钮进行配置!\n如果已经设置请下拉刷新。"; 8 | 9 | const String SAVE_SERVER_SUCCESS = "服务器地址连接保存成功!"; 10 | 11 | const String IS_CLEAR_CACHE = "确定要清除历史消息吗?"; 12 | 13 | const String CONTENT_COPY = "内容已复制到剪切板"; 14 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/xiaour_app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.xiaour_app; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/model/UserModel.dart: -------------------------------------------------------------------------------- 1 | class UserModel { 2 | final String currentUserId; 3 | final String currentUserName; 4 | final List userList; 5 | final int count; 6 | 7 | UserModel( 8 | {this.currentUserId, this.currentUserName, this.userList, this.count}); 9 | factory UserModel.fromJson(Map json) { 10 | return new UserModel( 11 | currentUserId: json['currentUserId'], 12 | currentUserName: json['currentUserName'], 13 | userList: json['userList'], 14 | count: json['count']); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:xiaour_app/ChatListState.dart'; 3 | import 'package:xiaour_app/constants/System.dart'; 4 | 5 | void main() => runApp(new MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return new MaterialApp( 11 | debugShowCheckedModeBanner: false, 12 | title: APP_NAME, 13 | theme: new ThemeData( 14 | primaryColor: Colors.white, 15 | ), 16 | home: new ChatList(), 17 | ); 18 | } 19 | } 20 | 21 | class ChatList extends StatefulWidget { 22 | @override 23 | createState() => new ChatListState(); 24 | } 25 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: xiaour_app 2 | description: 一个传输工具 3 | version: 1.0.0+1 4 | 5 | environment: 6 | sdk: ">=2.1.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | cupertino_icons: ^0.1.2 12 | shared_preferences: ^0.4.3 13 | fluttertoast: ^2.1.1 14 | web_socket_channel: ^1.0.15 15 | badges: ^1.1.0 16 | flutter_bubble: ^0.0.1 17 | json_serializable: ^3.2.2 18 | event_bus: ^1.1.0 19 | device_info: ^0.4.0+2 20 | url_launcher: ^5.1.2 21 | image_picker: ^0.5.4+3 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | 27 | flutter: 28 | 29 | assets: 30 | - assets/images/splash.jpg 31 | - assets/images/LOGO.png 32 | 33 | uses-material-design: true 34 | 35 | 36 | -------------------------------------------------------------------------------- /lib/event/ChatEvent.dart: -------------------------------------------------------------------------------- 1 | import 'package:event_bus/event_bus.dart'; 2 | import 'package:xiaour_app/model/MessageModel.dart'; 3 | 4 | //Bus初始化 5 | EventBus eventBus = EventBus(); 6 | 7 | class ChatListEvent { 8 | List msgList; 9 | ChatListEvent(List msgList) { 10 | this.msgList = msgList; 11 | } 12 | } 13 | 14 | //发送消息 15 | class SendChatEvent { 16 | MessageModel messageModel; 17 | SendChatEvent(MessageModel model) { 18 | this.messageModel = model; 19 | } 20 | } 21 | 22 | //跳转事件 23 | class JumpEvent { 24 | String toUser; 25 | String currentUser; 26 | 27 | JumpEvent(String currentUser, String toUser) { 28 | this.toUser = toUser; 29 | this.currentUser = currentUser; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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 | "idiom" : "iphone", 20 | "scale" : "1x" 21 | }, 22 | { 23 | "idiom" : "iphone", 24 | "scale" : "2x" 25 | }, 26 | { 27 | "idiom" : "iphone", 28 | "scale" : "3x" 29 | } 30 | ], 31 | "info" : { 32 | "version" : 1, 33 | "author" : "xcode" 34 | } 35 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 妙传IM 2 | 3 | 这是一个基于Flutter的IM客户端项目,服务端依托webchat,需要将webchat服务部署后即可打包使用,是一个局域网测试调试传输的工具。当然也可以将服务部署到公网。只需在设置中将连接改为相应地址。 4 | 5 | ## 部署: 6 | #### 获取 webchat -> https://github.com/xiaour/webchat.git 7 | - 1.webchat(妙传服务端) 需要java环境支持,在打包后部署jar即可 8 | - 2.flutter-im(妙传客户端) 需要根据想要打包的客户端进行安装,flutter 安装步骤请参考官方文档。 9 | - 3.在环境配置完成后,选择相应设备进行安装客户端。打开客户端配置好webchat的连接地址,如果不修改端口和项目名称webchat地址是"http://your.ip:8099/webchat"。 10 | - 4.flutter-im(妙传客户端) 在手机上安装后,需要在设置中输入"ws://your.ip:8099/webchat",之后重新打开客户端或者点击首页刷新按钮,即可连接到服务器。 11 | 12 | ## 使用: 13 | - 1.浏览器打开部署的webchat(妙传服务端)地址,默认端口8099. 14 | ![image](https://oscimg.oschina.net/oscnet/6ea943d0a08edf9d0f6b7677ad2bbdcde33.jpg) 15 | - 2.在移动端设置中填写webchat的IP和端口,保存后刷新设备列表。这时,就可以跨设备使用我们的IM啦! 16 | ![image](https://oscimg.oschina.net/oscnet/afed443ce11b8a756b01e0d20232c770838.jpg) 17 | 18 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:xiaour_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/model/MessageModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | @JsonSerializable(nullable: false) 4 | class MessageModel { 5 | final String msg;//消息内容(如果内容是图片,这里就是URL) 6 | final String fromUserName;//发消息者 7 | final String fromSessionId;//发消息者sessionId 8 | final String to;//接收者 9 | final String msgId;//消息唯一ID 10 | final int msgType;//消息类型(1:文本内容,2:图片) 11 | final int type;//消息类型(1:群组,2:1对1) 12 | 13 | 14 | MessageModel( 15 | {this.msg, 16 | this.fromUserName, 17 | this.fromSessionId, 18 | this.to, 19 | this.type, 20 | this.msgType, 21 | this.msgId}); 22 | factory MessageModel.fromJson(Map json) { 23 | return new MessageModel( 24 | msg: json['msg'], 25 | msgId: json["msgId"], 26 | msgType: json["msgType"], 27 | fromUserName: json['fromUserName'], 28 | fromSessionId: json['fromSessionId'], 29 | to: json['to'], 30 | type: json['type'], 31 | ); 32 | } 33 | 34 | String toJsonString() { 35 | return "{\"msg\":\"" + 36 | msg + 37 | "\",\"fromUserName\":\"" + 38 | fromUserName + 39 | "\",\"msgId\":\"" + 40 | msgId + 41 | "\"" 42 | ",\"fromSessionId\":\"" + 43 | fromSessionId + 44 | "\",\"to\":\"" + 45 | to + 46 | "\",\"type\":" + 47 | type.toString() + 48 | "}"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | 妙传 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 | NSPhotoLibraryUsageDescription 45 | 在发送照片时打开此功能 46 | NSCameraUsageDescription 47 | 当您选择拍照时打开您的摄像头 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - device_info (0.0.1): 3 | - Flutter 4 | - Flutter (1.0.0) 5 | - flutter_bubble (0.0.1): 6 | - Flutter 7 | - fluttertoast (0.0.2): 8 | - Flutter 9 | - image_picker (0.0.1): 10 | - Flutter 11 | - shared_preferences (0.0.1): 12 | - Flutter 13 | - url_launcher (0.0.1): 14 | - Flutter 15 | 16 | DEPENDENCIES: 17 | - device_info (from `.symlinks/plugins/device_info/ios`) 18 | - Flutter (from `.symlinks/flutter/ios`) 19 | - flutter_bubble (from `.symlinks/plugins/flutter_bubble/ios`) 20 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) 21 | - image_picker (from `.symlinks/plugins/image_picker/ios`) 22 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 23 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 24 | 25 | EXTERNAL SOURCES: 26 | device_info: 27 | :path: ".symlinks/plugins/device_info/ios" 28 | Flutter: 29 | :path: ".symlinks/flutter/ios" 30 | flutter_bubble: 31 | :path: ".symlinks/plugins/flutter_bubble/ios" 32 | fluttertoast: 33 | :path: ".symlinks/plugins/fluttertoast/ios" 34 | image_picker: 35 | :path: ".symlinks/plugins/image_picker/ios" 36 | shared_preferences: 37 | :path: ".symlinks/plugins/shared_preferences/ios" 38 | url_launcher: 39 | :path: ".symlinks/plugins/url_launcher/ios" 40 | 41 | SPEC CHECKSUMS: 42 | device_info: 3ebad48f726348f69abd802f3334a8d1ed795fbd 43 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 44 | flutter_bubble: b921aa40cef2e1dd1232a775ad3ec37499f3e128 45 | fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b 46 | image_picker: 16e5fec1fbc87fd3b297c53e4048521eaf17cd06 47 | shared_preferences: 1feebfa37bb57264736e16865e7ffae7fc99b523 48 | url_launcher: 0067ddb8f10d36786672aa0722a21717dba3a298 49 | 50 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09 51 | 52 | COCOAPODS: 1.7.5 53 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.xiaour_app" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | 63 | buildscript { 64 | repositories { 65 | // google() 66 | // jcenter() 67 | 68 | maven { url 'https://maven.aliyun.com/repository/google' } 69 | maven { url 'https://maven.aliyun.com/repository/jcenter' } 70 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } 71 | } 72 | 73 | dependencies { 74 | classpath 'com.android.tools.build:gradle:3.3.0' 75 | } 76 | } 77 | 78 | allprojects { 79 | repositories { 80 | // google() 81 | // jcenter() 82 | maven { url 'https://maven.aliyun.com/repository/google' } 83 | maven { url 'https://maven.aliyun.com/repository/jcenter' } 84 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } 85 | } 86 | } -------------------------------------------------------------------------------- /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 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@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-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/setting/SettingPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | import 'package:fluttertoast/fluttertoast.dart'; 5 | import 'package:url_launcher/url_launcher.dart'; 6 | import 'package:xiaour_app/constants/Tips.dart'; 7 | 8 | class SettingPage extends StatefulWidget { 9 | String deviceName; 10 | 11 | SettingPage({Key key, this.deviceName}) : super(key: key); 12 | 13 | @override 14 | State createState() => SettingPageState(deviceName:deviceName); 15 | } 16 | 17 | class SettingPageState extends State { 18 | String deviceName; 19 | SettingPageState({Key key, this.deviceName}); 20 | final String WS_DOMAIN = "msg_ws_url_domain"; 21 | var size = FontWeight.w500; // 定义一个字体类型 22 | var _isExpanded = false; 23 | 24 | TextEditingController domainController = TextEditingController(); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | Future domain = _getConnect(WS_DOMAIN); 29 | domain.then((String domain) { 30 | domainController.text = domain; 31 | }); 32 | 33 | return Scaffold( 34 | appBar: AppBar( 35 | title: Text('设置'), 36 | ), 37 | body: Container( 38 | decoration: BoxDecoration(color: Colors.white), 39 | child: Column( 40 | children: [ 41 | new Text(""), 42 | ListTile( 43 | title: Text( 44 | '设备名称:'+this.deviceName, 45 | style: TextStyle(fontWeight: size), 46 | ), 47 | leading: Icon(Icons.account_circle, color: Colors.deepOrange), 48 | ), 49 | // 分割线 50 | new Divider(), 51 | 52 | SingleChildScrollView( 53 | child: ExpansionPanelList( 54 | children: [ 55 | ExpansionPanel( 56 | headerBuilder: (context, isExpanded) { 57 | return ListTile( 58 | title: Text( 59 | '服务器设置', 60 | style: TextStyle(fontWeight: size), 61 | ), 62 | leading: 63 | Icon(Icons.language, color: Colors.lightBlue), 64 | ); 65 | }, 66 | body: Padding( 67 | padding: EdgeInsets.fromLTRB(15, 0, 15, 15), 68 | child: ListBody( 69 | children: [ 70 | new TextField( 71 | textInputAction: TextInputAction.done, 72 | controller: domainController, 73 | decoration: InputDecoration( 74 | contentPadding: EdgeInsets.all(8.0), 75 | hintText: '请输入域名或IP地址', 76 | border: OutlineInputBorder( 77 | borderSide: 78 | BorderSide(color: Colors.transparent), 79 | borderRadius: 80 | BorderRadius.all(Radius.circular(6)), 81 | ), 82 | //fillColor: Colors.lightBlue, filled: true, 83 | ), 84 | ), 85 | Text(""), 86 | RaisedButton( 87 | splashColor: Colors.green, 88 | onPressed: _saveConnect, 89 | child: Text('保存连接'), 90 | ), 91 | ], 92 | ), 93 | ), 94 | isExpanded: _isExpanded, 95 | canTapOnHeader: true, 96 | ), 97 | ], 98 | expansionCallback: (panelIndex, isExpanded) { 99 | setState(() { 100 | _isExpanded = !isExpanded; 101 | }); 102 | }, 103 | animationDuration: kThemeAnimationDuration, 104 | ), 105 | ), 106 | new Divider(), 107 | ListTile( 108 | title: Text( 109 | '在线帮助文档', 110 | style: TextStyle(fontWeight: size), 111 | ), 112 | subtitle: Text("不清楚如何配置?点我试试!"), 113 | leading: Icon(Icons.assignment, color: Colors.teal), 114 | onTap: this.openHelp, 115 | ), 116 | ], 117 | ), 118 | )); 119 | } 120 | 121 | Future _getConnect(String key) async { 122 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 123 | return sharedPreferences.get(key); 124 | } 125 | 126 | void _saveConnect() { 127 | if (domainController.text.length == 0) { 128 | showDialog( 129 | context: context, 130 | builder: (context) => AlertDialog( 131 | title: Text(WS_SERVER_IS_ERROR), 132 | )); 133 | } 134 | 135 | this._saveWsConnect(domainController.text); 136 | 137 | Fluttertoast.showToast( 138 | msg: SAVE_SERVER_SUCCESS, 139 | toastLength: Toast.LENGTH_SHORT, 140 | gravity: ToastGravity.CENTER, 141 | timeInSecForIos: 1, 142 | ); 143 | domainController.clear(); 144 | Navigator.pop(context, "EVENT_SUCCESS"); 145 | } 146 | 147 | 148 | //保存WebService连接串 149 | void _saveWsConnect(String domain) async { 150 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 151 | sharedPreferences.setString(WS_DOMAIN, domain); 152 | } 153 | 154 | void openHelp() async { 155 | // url 156 | const url = "https://github.com/xiaour/flutter-im/blob/master/README.md"; 157 | await launch(url); 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /lib/ChatListState.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | import 'package:fluttertoast/fluttertoast.dart'; 6 | import 'package:shared_preferences/shared_preferences.dart'; 7 | import 'package:xiaour_app/chat/ChatToUser.dart'; 8 | import 'package:xiaour_app/constants/System.dart'; 9 | import 'package:xiaour_app/main.dart'; 10 | import 'package:xiaour_app/model/MessageModel.dart'; 11 | import 'package:xiaour_app/model/UserModel.dart'; 12 | import 'package:xiaour_app/setting/SettingPage.dart'; 13 | import 'package:web_socket_channel/io.dart'; 14 | import 'package:badges/badges.dart'; 15 | import 'package:device_info/device_info.dart'; 16 | import 'dart:convert'; 17 | import 'constants/Tips.dart'; 18 | import 'event/ChatEvent.dart'; 19 | 20 | 21 | class ChatListState extends State { 22 | final _biggerFont = const TextStyle(fontSize: 18.0); 23 | final _saved = new Map(); 24 | 25 | bool connectionFlag = false; 26 | UserModel userModel; 27 | String device; 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | _getDeviceInfo(); 33 | _connectServerAndReceive(); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | UserModel model = this.userModel; 39 | if (this.connectionFlag) { 40 | return new Scaffold( 41 | appBar: new AppBar( 42 | title: new Text(APP_NAME), 43 | actions: [ 44 | // 非隐藏的菜单 45 | new IconButton( 46 | icon: new Icon(Icons.settings), 47 | tooltip: '设置', 48 | onPressed: () { 49 | Navigator.push( 50 | context, 51 | new MaterialPageRoute( 52 | builder: (context) => new SettingPage(deviceName:this.device))); 53 | }), 54 | ], 55 | ), 56 | body: _buildSuggestions(model), 57 | ); 58 | } else { 59 | return new Scaffold( 60 | appBar: new AppBar( 61 | title: new Text(APP_NAME), 62 | actions: [ 63 | // 非隐藏的菜单 64 | new IconButton( 65 | icon: new Icon(Icons.settings), 66 | tooltip: '设置', 67 | onPressed: () { 68 | Navigator.push( 69 | context, 70 | new MaterialPageRoute( 71 | builder: (context) => new SettingPage(deviceName:this.device))); 72 | }), 73 | ], 74 | ), 75 | body: _buildNotConnect(), 76 | ); 77 | } 78 | } 79 | 80 | //获取设备信息 81 | void _getDeviceInfo() async { 82 | String tempDevice = "UNKONW"; 83 | DeviceInfoPlugin deviceInfo = new DeviceInfoPlugin(); 84 | if (Platform.isIOS) { 85 | IosDeviceInfo iosInfo = await deviceInfo.iosInfo; 86 | tempDevice = iosInfo.model + "_" + iosInfo.name; 87 | } else if (Platform.isAndroid) { 88 | AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; 89 | tempDevice = androidInfo.brand + "_" + androidInfo.id; 90 | } 91 | setState(() { 92 | device = tempDevice; 93 | }); 94 | } 95 | 96 | //连接或接收消息 97 | void _connectServerAndReceive() async { 98 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 99 | if (sharedPreferences.get(WS_DOMAIN) == null) { 100 | setState(() { 101 | connectionFlag = false; 102 | }); 103 | return; 104 | } 105 | 106 | String wsUrl = sharedPreferences.get(WS_DOMAIN) + "/echo"; 107 | 108 | Map myHeaders = {"device": device}; 109 | 110 | final channel = new IOWebSocketChannel.connect(wsUrl, headers: myHeaders); 111 | channel.stream.listen((message) { 112 | print(message); 113 | _listen(channel); 114 | Map jsonMap = jsonDecode(message); 115 | //是否是登录的返回 116 | if (jsonMap.containsKey("userList")) { 117 | setState(() { 118 | connectionFlag = true; 119 | userModel = UserModel.fromJson(jsonMap); 120 | }); 121 | } else { 122 | //如果是针对用户的消息 123 | MessageModel messageModel = MessageModel.fromJson(jsonMap); 124 | List list = 125 | sharedPreferences.getStringList(WS_MSG + messageModel.fromUserName); 126 | if (list == null) { 127 | list = []; 128 | } else if (list.length >= 100) { 129 | list.removeAt(0); 130 | } 131 | list.add(messageModel.toJsonString()); 132 | //修剪List长度存储到缓存 133 | int count = 1; 134 | if (_saved.containsKey(messageModel.fromUserName)) { 135 | count += _saved[messageModel.fromUserName]; 136 | } 137 | Map countMap = {messageModel.fromUserName: count}; 138 | sharedPreferences.setStringList( 139 | WS_MSG + messageModel.fromUserName, list); 140 | 141 | List msgList = new List(); 142 | if (list == null) { 143 | print("没有消息!"); 144 | return; 145 | } 146 | print(messageModel.toJsonString()); 147 | list.forEach((f) { 148 | Map jsonMap = jsonDecode(f); 149 | msgList.add(MessageModel.fromJson(jsonMap)); 150 | }); 151 | 152 | setState(() { 153 | _saved.addAll(countMap); 154 | //发送事件到子页面 155 | eventBus.fire(new ChatListEvent(msgList)); 156 | }); 157 | } 158 | }); 159 | 160 | Fluttertoast.showToast( 161 | msg: DEVICE_REFRESH, 162 | toastLength: Toast.LENGTH_SHORT, 163 | gravity: ToastGravity.CENTER, 164 | timeInSecForIos: 1, 165 | ); 166 | } 167 | 168 | //监听事件 169 | void _listen(IOWebSocketChannel socketChannel) { 170 | eventBus.on().listen((event) { 171 | print(event.messageModel.toJsonString()); 172 | socketChannel.sink.add(event.messageModel.toJsonString()); 173 | }); 174 | } 175 | 176 | Future _refresh() async { 177 | _connectServerAndReceive(); 178 | return; 179 | } 180 | 181 | Widget _buildNotConnect() { 182 | return new MaterialApp( 183 | title: APP_NAME, 184 | debugShowCheckedModeBanner: false, 185 | home: new RefreshIndicator( 186 | onRefresh: _refresh, 187 | child: Container( 188 | child: new Column(children: [ 189 | new Text(WS_SERVER_NOT_CONNECT, 190 | textAlign: TextAlign.center, 191 | style: TextStyle(color: Colors.orangeAccent, fontSize: 18.0)), 192 | new IconButton( 193 | icon: Icon(Icons.refresh), 194 | onPressed: () { 195 | this._connectServerAndReceive(); 196 | }), 197 | ]), 198 | alignment: Alignment.center, 199 | margin: EdgeInsets.only(top: 200.0), 200 | ), 201 | ), 202 | ); 203 | } 204 | 205 | Widget _buildSuggestions(UserModel model) { 206 | if (model.count > 0) { 207 | return new RefreshIndicator( 208 | onRefresh: _refresh, 209 | //backgroundColor: Colors.blue, 210 | child: new ListView.separated( 211 | itemCount: model.userList.length, 212 | padding: const EdgeInsets.all(15.0), 213 | // 注意,在小屏幕上,分割线看起来可能比较吃力。 214 | itemBuilder: (context, i) { 215 | // 在每一列之前,添加一个1像素高的分隔线widget 216 | //if (i.isOdd) return new Divider(); 217 | return _buildRow(model.userList[i]); 218 | }, 219 | separatorBuilder: (BuildContext context, int index) => 220 | new Divider(), 221 | )); 222 | } else { 223 | return new MaterialApp( 224 | title: APP_NAME, 225 | debugShowCheckedModeBanner: false, 226 | home: new Scaffold( 227 | body: Center( 228 | child: Container( 229 | child: new Column(children: [ 230 | new Text(DEVICE_NOT_FOUND, 231 | textAlign: TextAlign.center, 232 | style: 233 | TextStyle(color: Colors.orangeAccent, fontSize: 18.0)), 234 | new IconButton( 235 | icon: Icon(Icons.refresh), 236 | onPressed: () { 237 | this._connectServerAndReceive(); 238 | }), 239 | ]), 240 | alignment: Alignment.center, 241 | margin: EdgeInsets.only(top: 200.0), 242 | ), 243 | ), 244 | ), 245 | ); 246 | } 247 | } 248 | 249 | Widget _buildRow(String userName) { 250 | final alreadySaved = _saved.containsKey(userName); 251 | final count = alreadySaved == true ? _saved[userName] : 0; 252 | return new ListTile( 253 | leading: CircleAvatar( 254 | backgroundImage: 255 | NetworkImage("https://static.suiyueyule.com/user_icon.png"), 256 | ), 257 | title: new Text( 258 | userName, 259 | style: _biggerFont, 260 | ), 261 | trailing: new Badge( 262 | showBadge: alreadySaved, 263 | badgeContent: Text(count.toString(), 264 | style: new TextStyle( 265 | decorationColor: const Color(0xffffffff), //线的颜色 266 | decorationStyle: TextDecorationStyle 267 | .solid, //文字装饰的风格 dashed,dotted虚线(简短间隔大小区分) double三条线 solid两条线 268 | color: const Color(0xffffffff), //文字颜色 269 | )), 270 | animationType: BadgeAnimationType.scale, 271 | ), 272 | onTap: () { 273 | //点击事件 274 | setState(() { 275 | _saved.remove(userName); 276 | }); 277 | 278 | Navigator.push( 279 | context, 280 | new MaterialPageRoute( 281 | builder: (context) => ChatToUser( 282 | currentUser: userModel.currentUserName, toUser: userName))); 283 | }, 284 | ); 285 | } 286 | } 287 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "0.38.2" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.3.0" 25 | badges: 26 | dependency: "direct main" 27 | description: 28 | name: badges 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.1.0" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.0.5" 39 | build: 40 | dependency: transitive 41 | description: 42 | name: build 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "1.1.6" 46 | build_config: 47 | dependency: transitive 48 | description: 49 | name: build_config 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "0.4.1+1" 53 | charcode: 54 | dependency: transitive 55 | description: 56 | name: charcode 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "1.1.2" 60 | checked_yaml: 61 | dependency: transitive 62 | description: 63 | name: checked_yaml 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "1.0.2" 67 | collection: 68 | dependency: transitive 69 | description: 70 | name: collection 71 | url: "https://pub.flutter-io.cn" 72 | source: hosted 73 | version: "1.14.11" 74 | convert: 75 | dependency: transitive 76 | description: 77 | name: convert 78 | url: "https://pub.flutter-io.cn" 79 | source: hosted 80 | version: "2.1.1" 81 | crypto: 82 | dependency: transitive 83 | description: 84 | name: crypto 85 | url: "https://pub.flutter-io.cn" 86 | source: hosted 87 | version: "2.1.2" 88 | csslib: 89 | dependency: transitive 90 | description: 91 | name: csslib 92 | url: "https://pub.flutter-io.cn" 93 | source: hosted 94 | version: "0.16.1" 95 | cupertino_icons: 96 | dependency: "direct main" 97 | description: 98 | name: cupertino_icons 99 | url: "https://pub.flutter-io.cn" 100 | source: hosted 101 | version: "0.1.2" 102 | dart_style: 103 | dependency: transitive 104 | description: 105 | name: dart_style 106 | url: "https://pub.flutter-io.cn" 107 | source: hosted 108 | version: "1.2.10" 109 | device_info: 110 | dependency: "direct main" 111 | description: 112 | name: device_info 113 | url: "https://pub.flutter-io.cn" 114 | source: hosted 115 | version: "0.4.0+2" 116 | event_bus: 117 | dependency: "direct main" 118 | description: 119 | name: event_bus 120 | url: "https://pub.flutter-io.cn" 121 | source: hosted 122 | version: "1.1.0" 123 | flutter: 124 | dependency: "direct main" 125 | description: flutter 126 | source: sdk 127 | version: "0.0.0" 128 | flutter_bubble: 129 | dependency: "direct main" 130 | description: 131 | name: flutter_bubble 132 | url: "https://pub.flutter-io.cn" 133 | source: hosted 134 | version: "0.0.1" 135 | flutter_test: 136 | dependency: "direct dev" 137 | description: flutter 138 | source: sdk 139 | version: "0.0.0" 140 | fluttertoast: 141 | dependency: "direct main" 142 | description: 143 | name: fluttertoast 144 | url: "https://pub.flutter-io.cn" 145 | source: hosted 146 | version: "2.2.11" 147 | front_end: 148 | dependency: transitive 149 | description: 150 | name: front_end 151 | url: "https://pub.flutter-io.cn" 152 | source: hosted 153 | version: "0.1.24" 154 | glob: 155 | dependency: transitive 156 | description: 157 | name: glob 158 | url: "https://pub.flutter-io.cn" 159 | source: hosted 160 | version: "1.1.7" 161 | html: 162 | dependency: transitive 163 | description: 164 | name: html 165 | url: "https://pub.flutter-io.cn" 166 | source: hosted 167 | version: "0.14.0+2" 168 | image_picker: 169 | dependency: "direct main" 170 | description: 171 | name: image_picker 172 | url: "https://pub.flutter-io.cn" 173 | source: hosted 174 | version: "0.5.4+3" 175 | json_annotation: 176 | dependency: transitive 177 | description: 178 | name: json_annotation 179 | url: "https://pub.flutter-io.cn" 180 | source: hosted 181 | version: "3.0.0" 182 | json_serializable: 183 | dependency: "direct main" 184 | description: 185 | name: json_serializable 186 | url: "https://pub.flutter-io.cn" 187 | source: hosted 188 | version: "3.2.2" 189 | kernel: 190 | dependency: transitive 191 | description: 192 | name: kernel 193 | url: "https://pub.flutter-io.cn" 194 | source: hosted 195 | version: "0.3.24" 196 | logging: 197 | dependency: transitive 198 | description: 199 | name: logging 200 | url: "https://pub.flutter-io.cn" 201 | source: hosted 202 | version: "0.11.3+2" 203 | matcher: 204 | dependency: transitive 205 | description: 206 | name: matcher 207 | url: "https://pub.flutter-io.cn" 208 | source: hosted 209 | version: "0.12.5" 210 | meta: 211 | dependency: transitive 212 | description: 213 | name: meta 214 | url: "https://pub.flutter-io.cn" 215 | source: hosted 216 | version: "1.1.7" 217 | package_config: 218 | dependency: transitive 219 | description: 220 | name: package_config 221 | url: "https://pub.flutter-io.cn" 222 | source: hosted 223 | version: "1.1.0" 224 | path: 225 | dependency: transitive 226 | description: 227 | name: path 228 | url: "https://pub.flutter-io.cn" 229 | source: hosted 230 | version: "1.6.4" 231 | pedantic: 232 | dependency: transitive 233 | description: 234 | name: pedantic 235 | url: "https://pub.flutter-io.cn" 236 | source: hosted 237 | version: "1.8.0+1" 238 | pub_semver: 239 | dependency: transitive 240 | description: 241 | name: pub_semver 242 | url: "https://pub.flutter-io.cn" 243 | source: hosted 244 | version: "1.4.2" 245 | pubspec_parse: 246 | dependency: transitive 247 | description: 248 | name: pubspec_parse 249 | url: "https://pub.flutter-io.cn" 250 | source: hosted 251 | version: "0.1.5" 252 | quiver: 253 | dependency: transitive 254 | description: 255 | name: quiver 256 | url: "https://pub.flutter-io.cn" 257 | source: hosted 258 | version: "2.0.5" 259 | shared_preferences: 260 | dependency: "direct main" 261 | description: 262 | name: shared_preferences 263 | url: "https://pub.flutter-io.cn" 264 | source: hosted 265 | version: "0.4.3" 266 | sky_engine: 267 | dependency: transitive 268 | description: flutter 269 | source: sdk 270 | version: "0.0.99" 271 | source_gen: 272 | dependency: transitive 273 | description: 274 | name: source_gen 275 | url: "https://pub.flutter-io.cn" 276 | source: hosted 277 | version: "0.9.4+4" 278 | source_span: 279 | dependency: transitive 280 | description: 281 | name: source_span 282 | url: "https://pub.flutter-io.cn" 283 | source: hosted 284 | version: "1.5.5" 285 | stack_trace: 286 | dependency: transitive 287 | description: 288 | name: stack_trace 289 | url: "https://pub.flutter-io.cn" 290 | source: hosted 291 | version: "1.9.3" 292 | stream_channel: 293 | dependency: transitive 294 | description: 295 | name: stream_channel 296 | url: "https://pub.flutter-io.cn" 297 | source: hosted 298 | version: "2.0.0" 299 | string_scanner: 300 | dependency: transitive 301 | description: 302 | name: string_scanner 303 | url: "https://pub.flutter-io.cn" 304 | source: hosted 305 | version: "1.0.5" 306 | term_glyph: 307 | dependency: transitive 308 | description: 309 | name: term_glyph 310 | url: "https://pub.flutter-io.cn" 311 | source: hosted 312 | version: "1.1.0" 313 | test_api: 314 | dependency: transitive 315 | description: 316 | name: test_api 317 | url: "https://pub.flutter-io.cn" 318 | source: hosted 319 | version: "0.2.5" 320 | typed_data: 321 | dependency: transitive 322 | description: 323 | name: typed_data 324 | url: "https://pub.flutter-io.cn" 325 | source: hosted 326 | version: "1.1.6" 327 | url_launcher: 328 | dependency: "direct main" 329 | description: 330 | name: url_launcher 331 | url: "https://pub.flutter-io.cn" 332 | source: hosted 333 | version: "5.1.2" 334 | vector_math: 335 | dependency: transitive 336 | description: 337 | name: vector_math 338 | url: "https://pub.flutter-io.cn" 339 | source: hosted 340 | version: "2.0.8" 341 | watcher: 342 | dependency: transitive 343 | description: 344 | name: watcher 345 | url: "https://pub.flutter-io.cn" 346 | source: hosted 347 | version: "0.9.7+12" 348 | web_socket_channel: 349 | dependency: "direct main" 350 | description: 351 | name: web_socket_channel 352 | url: "https://pub.flutter-io.cn" 353 | source: hosted 354 | version: "1.0.15" 355 | yaml: 356 | dependency: transitive 357 | description: 358 | name: yaml 359 | url: "https://pub.flutter-io.cn" 360 | source: hosted 361 | version: "2.1.16" 362 | sdks: 363 | dart: ">=2.3.0 <3.0.0" 364 | flutter: ">=1.5.0 <2.0.0" 365 | -------------------------------------------------------------------------------- /lib/chat/ChatToUser.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | import 'package:flutter_bubble/bubble_widget.dart'; 6 | import 'package:fluttertoast/fluttertoast.dart'; 7 | import 'package:image_picker/image_picker.dart'; 8 | //import 'package:image_picker/image_picker.dart'; 9 | import 'package:shared_preferences/shared_preferences.dart'; 10 | import 'package:xiaour_app/constants/System.dart'; 11 | import 'package:xiaour_app/constants/Tips.dart'; 12 | import 'package:xiaour_app/event/ChatEvent.dart'; 13 | import 'package:xiaour_app/model/MessageModel.dart'; 14 | 15 | class ChatToUser extends StatefulWidget { 16 | final String currentUser; 17 | final String toUser; 18 | ChatToUser({Key key, @required this.currentUser, @required this.toUser}) 19 | : super(key: key); 20 | @override 21 | State createState() => ChatToUserState(); 22 | } 23 | 24 | class ChatToUserState extends State { 25 | //Tab页的控制器,可以用来定义Tab标签和内容页的坐标 26 | final TextEditingController _textController = new TextEditingController(); 27 | //List _messages = []; 28 | List _messageList = []; 29 | ScrollController _scrollController = ScrollController(); 30 | 31 | @override 32 | void initState() { 33 | _loadMessage(widget.toUser); 34 | super.initState(); 35 | _listen(); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | //发送事件到子页面 41 | eventBus.fire(new JumpEvent(null, null)); 42 | return new Scaffold( 43 | appBar: AppBar( 44 | title: Text(widget.toUser), 45 | actions: [ 46 | // 非隐藏的菜单 47 | new IconButton( 48 | icon: new Icon(Icons.info_outline), 49 | tooltip: '清理缓存', 50 | onPressed: () { 51 | clearMessageList(); 52 | }), 53 | ], 54 | ), 55 | body: new Builder(builder: (BuildContext context) { 56 | return new Column(children: [ 57 | new Flexible( 58 | child: new ListView.builder( 59 | controller: _scrollController, 60 | physics: BouncingScrollPhysics(), 61 | itemCount: _messageList.length, 62 | itemBuilder: (context, i) { 63 | return _buildRow(_messageList[i]); 64 | }, 65 | ), 66 | ), 67 | new Divider(height: 1.0), 68 | new Container( 69 | child: _buildComposer(), 70 | decoration: 71 | new BoxDecoration(color: Color.fromRGBO(241, 243, 244, 0.9)), 72 | ), 73 | ]); 74 | }), 75 | resizeToAvoidBottomPadding: true, 76 | ); 77 | } 78 | 79 | Widget _buildComposer() { 80 | return new IconTheme( 81 | data: new IconThemeData(color: Color.fromRGBO(241, 243, 244, 0.9)), 82 | child: new Container( 83 | alignment: Alignment.center, 84 | height: 45.0, 85 | margin: const EdgeInsets.all(3.0), 86 | child: new Row( 87 | children: [ 88 | new Flexible( 89 | child: new TextField( 90 | textInputAction: TextInputAction.send, 91 | controller: _textController, 92 | onSubmitted: _submitMsg, 93 | decoration: InputDecoration( 94 | contentPadding: EdgeInsets.all(10.0), 95 | hintText: "想说点儿什么?", 96 | fillColor: Colors.white, 97 | filled: true, 98 | border: OutlineInputBorder( 99 | borderSide: BorderSide.none, 100 | borderRadius: BorderRadius.all(Radius.circular(5)), 101 | ), 102 | ), 103 | ), 104 | ), 105 | new IconButton( 106 | icon: new Icon(Icons.add_circle_outline), 107 | onPressed: openAction, 108 | color: Colors.black26, 109 | ), 110 | ], 111 | ), 112 | ), 113 | ); 114 | } 115 | 116 | Future openAction() { 117 | return showModalBottomSheet( 118 | context: context, 119 | builder: (BuildContext context) { 120 | return new Column( 121 | mainAxisSize: MainAxisSize.min, 122 | children: [ 123 | new ListTile( 124 | leading: new Icon(Icons.photo_camera), 125 | title: new Text("相机拍摄"), 126 | onTap: () async { 127 | var image = await ImagePicker.pickImage(source: ImageSource.camera); 128 | Navigator.pop(context); 129 | }, 130 | ), 131 | new ListTile( 132 | leading: new Icon(Icons.photo_library), 133 | title: new Text("照片库"), 134 | onTap: () async { 135 | var image = await ImagePicker.pickImage(source: ImageSource.gallery); 136 | Navigator.pop(context); 137 | }, 138 | ), 139 | ], 140 | ); 141 | }); 142 | } 143 | 144 | Future clearMessageList() { 145 | return showDialog( 146 | context: context, 147 | builder: (context) => AlertDialog( 148 | title: Text(IS_CLEAR_CACHE), 149 | actions: [ 150 | FlatButton( 151 | child: Text('暂不'), 152 | onPressed: () { 153 | Navigator.of(context).pop(); 154 | }, 155 | ), 156 | FlatButton( 157 | child: Text('立即清除'), 158 | onPressed: () { 159 | doClear(); 160 | }, 161 | ), 162 | ], 163 | )); 164 | } 165 | 166 | /*图片控件*/ 167 | Widget _imageView(imgPath) { 168 | if (imgPath == null) { 169 | return Center( 170 | child: Text("请选择图片或拍照"), 171 | ); 172 | } else { 173 | return Image.file( 174 | imgPath, 175 | ); 176 | } 177 | } 178 | 179 | void doClear() async { 180 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 181 | sharedPreferences.remove(WS_MSG + widget.toUser); 182 | Navigator.of(context).pop(); 183 | setState(() { 184 | _messageList = new List(); 185 | }); 186 | } 187 | 188 | void _submitMsg(String text) async { 189 | if (text == null || text == "") { 190 | return; 191 | } 192 | _textController.clear(); 193 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 194 | Map map = { 195 | "fromUserName": widget.currentUser, 196 | "fromSessionId": "0", 197 | "msgId": new DateTime.now().millisecondsSinceEpoch.toString(), 198 | "msg": text, 199 | "to": widget.toUser, 200 | "type": 2 201 | }; 202 | MessageModel messageModel = MessageModel.fromJson(map); 203 | List list = sharedPreferences.getStringList(WS_MSG + widget.toUser); 204 | if (list == null) { 205 | list = []; 206 | } else if (list.length >= 100) { 207 | list.removeAt(0); 208 | } 209 | list.add(messageModel.toJsonString()); 210 | sharedPreferences.setStringList(WS_MSG + widget.toUser, list); 211 | setState(() { 212 | _messageList.add(MessageModel.fromJson(map)); 213 | }); 214 | _scrollController.animateTo( 215 | _scrollController.position.maxScrollExtent, 216 | curve: Curves.easeOut, 217 | duration: const Duration(milliseconds: 300), 218 | ); 219 | //发送到服务器 220 | eventBus.fire(new SendChatEvent(messageModel)); 221 | } 222 | 223 | //加载消息 224 | void _loadMessage(String currentUserName) async { 225 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); 226 | List list = 227 | sharedPreferences.getStringList(WS_MSG + currentUserName); 228 | 229 | List modelList = new List(); 230 | if (list == null) { 231 | print("没有消息!"); 232 | return; 233 | } 234 | 235 | list.forEach((f) { 236 | Map jsonMap = jsonDecode(f); 237 | modelList.add(MessageModel.fromJson(jsonMap)); 238 | }); 239 | 240 | setState(() { 241 | _messageList = modelList; 242 | }); 243 | } 244 | 245 | //监听主页事件 246 | void _listen() { 247 | eventBus.on().listen((event) { 248 | if (_scrollController.positions.isNotEmpty) { 249 | _scrollController.jumpTo(_scrollController.position.maxScrollExtent); 250 | } 251 | }); 252 | 253 | eventBus.on().listen((event) { 254 | setState(() { 255 | _messageList = event.msgList; 256 | }); 257 | _scrollController.animateTo( 258 | _scrollController.position.maxScrollExtent + 100, 259 | curve: Curves.easeOut, 260 | duration: const Duration(milliseconds: 300), 261 | ); 262 | }); 263 | } 264 | 265 | Widget _buildRow(MessageModel messageModel) { 266 | //这个文本框长度并不能很好地自适应英文,还需要后期进行计算调整 267 | bool _isChoiceUser = widget.toUser != messageModel.fromUserName; 268 | //文本类型处理 269 | if(messageModel.msgType == null||messageModel.msgType ==1) { 270 | double bubbleWidth = messageModel.msg.length * 25.0 > 260.0 271 | ? 265 272 | : messageModel.msg.length * 30.0; 273 | double bubbleHeight = 50.0; 274 | if (messageModel.msg.length > 20 && messageModel.msg.length < 30) { 275 | bubbleHeight = 60.0 * 1.4; 276 | } 277 | if (messageModel.msg.length > 30 && messageModel.msg.length < 60) { 278 | bubbleHeight = messageModel.msg.length / 18 * 42.0; 279 | } 280 | if (messageModel.msg.length >= 60) { 281 | bubbleHeight = messageModel.msg.length / 18 * 33.0; 282 | } 283 | 284 | return new GestureDetector( 285 | child: Padding( 286 | padding: EdgeInsets.all(4.0), 287 | child: Container( 288 | alignment: 289 | _isChoiceUser ? Alignment.centerRight : Alignment.centerLeft, 290 | child: BubbleWidget( 291 | bubbleWidth, 292 | bubbleHeight, 293 | _isChoiceUser 294 | ? Colors.green.withOpacity(0.7) 295 | : Color.fromRGBO(71, 71, 71, 0.9), 296 | _isChoiceUser 297 | ? BubbleArrowDirection.right 298 | : BubbleArrowDirection.left, 299 | arrAngle: 65, 300 | child: Text(messageModel.msg, 301 | style: TextStyle(color: Colors.white, fontSize: 17.0))))), 302 | onLongPress: () { 303 | Clipboard.setData(ClipboardData(text: messageModel.msg)); 304 | Fluttertoast.showToast( 305 | msg: CONTENT_COPY, 306 | toastLength: Toast.LENGTH_SHORT, 307 | gravity: ToastGravity.CENTER, 308 | timeInSecForIos: 1, 309 | ); 310 | }, 311 | ); 312 | }//文本类型处理 313 | 314 | /*if(messageModel.msgType == 2){ 315 | new Column( 316 | children: [ 317 | new Image.file(messageModel.msg), 318 | ] 319 | ); 320 | }*/ 321 | 322 | } 323 | } 324 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 49A071DF22F1708900B85C44 /* splash.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 49A071DE22F1708900B85C44 /* splash.jpg */; }; 15 | 91141C0855B241383F019672 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CBF14AFD859FAEA0CF2CB9B1 /* libPods-Runner.a */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 49A071DE22F1708900B85C44 /* splash.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = splash.jpg; sourceTree = ""; }; 47 | 5B838041DA3E0767D12F7B96 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 48 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 49 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 50 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 53 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 54 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 56 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 57 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 58 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 59 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | A0A704B748B641BB726313A3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 61 | CBF14AFD859FAEA0CF2CB9B1 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | CF9409AE47DA43F6160C8F68 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 71 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 72 | 91141C0855B241383F019672 /* libPods-Runner.a in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 9740EEB11CF90186004384FC /* Flutter */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 3B80C3931E831B6300D905FE /* App.framework */, 83 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 84 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 85 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 86 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 87 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 88 | ); 89 | name = Flutter; 90 | sourceTree = ""; 91 | }; 92 | 97C146E51CF9000F007C117D = { 93 | isa = PBXGroup; 94 | children = ( 95 | 49A071DE22F1708900B85C44 /* splash.jpg */, 96 | 9740EEB11CF90186004384FC /* Flutter */, 97 | 97C146F01CF9000F007C117D /* Runner */, 98 | 97C146EF1CF9000F007C117D /* Products */, 99 | E1DDA719F42580A540FBC50D /* Pods */, 100 | D46F21648C7A99A4201F75B7 /* Frameworks */, 101 | ); 102 | sourceTree = ""; 103 | }; 104 | 97C146EF1CF9000F007C117D /* Products */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 97C146EE1CF9000F007C117D /* Runner.app */, 108 | ); 109 | name = Products; 110 | sourceTree = ""; 111 | }; 112 | 97C146F01CF9000F007C117D /* Runner */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 116 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 117 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 118 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 119 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 120 | 97C147021CF9000F007C117D /* Info.plist */, 121 | 97C146F11CF9000F007C117D /* Supporting Files */, 122 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 123 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 124 | ); 125 | path = Runner; 126 | sourceTree = ""; 127 | }; 128 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 97C146F21CF9000F007C117D /* main.m */, 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | D46F21648C7A99A4201F75B7 /* Frameworks */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | CBF14AFD859FAEA0CF2CB9B1 /* libPods-Runner.a */, 140 | ); 141 | name = Frameworks; 142 | sourceTree = ""; 143 | }; 144 | E1DDA719F42580A540FBC50D /* Pods */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 5B838041DA3E0767D12F7B96 /* Pods-Runner.debug.xcconfig */, 148 | CF9409AE47DA43F6160C8F68 /* Pods-Runner.release.xcconfig */, 149 | A0A704B748B641BB726313A3 /* Pods-Runner.profile.xcconfig */, 150 | ); 151 | path = Pods; 152 | sourceTree = ""; 153 | }; 154 | /* End PBXGroup section */ 155 | 156 | /* Begin PBXNativeTarget section */ 157 | 97C146ED1CF9000F007C117D /* Runner */ = { 158 | isa = PBXNativeTarget; 159 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 160 | buildPhases = ( 161 | 3E82216FA2A07DCBC7759295 /* [CP] Check Pods Manifest.lock */, 162 | 9740EEB61CF901F6004384FC /* Run Script */, 163 | 97C146EA1CF9000F007C117D /* Sources */, 164 | 97C146EB1CF9000F007C117D /* Frameworks */, 165 | 97C146EC1CF9000F007C117D /* Resources */, 166 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 167 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 168 | EAD6D53446A34DE07B7511AC /* [CP] Embed Pods Frameworks */, 169 | ); 170 | buildRules = ( 171 | ); 172 | dependencies = ( 173 | ); 174 | name = Runner; 175 | productName = Runner; 176 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 177 | productType = "com.apple.product-type.application"; 178 | }; 179 | /* End PBXNativeTarget section */ 180 | 181 | /* Begin PBXProject section */ 182 | 97C146E61CF9000F007C117D /* Project object */ = { 183 | isa = PBXProject; 184 | attributes = { 185 | LastUpgradeCheck = 0910; 186 | ORGANIZATIONNAME = "The Chromium Authors"; 187 | TargetAttributes = { 188 | 97C146ED1CF9000F007C117D = { 189 | CreatedOnToolsVersion = 7.3.1; 190 | DevelopmentTeam = STUX8MK55J; 191 | }; 192 | }; 193 | }; 194 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 195 | compatibilityVersion = "Xcode 3.2"; 196 | developmentRegion = English; 197 | hasScannedForEncodings = 0; 198 | knownRegions = ( 199 | English, 200 | en, 201 | Base, 202 | ); 203 | mainGroup = 97C146E51CF9000F007C117D; 204 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 205 | projectDirPath = ""; 206 | projectRoot = ""; 207 | targets = ( 208 | 97C146ED1CF9000F007C117D /* Runner */, 209 | ); 210 | }; 211 | /* End PBXProject section */ 212 | 213 | /* Begin PBXResourcesBuildPhase section */ 214 | 97C146EC1CF9000F007C117D /* Resources */ = { 215 | isa = PBXResourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | 49A071DF22F1708900B85C44 /* splash.jpg in Resources */, 219 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 220 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 221 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 222 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 223 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXShellScriptBuildPhase section */ 230 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 231 | isa = PBXShellScriptBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | inputPaths = ( 236 | ); 237 | name = "Thin Binary"; 238 | outputPaths = ( 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | shellPath = /bin/sh; 242 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 243 | }; 244 | 3E82216FA2A07DCBC7759295 /* [CP] Check Pods Manifest.lock */ = { 245 | isa = PBXShellScriptBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | inputFileListPaths = ( 250 | ); 251 | inputPaths = ( 252 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 253 | "${PODS_ROOT}/Manifest.lock", 254 | ); 255 | name = "[CP] Check Pods Manifest.lock"; 256 | outputFileListPaths = ( 257 | ); 258 | outputPaths = ( 259 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | shellPath = /bin/sh; 263 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 264 | showEnvVarsInLog = 0; 265 | }; 266 | 9740EEB61CF901F6004384FC /* Run Script */ = { 267 | isa = PBXShellScriptBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | inputPaths = ( 272 | ); 273 | name = "Run Script"; 274 | outputPaths = ( 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | shellPath = /bin/sh; 278 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 279 | }; 280 | EAD6D53446A34DE07B7511AC /* [CP] Embed Pods Frameworks */ = { 281 | isa = PBXShellScriptBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | inputPaths = ( 286 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 287 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 288 | ); 289 | name = "[CP] Embed Pods Frameworks"; 290 | outputPaths = ( 291 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | shellPath = /bin/sh; 295 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 296 | showEnvVarsInLog = 0; 297 | }; 298 | /* End PBXShellScriptBuildPhase section */ 299 | 300 | /* Begin PBXSourcesBuildPhase section */ 301 | 97C146EA1CF9000F007C117D /* Sources */ = { 302 | isa = PBXSourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 306 | 97C146F31CF9000F007C117D /* main.m in Sources */, 307 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXSourcesBuildPhase section */ 312 | 313 | /* Begin PBXVariantGroup section */ 314 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 315 | isa = PBXVariantGroup; 316 | children = ( 317 | 97C146FB1CF9000F007C117D /* Base */, 318 | ); 319 | name = Main.storyboard; 320 | sourceTree = ""; 321 | }; 322 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 323 | isa = PBXVariantGroup; 324 | children = ( 325 | 97C147001CF9000F007C117D /* Base */, 326 | ); 327 | name = LaunchScreen.storyboard; 328 | sourceTree = ""; 329 | }; 330 | /* End PBXVariantGroup section */ 331 | 332 | /* Begin XCBuildConfiguration section */ 333 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 334 | isa = XCBuildConfiguration; 335 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_ANALYZER_NONNULL = YES; 339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 340 | CLANG_CXX_LIBRARY = "libc++"; 341 | CLANG_ENABLE_MODULES = YES; 342 | CLANG_ENABLE_OBJC_ARC = YES; 343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 344 | CLANG_WARN_BOOL_CONVERSION = YES; 345 | CLANG_WARN_COMMA = YES; 346 | CLANG_WARN_CONSTANT_CONVERSION = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 363 | ENABLE_NS_ASSERTIONS = NO; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 374 | MTL_ENABLE_DEBUG_INFO = NO; 375 | SDKROOT = iphoneos; 376 | TARGETED_DEVICE_FAMILY = "1,2"; 377 | VALIDATE_PRODUCT = YES; 378 | }; 379 | name = Profile; 380 | }; 381 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 382 | isa = XCBuildConfiguration; 383 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 384 | buildSettings = { 385 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 386 | CODE_SIGN_IDENTITY = "iPhone Developer"; 387 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 388 | DEVELOPMENT_TEAM = STUX8MK55J; 389 | ENABLE_BITCODE = NO; 390 | FRAMEWORK_SEARCH_PATHS = ( 391 | "$(inherited)", 392 | "$(PROJECT_DIR)/Flutter", 393 | ); 394 | INFOPLIST_FILE = Runner/Info.plist; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 396 | LIBRARY_SEARCH_PATHS = ( 397 | "$(inherited)", 398 | "$(PROJECT_DIR)/Flutter", 399 | ); 400 | PRODUCT_BUNDLE_IDENTIFIER = com.xiaour.xiaourApp; 401 | PRODUCT_NAME = "$(TARGET_NAME)"; 402 | TARGETED_DEVICE_FAMILY = "1,2"; 403 | VERSIONING_SYSTEM = "apple-generic"; 404 | }; 405 | name = Profile; 406 | }; 407 | 97C147031CF9000F007C117D /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 410 | buildSettings = { 411 | ALWAYS_SEARCH_USER_PATHS = NO; 412 | CLANG_ANALYZER_NONNULL = YES; 413 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 414 | CLANG_CXX_LIBRARY = "libc++"; 415 | CLANG_ENABLE_MODULES = YES; 416 | CLANG_ENABLE_OBJC_ARC = YES; 417 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_COMMA = YES; 420 | CLANG_WARN_CONSTANT_CONVERSION = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INFINITE_RECURSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 427 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 429 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 430 | CLANG_WARN_STRICT_PROTOTYPES = YES; 431 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 432 | CLANG_WARN_UNREACHABLE_CODE = YES; 433 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 435 | COPY_PHASE_STRIP = NO; 436 | DEBUG_INFORMATION_FORMAT = dwarf; 437 | ENABLE_STRICT_OBJC_MSGSEND = YES; 438 | ENABLE_TESTABILITY = YES; 439 | GCC_C_LANGUAGE_STANDARD = gnu99; 440 | GCC_DYNAMIC_NO_PIC = NO; 441 | GCC_NO_COMMON_BLOCKS = YES; 442 | GCC_OPTIMIZATION_LEVEL = 0; 443 | GCC_PREPROCESSOR_DEFINITIONS = ( 444 | "DEBUG=1", 445 | "$(inherited)", 446 | ); 447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 451 | GCC_WARN_UNUSED_FUNCTION = YES; 452 | GCC_WARN_UNUSED_VARIABLE = YES; 453 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 454 | MTL_ENABLE_DEBUG_INFO = YES; 455 | ONLY_ACTIVE_ARCH = YES; 456 | SDKROOT = iphoneos; 457 | TARGETED_DEVICE_FAMILY = "1,2"; 458 | }; 459 | name = Debug; 460 | }; 461 | 97C147041CF9000F007C117D /* Release */ = { 462 | isa = XCBuildConfiguration; 463 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 464 | buildSettings = { 465 | ALWAYS_SEARCH_USER_PATHS = NO; 466 | CLANG_ANALYZER_NONNULL = YES; 467 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 468 | CLANG_CXX_LIBRARY = "libc++"; 469 | CLANG_ENABLE_MODULES = YES; 470 | CLANG_ENABLE_OBJC_ARC = YES; 471 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 472 | CLANG_WARN_BOOL_CONVERSION = YES; 473 | CLANG_WARN_COMMA = YES; 474 | CLANG_WARN_CONSTANT_CONVERSION = YES; 475 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 476 | CLANG_WARN_EMPTY_BODY = YES; 477 | CLANG_WARN_ENUM_CONVERSION = YES; 478 | CLANG_WARN_INFINITE_RECURSION = YES; 479 | CLANG_WARN_INT_CONVERSION = YES; 480 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 481 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 482 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 483 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 484 | CLANG_WARN_STRICT_PROTOTYPES = YES; 485 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 486 | CLANG_WARN_UNREACHABLE_CODE = YES; 487 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 488 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 489 | COPY_PHASE_STRIP = NO; 490 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 491 | ENABLE_NS_ASSERTIONS = NO; 492 | ENABLE_STRICT_OBJC_MSGSEND = YES; 493 | GCC_C_LANGUAGE_STANDARD = gnu99; 494 | GCC_NO_COMMON_BLOCKS = YES; 495 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 496 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 497 | GCC_WARN_UNDECLARED_SELECTOR = YES; 498 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 499 | GCC_WARN_UNUSED_FUNCTION = YES; 500 | GCC_WARN_UNUSED_VARIABLE = YES; 501 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 502 | MTL_ENABLE_DEBUG_INFO = NO; 503 | SDKROOT = iphoneos; 504 | TARGETED_DEVICE_FAMILY = "1,2"; 505 | VALIDATE_PRODUCT = YES; 506 | }; 507 | name = Release; 508 | }; 509 | 97C147061CF9000F007C117D /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 512 | buildSettings = { 513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 514 | CODE_SIGN_IDENTITY = "iPhone Developer"; 515 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 516 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 517 | DEVELOPMENT_TEAM = STUX8MK55J; 518 | ENABLE_BITCODE = NO; 519 | FRAMEWORK_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | INFOPLIST_FILE = Runner/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 525 | LIBRARY_SEARCH_PATHS = ( 526 | "$(inherited)", 527 | "$(PROJECT_DIR)/Flutter", 528 | ); 529 | PRODUCT_BUNDLE_IDENTIFIER = com.xiaour.xiaourApp; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | TARGETED_DEVICE_FAMILY = "1,2"; 532 | VERSIONING_SYSTEM = "apple-generic"; 533 | }; 534 | name = Debug; 535 | }; 536 | 97C147071CF9000F007C117D /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 539 | buildSettings = { 540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 541 | CODE_SIGN_IDENTITY = "iPhone Developer"; 542 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 543 | DEVELOPMENT_TEAM = STUX8MK55J; 544 | ENABLE_BITCODE = NO; 545 | FRAMEWORK_SEARCH_PATHS = ( 546 | "$(inherited)", 547 | "$(PROJECT_DIR)/Flutter", 548 | ); 549 | INFOPLIST_FILE = Runner/Info.plist; 550 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 551 | LIBRARY_SEARCH_PATHS = ( 552 | "$(inherited)", 553 | "$(PROJECT_DIR)/Flutter", 554 | ); 555 | PRODUCT_BUNDLE_IDENTIFIER = com.xiaour.xiaourApp; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | TARGETED_DEVICE_FAMILY = "1,2"; 558 | VERSIONING_SYSTEM = "apple-generic"; 559 | }; 560 | name = Release; 561 | }; 562 | /* End XCBuildConfiguration section */ 563 | 564 | /* Begin XCConfigurationList section */ 565 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 97C147031CF9000F007C117D /* Debug */, 569 | 97C147041CF9000F007C117D /* Release */, 570 | 249021D3217E4FDB00AE95B9 /* Profile */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 576 | isa = XCConfigurationList; 577 | buildConfigurations = ( 578 | 97C147061CF9000F007C117D /* Debug */, 579 | 97C147071CF9000F007C117D /* Release */, 580 | 249021D4217E4FDB00AE95B9 /* Profile */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | /* End XCConfigurationList section */ 586 | }; 587 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 588 | } 589 | --------------------------------------------------------------------------------