-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.1.27: changed upload interface ; added upload queue ; increased up…
…load speed on slow Internet
- Loading branch information
Showing
23 changed files
with
1,158 additions
and
255 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,46 +1,46 @@ | ||
import 'package:webitel_portal_sdk/src/domain/entities/dialog_message_request.dart'; | ||
import 'package:webitel_portal_sdk/src/domain/entities/media_file_request.dart'; | ||
|
||
final class RequestDialogMessageBuilder { | ||
late String _content; | ||
late String _requestId; | ||
late String _chatId; | ||
late String _messageId; | ||
|
||
late MediaFileRequest _file; | ||
|
||
RequestDialogMessageBuilder setContent(String content) { | ||
_content = content; | ||
return this; | ||
} | ||
|
||
RequestDialogMessageBuilder setRequestId(String requestId) { | ||
_requestId = requestId; | ||
return this; | ||
} | ||
|
||
RequestDialogMessageBuilder setChatId(String chatId) { | ||
_chatId = chatId; | ||
return this; | ||
} | ||
|
||
RequestDialogMessageBuilder setMessageId(String messageId) { | ||
_messageId = messageId; | ||
return this; | ||
} | ||
|
||
RequestDialogMessageBuilder setFile(MediaFileRequest file) { | ||
_file = file; | ||
return this; | ||
} | ||
|
||
DialogMessageRequest build() { | ||
return DialogMessageRequest( | ||
chatId: _chatId, | ||
content: _content, | ||
requestId: _requestId, | ||
messageId: _messageId, | ||
file: _file, | ||
); | ||
} | ||
} | ||
// import 'package:webitel_portal_sdk/src/domain/entities/dialog_message_request.dart'; | ||
// import 'package:webitel_portal_sdk/src/domain/entities/media_file_request.dart'; | ||
// | ||
// final class RequestDialogMessageBuilder { | ||
// late String _content; | ||
// late String _requestId; | ||
// late String _chatId; | ||
// late String _messageId; | ||
// | ||
// late MediaFileRequest _file; | ||
// | ||
// RequestDialogMessageBuilder setContent(String content) { | ||
// _content = content; | ||
// return this; | ||
// } | ||
// | ||
// RequestDialogMessageBuilder setRequestId(String requestId) { | ||
// _requestId = requestId; | ||
// return this; | ||
// } | ||
// | ||
// RequestDialogMessageBuilder setChatId(String chatId) { | ||
// _chatId = chatId; | ||
// return this; | ||
// } | ||
// | ||
// RequestDialogMessageBuilder setMessageId(String messageId) { | ||
// _messageId = messageId; | ||
// return this; | ||
// } | ||
// | ||
// RequestDialogMessageBuilder setFile(MediaFileRequest file) { | ||
// _file = file; | ||
// return this; | ||
// } | ||
// | ||
// DialogMessageRequest build() { | ||
// return DialogMessageRequest( | ||
// chatId: _chatId, | ||
// content: _content, | ||
// requestId: _requestId, | ||
// messageId: _messageId, | ||
// file: _file, | ||
// ); | ||
// } | ||
// } |
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,8 @@ | ||
import 'dart:convert'; | ||
|
||
// Function to convert PEM string to List<int> | ||
List<int> pemToBytes(String pem) { | ||
final lines = pem.split('\n'); | ||
final base64 = lines.where((line) => !line.startsWith('-----')).join(); | ||
return base64Decode(base64); | ||
} |
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.