sendsms 1.0.3 copy "sendsms: ^1.0.3" to clipboard
sendsms: ^1.0.3 copied to clipboard

Permite el envio SMS sin salir desde la aplicacion utilizando el permiso de envio SMS

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sendsms/sendsms.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: const Text('Envio SMS desde la aplicación'),
        ),
        body: Container(
          padding: EdgeInsets.all(15),
          width: double.infinity,
          child: RaisedButton(
            child: Text("Enviar SMS"),
            onPressed: () async {
              String phoneNumber = "+593992696250";
              String message = "test";

              await Sendsms.onGetPermission();

              if (await Sendsms.hasPermission()) {
                await Sendsms.onSendSMS(phoneNumber, message);
              }
            },
          ),
        ),
      ),
    );
  }
}
15
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Permite el envio SMS sin salir desde la aplicacion utilizando el permiso de envio SMS

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sendsms