import 'dart:convert';
import 'package:http/http.dart' as http;
String accountSid = '12345';
String yourAuthToken = '12345';
String yourProjectID = '12345';
String from = '15551234567';
String body = 'Hello World!'
String to = '15557654321'!
String url = 'https://example.signalwire.com/api/laml/2010-04-01/Accounts/$accountSid/Messages.json';
Map<String, String> headers = <String, String>{
yourProjectID: yourAuthToken,
};
String body = jsonEncode(<String, dynamic>{
'From': from,
'Body':
'Hello World\!', 'To': '+15557654321'
});
http.Response response = await http.post(url, body: body, headers: headers);