SquadweChat constructor

const SquadweChat({
  1. Key? key,
  2. required String baseUrl,
  3. required String inboxIdentifier,
  4. bool enablePersistence = true,
  5. SquadweUser? user,
  6. PreferredSizeWidget? appBar,
  7. Future<void> onEndReached()?,
  8. double? onEndReachedThreshold,
  9. void onMessageLongPress(
    1. Message
    )?,
  10. void onMessageTap(
    1. Message
    )?,
  11. void onSendPressed(
    1. PartialText
    )?,
  12. void onTextChanged(
    1. String
    )?,
  13. bool showUserAvatars = true,
  14. bool showUserNames = true,
  15. SquadweChatTheme theme = const SquadweChatTheme(),
  16. SquadweL10n l10n = const SquadweL10n(),
  17. DateFormat? timeFormat,
  18. DateFormat? dateFormat,
  19. void onWelcome()?,
  20. void onPing()?,
  21. void onConfirmedSubscription()?,
  22. void onMessageReceived(
    1. SquadweMessage
    )?,
  23. void onMessageSent(
    1. SquadweMessage
    )?,
  24. void onMessageDelivered(
    1. SquadweMessage
    )?,
  25. void onMessageUpdated(
    1. SquadweMessage
    )?,
  26. void onPersistedMessagesRetrieved(
    1. List<SquadweMessage>
    )?,
  27. void onMessagesRetrieved(
    1. List<SquadweMessage>
    )?,
  28. void onConversationStartedTyping()?,
  29. void onConversationStoppedTyping()?,
  30. void onConversationIsOnline()?,
  31. void onConversationIsOffline()?,
  32. void onError(
    1. SquadweClientException
    )?,
  33. bool isPresentedInDialog = false,
})

Implementation

const SquadweChat(
    {Key? key,
    required this.baseUrl,
    required this.inboxIdentifier,
    this.enablePersistence = true,
    this.user,
    this.appBar,
    this.onEndReached,
    this.onEndReachedThreshold,
    this.onMessageLongPress,
    this.onMessageTap,
    this.onSendPressed,
    this.onTextChanged,
    this.showUserAvatars = true,
    this.showUserNames = true,
    this.theme = const SquadweChatTheme(),
    this.l10n = const SquadweL10n(),
    this.timeFormat,
    this.dateFormat,
    this.onWelcome,
    this.onPing,
    this.onConfirmedSubscription,
    this.onMessageReceived,
    this.onMessageSent,
    this.onMessageDelivered,
    this.onMessageUpdated,
    this.onPersistedMessagesRetrieved,
    this.onMessagesRetrieved,
    this.onConversationStartedTyping,
    this.onConversationStoppedTyping,
    this.onConversationIsOnline,
    this.onConversationIsOffline,
    this.onError,
    this.isPresentedInDialog = false})
    : super(key: key);