Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert date using js_util, remove print statements provide empty stream for notification not implemented on web yet #14

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

martintrollip
Copy link
Collaborator

  • Convert date using js_util
    This helped with calling date.getTime on the dynamic date object

dart-lang/sdk#49399

  • Remove print statements
  • Provide empty stream for notification not implemented on web yet

…eam for notification not implemented on web yet
@@ -208,19 +211,25 @@ class Mapper {
}

static String? dateToString(dynamic date) {
if (date == null) return null;
final dateTime = DateTime.fromMicrosecondsSinceEpoch(
date.getTime() * 1000,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date.getTime() resulted in errors for compiled web apps.

@@ -21,7 +22,7 @@ class TwilioConversationsChannel extends EventEmitter {
external String? uniqueName;

external dynamic getMessages(int? pageSize, int? anchor, String? direction);
external dynamic prepareMessage();
external MessageBuilder prepareMessage();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defined this so that JS know which methods to call. In message_method the only change is to change dynamic to MessageBuilder and the rest of the interface remained the same

@martintrollip martintrollip merged commit 589500b into main Jun 28, 2024
@martintrollip martintrollip deleted the feature/date-mapping branch June 28, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant