flutter_sms_pro 1.0.0
flutter_sms_pro: ^1.0.0 copied to clipboard
A new Flutter plugin for sms sending.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_sms_pro/flutter_sms_pro.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Flutter sms plus example app')),
body: Center(
child: ElevatedButton(
onPressed: () async {
var message = '''
Hi!
Join me on the {App Name} and earn credits! Use the referral code below when you sign up.
Referral code: {"referralCode"}
I look forward to seeing you on the App!
Download link: "{invitelink}"
''';
var recipients = ['+9112346890', '+13059197071'];
var isSent = await FlutterSmsPro.sendSMS(
message: message,
recipients: recipients,
);
print('isSent:$isSent');
},
child: Text('Send message '),
),
),
),
);
}
}