Skip to content

Commit 6a5f488

Browse files
committed
Initial Release
0 parents  commit 6a5f488

File tree

87 files changed

+2875
-0
lines changed

Some content is hidden

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

87 files changed

+2875
-0
lines changed

Diff for: .gitignore

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# General
2+
.DS_Store
3+
.idea
4+
.env
5+
example/.env
6+
*.iml
7+
8+
# Flutter/Dart/Pub related
9+
**/doc/api/
10+
.dart_tool/
11+
.flutter-plugins
12+
.packages
13+
.pub-cache/
14+
.pub/
15+
/build/
16+
17+
# Android related
18+
**/android/**/gradle-wrapper.jar
19+
**/android/.gradle
20+
**/android/captures/
21+
**/android/gradlew
22+
**/android/gradlew.bat
23+
**/android/local.properties
24+
**/android/**/GeneratedPluginRegistrant.java
25+
26+
# iOS/XCode related
27+
**/ios/**/*.mode1v3
28+
**/ios/**/*.mode2v3
29+
**/ios/**/*.moved-aside
30+
**/ios/**/*.pbxuser
31+
**/ios/**/*.perspectivev3
32+
**/ios/**/*sync/
33+
**/ios/**/.sconsign.dblite
34+
**/ios/**/.tags*
35+
**/ios/**/.vagrant/
36+
**/ios/**/DerivedData/
37+
**/ios/**/Icon?
38+
**/ios/**/Pods/
39+
**/ios/**/.symlinks/
40+
**/ios/**/profile
41+
**/ios/**/xcuserdata
42+
**/ios/.generated/
43+
**/ios/Flutter/App.framework
44+
**/ios/Flutter/Flutter.framework
45+
**/ios/Flutter/Flutter.podspec
46+
**/ios/Flutter/Generated.xcconfig
47+
**/ios/Flutter/app.flx
48+
**/ios/Flutter/app.zip
49+
**/ios/Flutter/flutter_assets/
50+
**/ios/Flutter/flutter_export_environment.sh
51+
**/ios/ServiceDefinitions.json
52+
**/ios/Runner/GeneratedPluginRegistrant.*
53+
54+
# Exceptions to above rules.
55+
!**/ios/**/default.mode1v3
56+
!**/ios/**/default.mode2v3
57+
!**/ios/**/default.pbxuser
58+
!**/ios/**/default.perspectivev3
59+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

Diff for: .metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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: 462b0ea76eca028a7776f60a20a05ebce30dfdbd
8+
channel: master
9+
10+
project_type: plugin

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## [0.0.1] - 2020-08-22
2+
3+
- Initial Release
4+
- List, Create & Delete users
5+
- List, Create & Delete open channels
6+
- List, Send open channel messages

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Jason Koo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# sendbird_chat
2+
3+
A Flutter package for Android, iOS and web to utilize basic [Sendbird API](https://docs.sendbird.com/platform/quick_start) functionality to their applications.
4+
5+
## Usage
6+
To use this package, add the dependency to your `pubspec.yaml` file:
7+
```dart
8+
dependencies:
9+
flutter:
10+
sdk: flutter
11+
sendbird_chat
12+
```
13+
14+
## Features
15+
- List, Create & Delete users
16+
- List, Create & Delete open channels
17+
- List, Send open channel messages
18+
19+
## How to use
20+
### Initialize
21+
```dart
22+
SendbirdChat chat = SendbirdChat(
23+
applicationId: '', // replace with your application id
24+
apiToken: ''); // replace with your application API token (secondary recommended)
25+
```
26+
27+
### Creating a User
28+
```dart
29+
chat.createUser(userId);
30+
```
31+
32+
### Creating an Open Channel
33+
```dart
34+
chat.createOpenChannel(
35+
name: '<name_of_channel>',
36+
userIds: ['user_id']) // user ids of operators
37+
```
38+
39+
### Sending a Message
40+
```dart
41+
chat.sendOpenChannelMessage(
42+
channelUrl: '<open_channels_url>', // looks like sendbird_open_channel_XXXX_7c280d5d186be4ebf38a3e77b225040865eea22f
43+
originUserId: '<user_id_of_sender>',
44+
message: '<string_message>')
45+
```
46+
47+
48+
## Getting Started
49+
50+
For help modifying package code, view the
51+
[plug-in package documentation](https://flutter.dev/developing-packages/),
52+
a specialized package that includes platform-specific implementation code for
53+
Android and/or iOS.
54+
55+
For help getting started with Flutter, view the
56+
[online documentation](https://flutter.dev/docs), which offers tutorials,
57+
samples, guidance on mobile development, and a full API reference.
58+

Diff for: example/.env_sample

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_ID=''
2+
API_TOKEN=''

Diff for: example/.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
.env
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+
# Web related
36+
lib/generated_plugin_registrant.dart
37+
38+
# Symbolication related
39+
app.*.symbols
40+
41+
# Obfuscation related
42+
app.*.map.json
43+
44+
# Exceptions to above rules.
45+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

Diff for: example/.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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: 462b0ea76eca028a7776f60a20a05ebce30dfdbd
8+
channel: master
9+
10+
project_type: app

Diff for: example/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# sendbird_chat_example
2+
3+
Demonstrates how to use the sendbird_chat plugin.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

Diff for: example/android/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties

Diff for: example/android/app/build.gradle

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
28+
android {
29+
compileSdkVersion 28
30+
31+
sourceSets {
32+
main.java.srcDirs += 'src/main/kotlin'
33+
}
34+
35+
lintOptions {
36+
disable 'InvalidPackage'
37+
}
38+
39+
defaultConfig {
40+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41+
applicationId "com.example.sendbird_chat_example"
42+
minSdkVersion 16
43+
targetSdkVersion 28
44+
versionCode flutterVersionCode.toInteger()
45+
versionName flutterVersionName
46+
}
47+
48+
buildTypes {
49+
release {
50+
// TODO: Add your own signing config for the release build.
51+
// Signing with the debug keys for now, so `flutter run --release` works.
52+
signingConfig signingConfigs.debug
53+
}
54+
}
55+
}
56+
57+
flutter {
58+
source '../..'
59+
}
60+
61+
dependencies {
62+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63+
}

Diff for: example/android/app/src/debug/AndroidManifest.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.sendbird_chat_example">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>

Diff for: example/android/app/src/main/AndroidManifest.xml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.sendbird_chat_example">
3+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4+
calls FlutterMain.startInitialization(this); in its onCreate method.
5+
In most cases you can leave this as-is, but you if you want to provide
6+
additional functionality it is fine to subclass or reimplement
7+
FlutterApplication and put your custom class here. -->
8+
<application
9+
android:name="io.flutter.app.FlutterApplication"
10+
android:label="sendbird_chat_example"
11+
android:icon="@mipmap/ic_launcher">
12+
<activity
13+
android:name=".MainActivity"
14+
android:launchMode="singleTop"
15+
android:theme="@style/LaunchTheme"
16+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
17+
android:hardwareAccelerated="true"
18+
android:windowSoftInputMode="adjustResize">
19+
<!-- Specifies an Android theme to apply to this Activity as soon as
20+
the Android process has started. This theme is visible to the user
21+
while the Flutter UI initializes. After that, this theme continues
22+
to determine the Window background behind the Flutter UI. -->
23+
<meta-data
24+
android:name="io.flutter.embedding.android.NormalTheme"
25+
android:resource="@style/NormalTheme"
26+
/>
27+
<!-- Displays an Android View that continues showing the launch screen
28+
Drawable until Flutter paints its first frame, then this splash
29+
screen fades out. A splash screen is useful to avoid any visual
30+
gap between the end of Android's launch screen and the painting of
31+
Flutter's first frame. -->
32+
<meta-data
33+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
34+
android:resource="@drawable/launch_background"
35+
/>
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN"/>
38+
<category android:name="android.intent.category.LAUNCHER"/>
39+
</intent-filter>
40+
</activity>
41+
<!-- Don't delete the meta-data below.
42+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
43+
<meta-data
44+
android:name="flutterEmbedding"
45+
android:value="2" />
46+
</application>
47+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.sendbird_chat_example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="@android:color/white" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
544 Bytes
Loading
442 Bytes
Loading
721 Bytes
Loading
1.01 KB
Loading
1.41 KB
Loading

0 commit comments

Comments
 (0)