Skip to content

Commit e795162

Browse files
committed
create project
1 parent bdc8a82 commit e795162

File tree

355 files changed

+29275
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+29275
-1
lines changed

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
.packages
30+
build/

.metadata

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.
5+
6+
version:
7+
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
8+
channel: stable
9+
10+
project_type: plugin
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
17+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
18+
- platform: android
19+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
20+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
21+
- platform: ios
22+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
23+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
24+
25+
# User provided section
26+
27+
# List of Local paths (relative to this file) that should be
28+
# ignored by the migrate tool.
29+
#
30+
# Files that are not part of the templates will be ignored by default.
31+
unmanaged_files:
32+
- 'lib/main.dart'
33+
- 'ios/Runner.xcodeproj/project.pbxproj'

.vscode/launch.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "em_chat_uikit",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "em_chat_uikit (profile mode)",
14+
"request": "launch",
15+
"type": "dart",
16+
"flutterMode": "profile"
17+
},
18+
{
19+
"name": "em_chat_uikit (release mode)",
20+
"request": "launch",
21+
"type": "dart",
22+
"flutterMode": "release"
23+
},
24+
{
25+
"name": "example",
26+
"cwd": "example",
27+
"request": "launch",
28+
"type": "dart"
29+
},
30+
{
31+
"name": "example (profile mode)",
32+
"cwd": "example",
33+
"request": "launch",
34+
"type": "dart",
35+
"flutterMode": "profile"
36+
},
37+
{
38+
"name": "example (release mode)",
39+
"cwd": "example",
40+
"request": "launch",
41+
"type": "dart",
42+
"flutterMode": "release"
43+
}
44+
]
45+
}

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.fontSize": 10,
3+
"cSpell.words": [
4+
"autofocus"
5+
],
6+
"java.configuration.updateBuildConfiguration": "automatic"
7+
}

CHANGELOG.md

+3

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: Add your license here.

README.md

+14-1

analysis_options.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.cxx

android/build.gradle

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
group 'com.ease.em_chat_uikit'
2+
version '1.0-SNAPSHOT'
3+
4+
buildscript {
5+
ext.kotlin_version = '1.7.10'
6+
repositories {
7+
google()
8+
mavenCentral()
9+
}
10+
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:7.3.0'
13+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14+
}
15+
}
16+
17+
allprojects {
18+
repositories {
19+
google()
20+
mavenCentral()
21+
}
22+
}
23+
24+
apply plugin: 'com.android.library'
25+
apply plugin: 'kotlin-android'
26+
27+
android {
28+
compileSdkVersion 31
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
test.java.srcDirs += 'src/test/kotlin'
42+
}
43+
44+
defaultConfig {
45+
minSdkVersion 16
46+
}
47+
48+
dependencies {
49+
testImplementation 'org.jetbrains.kotlin:kotlin-test'
50+
testImplementation 'org.mockito:mockito-core:5.0.0'
51+
}
52+
53+
testOptions {
54+
unitTests.all {
55+
useJUnitPlatform()
56+
57+
testLogging {
58+
events "passed", "skipped", "failed", "standardOut", "standardError"
59+
outputs.upToDateWhen {false}
60+
showStandardStreams = true
61+
}
62+
}
63+
}
64+
}

android/settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'em_chat_uikit'

android/src/main/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.ease.em_chat_uikit">
3+
<uses-permission android:name="android.permission.CAMERA" />
4+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
5+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
6+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.ease.em_chat_uikit
2+
3+
import androidx.annotation.NonNull
4+
5+
import io.flutter.embedding.engine.plugins.FlutterPlugin
6+
import io.flutter.plugin.common.MethodCall
7+
import io.flutter.plugin.common.MethodChannel
8+
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
9+
import io.flutter.plugin.common.MethodChannel.Result
10+
11+
/** EmChatUikitPlugin */
12+
class EmChatUikitPlugin: FlutterPlugin, MethodCallHandler {
13+
/// The MethodChannel that will the communication between Flutter and native Android
14+
///
15+
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
16+
/// when the Flutter Engine is detached from the Activity
17+
private lateinit var channel : MethodChannel
18+
19+
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
20+
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "em_chat_uikit")
21+
channel.setMethodCallHandler(this)
22+
}
23+
24+
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
25+
if (call.method == "getPlatformVersion") {
26+
result.success("Android ${android.os.Build.VERSION.RELEASE}")
27+
} else {
28+
result.notImplemented()
29+
}
30+
}
31+
32+
override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
33+
channel.setMethodCallHandler(null)
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.ease.em_chat_uikit
2+
3+
import io.flutter.plugin.common.MethodCall
4+
import io.flutter.plugin.common.MethodChannel
5+
import kotlin.test.Test
6+
import org.mockito.Mockito
7+
8+
/*
9+
* This demonstrates a simple unit test of the Kotlin portion of this plugin's implementation.
10+
*
11+
* Once you have built the plugin's example app, you can run these tests from the command
12+
* line by running `./gradlew testDebugUnitTest` in the `example/android/` directory, or
13+
* you can run them directly from IDEs that support JUnit such as Android Studio.
14+
*/
15+
16+
internal class EmChatUikitPluginTest {
17+
@Test
18+
fun onMethodCall_getPlatformVersion_returnsExpectedValue() {
19+
val plugin = EmChatUikitPlugin()
20+
21+
val call = MethodCall("getPlatformVersion", null)
22+
val mockResult: MethodChannel.Result = Mockito.mock(MethodChannel.Result::class.java)
23+
plugin.onMethodCall(call, mockResult)
24+
25+
Mockito.verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE)
26+
}
27+
}

assets/images/avatar.png

1.49 KB

assets/images/camera.png

1.19 KB

assets/images/chat.png

1.45 KB

assets/images/edit_bar.png

600 Bytes

assets/images/emojis/U+1F308.png

3.07 KB

assets/images/emojis/U+1F31C.png

2.43 KB

assets/images/emojis/U+1F31F.png

2.54 KB

assets/images/emojis/U+1F381.png

1.5 KB

assets/images/emojis/U+1F382.png

4.58 KB

assets/images/emojis/U+1F389.png

4.85 KB

assets/images/emojis/U+1F44D.png

2.08 KB

assets/images/emojis/U+1F44E.png

2.13 KB

assets/images/emojis/U+1F44F.png

3.11 KB

assets/images/emojis/U+1F47F.png

2.51 KB

assets/images/emojis/U+1F48B.png

1.9 KB

assets/images/emojis/U+1F490.png

3.94 KB

assets/images/emojis/U+1F494.png

2.21 KB

assets/images/emojis/U+1F495.png

1.69 KB

assets/images/emojis/U+1F4A9.png

3.04 KB

assets/images/emojis/U+1F600.png

2.69 KB

assets/images/emojis/U+1F604.png

2.73 KB

assets/images/emojis/U+1F607.png

3.55 KB

assets/images/emojis/U+1F609.png

2.75 KB

assets/images/emojis/U+1F60D.png

2.78 KB

assets/images/emojis/U+1F60E.png

2.65 KB

assets/images/emojis/U+1F610.png

2.02 KB

assets/images/emojis/U+1F618.png

3.37 KB

assets/images/emojis/U+1F620.png

2.63 KB

assets/images/emojis/U+1F621.png

2.58 KB

assets/images/emojis/U+1F62B.png

3.27 KB

assets/images/emojis/U+1F62C.png

2.44 KB

assets/images/emojis/U+1F62D.png

3.16 KB

assets/images/emojis/U+1F62E.png

2.15 KB

assets/images/emojis/U+1F631.png

3.57 KB

assets/images/emojis/U+1F633.png

3.68 KB

assets/images/emojis/U+1F637.png

2.78 KB

assets/images/emojis/U+1F641.png

2.3 KB

assets/images/emojis/U+1F644.png

2.87 KB

assets/images/emojis/U+1F64C.png

2.67 KB

assets/images/emojis/U+1F64F.png

2.28 KB

assets/images/emojis/U+1F910.png

2.77 KB

assets/images/emojis/U+1F912.png

3.9 KB

assets/images/emojis/U+1F913.png

3.73 KB

assets/images/emojis/U+1F91D.png

2.99 KB

assets/images/emojis/U+1F922.png

2.84 KB

assets/images/emojis/U+1F928.png

2.5 KB

assets/images/emojis/U+1F92A.png

3.81 KB

assets/images/emojis/U+1F92C.png

3.46 KB

assets/images/emojis/U+1F971.png

3.54 KB

assets/images/emojis/U+1F973.png

4.74 KB

assets/images/emojis/U+1F974.png

3.05 KB

assets/images/emojis/U+1F97A.png

3.32 KB

assets/images/emojis/U+2600.png

1.95 KB

assets/images/emojis/U+263A.png

3.03 KB

assets/images/emojis/U+2764.png

1.58 KB

assets/images/emojis/U+2B50.png

1.51 KB

assets/images/file_icon.png

880 Bytes

assets/images/folder.png

515 Bytes

assets/images/image.png

835 Bytes

assets/images/image_default.png

2.28 KB

assets/images/input_bar_face.png

2.59 KB

assets/images/input_bar_keyboard.png

1.47 KB

assets/images/input_bar_more.png

2.29 KB

assets/images/input_bar_send.png

961 Bytes

assets/images/input_bar_voice.png

2.9 KB

assets/images/list_empty.png

55.7 KB
663 Bytes
1.01 KB
886 Bytes
1.08 KB
1.04 KB
1.05 KB

assets/images/no_disturb.png

1 KB

assets/images/person.png

837 Bytes

assets/images/record_delete.png

843 Bytes

assets/images/record_mic.png

1.18 KB

assets/images/record_send.png

751 Bytes

assets/images/search.png

1.54 KB

assets/images/video.png

753 Bytes

assets/images/video_default.png

1.94 KB

assets/images/voice_0.png

497 Bytes

assets/images/voice_1.png

934 Bytes

assets/images/voice_2.png

1.37 KB

assets/search.png

1.54 KB

example/.gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

example/README.md

+16

example/analysis_options.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

0 commit comments

Comments
 (0)