-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddcfd68
commit 77b997f
Showing
63 changed files
with
349 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Defines a default set of lint rules enforced for | ||
# projects at Google. For details and rationale, | ||
# see https://github.com/dart-lang/pedantic#enabled-lints. | ||
include: package:pedantic/analysis_options.yaml | ||
|
||
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints. | ||
# Uncomment to specify additional rules. | ||
linter: | ||
rules: | ||
prefer_final_fields: false | ||
unawaited_futures: false | ||
|
||
analyzer: | ||
exclude: | ||
- example | ||
- lib/**/*.g.dart | ||
- lib/params/message_change_logs_params.g.dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:sendbird_sdk/sendbird_sdk.dart'; | ||
|
||
void main(List<String> arguments) async { | ||
// This example uses the Google Books API to search for books about http. | ||
// https://developers.google.com/books/docs/overview | ||
|
||
final sendbird = SendbirdSdk(appId: 'YOUR-APP-ID'); | ||
|
||
try { | ||
final user = await sendbird.connect('UNIQUE-USER-ID'); | ||
final params = GroupChannelParams() | ||
..userIds = [user.userId] | ||
..operatorUserIds = [user.userId] | ||
..name = 'YOUR_GROUP_NAME' | ||
..customType = 'CUSTOM_TYPE' | ||
..isPublic = true; | ||
|
||
// create group channel | ||
final channel = await GroupChannel.createChannel(params); | ||
|
||
channel.sendUserMessageWithText('Hello World', | ||
onCompleted: (message, error) { | ||
// message has been sent successfully | ||
print('${message.message} has been sent!'); | ||
}); | ||
} catch (e) { | ||
// handle error | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import 'package:sendbird_sdk/core/message/base_message.dart'; | ||
import 'package:sendbird_sdk/core/message/file_message.dart'; | ||
import 'package:sendbird_sdk/core/message/user_message.dart'; | ||
|
||
typedef void OnUploadProgressCallback(int sentBytes, int totalBytes); | ||
typedef void OnMessageCallback(BaseMessage message, Error error); | ||
typedef void OnFileMessageCallback(FileMessage message, Error error); | ||
typedef void OnUserMessageCallback(FileMessage message, Error error); | ||
typedef OnUploadProgressCallback = void Function(int sentBytes, int totalBytes); | ||
typedef OnMessageCallback = void Function(BaseMessage message, Error error); | ||
typedef OnFileMessageCallback = void Function(FileMessage message, Error error); | ||
typedef OnUserMessageCallback = void Function(UserMessage message, Error error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.