TwilioFlutter class

Twilio’s Programmable SMS API helps you add robust messaging capabilities to your applications. To use TwilioFlutter you will use your Twilio Account SID as the username and your Auth Token as the password for HTTP Basic authentication with Twilio.

Constructors

TwilioFlutter({required String accountSid, required String authToken, required String twilioNumber, String? messagingServiceSid})
Creates a TwilioFlutter Object with accountSid , authToken , twilioNumber. Optional parameter messagingServiceSid can be passed in if sendScheduledSms is required. accountSid , authToken , twilioNumber Your Account Sid and Auth Token from twilio.com/console Should be not null Strings.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelScheduledSms({required String messageSid}) Future<int>
cancelScheduledSms messageSid : The unique sid of message for which has to be cancelled. Returns 200 -> scheduled message cancelled successfully.
cancelScheduledWhatsAppMessage({required String messageSid}) Future<int>
cancelScheduledWhatsAppMessage messageSid : The unique sid of message for which has to be cancelled. Returns 200 -> scheduled message cancelled successfully.
changeTwilioNumber(String twilioNumber) → void
changeTwilioNumber twilioNumber : A non-null value for new twilio number
getSMS(String messageSid) Future<Message>
getSMS Get all data of a specific message Pass messageSid as a non null Message SID.
getSmsList({String? pageSize}) Future<SentSmsData>
getSmsList Get all messages associated with your account Pass pageSize to get specific page sizes. pageSize value defaults to 20
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendScheduledSms({required String toNumber, required String messageBody, required String sendAt}) Future<int>
sendScheduledSms toNumber : The number to which sms message has to be sent. messageBody : The content of the message to be sent. sendAt : Time at which the sms has to be sent (Minimum 15 minutes after current time) Method called to send scheduled sms messages to the specified phone number with given content. This requires a Messaging service SID registered with twilio and it has to be passed in while creating TwilioFlutter. Returns 201 -> message scheduled successfully.
sendScheduledWhatsAppMessage({required String toNumber, required String messageBody, required String sendAt}) Future<int>
sendScheduledWhatsAppMessage toNumber : The whatsapp number to which sms message has to be sent. messageBody : The content of the message to be sent. sendAt : Time at which the whatsapp message has to be sent (Minimum 15 minutes after current time) Method called to send scheduled whatsapp messages to the specified phone number with given content. This requires a Messaging service SID registered with twilio and it has to be passed in while creating TwilioFlutter. Returns 201 -> message scheduled successfully.
sendSMS({required String toNumber, required String messageBody}) Future<int>
sendSMS toNumber : The number to which text message has to be sent. messageBody : The content of the message to be sent.
sendWhatsApp({required String toNumber, required String messageBody}) Future<int>
sendWhatsApp toNumber : The number to which whatsapp message has to be sent. messageBody : The content of the message to be sent.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited