SendingNetwork
  • OVERVIEW
    • Getting Started
    • FAQs
  • Network Instructional Articles
    • Basics
      • Introducing the Edge, WatchDog, and Guardian Nodes
      • Overview
      • Messaging Solution
      • Privacy Solution
      • Rich Communication Solution
      • Multi-Platform Solution
      • Decentralized Identity
      • Multiple Chat Modes
      • How It Works
      • Token Utility
      • The Team
    • Key Concepts
      • Decentralized Identity
      • Social Graphs
      • Edge Node
  • SDK Documentation
    • Glossary
    • JavaScript client SDK
      • DID
      • User
      • Message
      • Room
      • Contact
      • Social Graph
    • iOS client SDK
      • Push
      • DID
      • User
      • Message
      • Room
      • Contact
    • Android client SDK
      • User
      • Room
    • Java SDK
      • DID
      • Room
      • Message
    • Node.js SDK
      • DID
      • Room
      • Message
    • Unreal SDK
      • DID
      • User
      • Message
      • Room
    • Unity SDK
      • DID
      • Room
      • Message
    • Website chat widget SDK
      • Customization
      • DID
      • User
      • Room
      • Message
      • Other
    • Bot SDKs
      • Golang Bot SDK
        • DID
        • User
        • Room
        • Message
    • Extensible Message Interface
    • Push Notifications
    • Flutter SDK
      • DID
      • User
      • Message
      • Room
    • PHP SDK
      • DID
      • Room
      • User
    • Developer Key
  • Acquisition Kit
    • Social Boost Development Instructions
  • WatchDog Agent
    • WatchDog Agent Guide
    • WatchDog Agent Deployment Tutorial
      • Linux Deployment Tutorial
    • One-Click Deployment
  • Edge Node
    • Edge Node Deployment Tutorial
    • VPS Setup Guide
      • Google Cloud Platform (GCP)
      • Amazon Web Services (AWS)
      • Contabo
    • Check Node Stats with Auto-Reply Bot in SendingMe App
    • Alpha-3 Testnet FAQs
  • delegation node
    • Delegation Node Deployment Tutorial
  • Private Delegation Node
  • Use Cases
    • Wallet-to-Wallet Messaging
    • Dapp Notifications
    • Identity Verification
    • Gamer Acquisition
    • Cross-platform Trading
Powered by GitBook
On this page
  • Send a message
  • Receive a message
  • Send live location message
  • Set Notification State
  • Send media message
  1. SDK Documentation
  2. Flutter SDK

Message

Send a message

Future<String?> sendTextEvent(String message,
      {String? txid,
      Event? inReplyTo,
      String? editEventId,
      bool parseMarkdown = true,
      bool parseCommands = true,
      String msgtype = MessageTypes.Text,
      String? threadRootEventId,
      String? threadLastEventId})

Input Parameters:

Name
Type
Description
Required

message

String

message

True

txid

String

txid

False

inReplyTo

String

inReplyTo

False

threadRootEventId

String

threadRootEventId

False

threadLastEventId

String

threadLastEventId

False

Receive a message

late final Future<Timeline> _timelineFuture;
  final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>();

  @override
  void initState() {
    _timelineFuture = widget.room.getTimeline(onChange: (i) {
      print('on change! $i');
      _listKey.currentState?.setState(() {});
    }, onInsert: (i) {
      print('on insert! $i');
      _listKey.currentState?.insertItem(i);
    }, onRemove: (i) {
      print('On remove $i');
      _listKey.currentState?.removeItem(i, (_, __) => const ListTile());
    }, onUpdate: () {
      print('On update');
    });
    super.initState();
  }

Send live location message

sendLiveLocation(beaconInfoEventId: String, latitude: Double, longitude: Double, uncertainty: Double?): Cancelable
Name
Type
Description
Required

beaconInfoEventId

String

event id of the initial beacon info state event

true

latitude

Double

latitude of the location

True

longitude

Double

longitude of the location

True

uncertainty

Double

Accuracy of the location in meters

False

Set Notification State

enum class RoomNotificationState {   
    ALL_MESSAGES_NOISY,
    ALL_MESSAGES,
    MENTIONS_ONLY,
    MUTE
}

suspend fun setRoomNotificationState(roomNotificationState: RoomNotificationState)
Name
Description

ALL_MESSAGES_NOISY

All the messages will trigger a noisy notification.

ALL_MESSAGES

All the messages will trigger a notification.

MENTIONS_ONLY

Only the messages with user display name / user name will trigger notifications.

MUTE

No notifications.

Send media message

fun sendMedia(
        attachment: ContentAttachmentData,
        compressBeforeSending: Boolean,
        roomIds: Set<String>,
        rootThreadEventId: String? = null,
        relatesTo: RelationDefaultContent? = null,
        additionalContent: Content? = null,
): Cancelable
Name
Type
Description
Required

attachment

String

the media to send

true

compressBeforeSending

String

set to true to compress images before sending them

True

roomIds

String

set of roomIds to where the media will be sent. The current roomId will be add to this set if not present.

True

rootThreadEventId

String

when this param is not null, the Media will be sent in this specific thread

True

relatesTo

String

add a relation content to the media event

True

additionalContent

String

additional content to put in the event content

True

Output parameters

Cancelable

PreviousUserNextRoom

Last updated 1 year ago