title: Sms messages not being sent from flutter app
body: <p>I am trying to send sms messages from my flutter app by using flutter_sms: ^2.3.1. I have implemented code from the example I found online. When I execute _sendSMS() and watch _message in the watch window it says &quot;gathering data&quot; when I reach the breakpoint on the next line after I call _sendSMS(). I am sending the messages to my personal Android phone but I am not receiving them. I don't know what I am missing so I am really hoping someone out there has done this and can help me out.</p>
  <p>Below is the code I am using:</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'dart:async';
  import 'package:flutter_sms/flutter_sms.dart';
  
  
  class SendTextMessage extends StatefulWidget {
    @override
    _SendTextMessageState createState() =&gt; new _SendTextMessageState();
  }
  
  class _SendTextMessageState extends State&lt;SendTextMessage&gt; {
    TextEditingController _controllerPeople, _controllerMessage;
    String _message, body;
    List&lt;String&gt; people = [];
  
    @override
    void initState() {
      super.initState();
      initPlatformState();
    }
  
    Future&lt;void&gt; initPlatformState() async {
      _controllerPeople = TextEditingController();
      _controllerMessage = TextEditingController();
    }
  
    void _sendSMS(String message, List&lt;String&gt; recipents) async {    
      String _result =
      await sendSMS(message: message, recipients: recipents);
      _message = _result;
    }
  
    Widget _phoneTile(String name) {
      return Padding(
        padding: const EdgeInsets.all(3.0),
        child: Container(
            decoration: BoxDecoration(
                border: Border(
                  bottom: BorderSide(color: Colors.grey[300]),
                  top: BorderSide(color: Colors.grey[300]),
                  left: BorderSide(color: Colors.grey[300]),
                  right: BorderSide(color: Colors.grey[300]),
                )),
            child: Padding(
              padding: EdgeInsets.all(4.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisSize: MainAxisSize.min,
                children: &lt;Widget&gt;[
                  IconButton(
                    icon: Icon(Icons.close),
                    onPressed: () =&gt; setState(() =&gt; people.remove(name)),
                  ),
                  Padding(
                    padding: const EdgeInsets.all(0.0),
                    child: Text(
                      name,
                      textScaleFactor: 1.0,
                      style: TextStyle(fontSize: 12.0),
                    ),
                  )
                ],
              ),
            )),
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        home: new Scaffold(
          appBar: AppBar(
            automaticallyImplyLeading: false,
            title: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Image.asset('assets/images/Appbar_logo.png',
                    fit: BoxFit.cover, height: 56),
              ],
            ),
          ),
          resizeToAvoidBottomInset: false, // This fixes the keyboard white space
          body: ListView(
            children: &lt;Widget&gt;[
              people == null || people.isEmpty
                  ? Container(
                height: 0.0,
              )
                  : Container(
                height: 90.0,
                child: Padding(
                  padding: const EdgeInsets.all(3.0),
                  child: ListView(
                    scrollDirection: Axis.horizontal,
                    children:
                    List&lt;Widget&gt;.generate(people.length, (int index) {
                      return _phoneTile(people[index]);
                    }),
                  ),
                ),
              ),
              ListTile(
                leading: Icon(Icons.people),
                title: TextField(
                  controller: _controllerPeople,
                  decoration: InputDecoration(labelText: &quot;Add Phone Number&quot;),
                  onChanged: (String value) =&gt; setState(() {}),
                ),
                trailing: IconButton(
                  icon: Icon(Icons.add),
                  onPressed: _controllerPeople.text.isEmpty
                      ? null
                      : () =&gt; setState(() {
                    people.add(_controllerPeople.text.toString());
                    _controllerPeople.clear();
                  }),
                ),
              ),
              Divider(),
              ListTile(
                leading: Icon(Icons.message),
                title: TextField(
                  decoration: InputDecoration(labelText: &quot; Add Message&quot;),
                  controller: _controllerMessage,
                  onChanged: (String value) =&gt; setState(() {}),
                ),
                trailing: IconButton(
                  icon: Icon(Icons.save),
                  onPressed: _controllerMessage.text.isEmpty
                      ? null
                      : () =&gt; setState(() {
                    body = _controllerMessage.text.toString();
                    _controllerMessage.clear();
                  }),
                ),
              ),
              Divider(),
              ListTile(
                leading: Icon(Icons.text_fields),
                title: Text(body ?? &quot;No Message Set&quot;),
                subtitle: people == null || people.isEmpty
                    ? null
                    : Text(people.toString()),
                trailing: IconButton(
                  icon: Icon(Icons.send),
                  onPressed: () {
                    if ((people == null || people.isEmpty) ||
                        (body == null || body.isEmpty)) {
                      setState(() =&gt;
                      _message = &quot;At Least 1 Person or Message Required&quot;);
                    } else {
                      _sendSMS(body, people);
                      setState(() =&gt;_message);
                    }
                  },
                ),
              ),
              Divider(),
              Row(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: &lt;Widget&gt;[
                  Padding(
                    padding: const EdgeInsets.all(12.0),
                    child: Text(
                      _message ?? &quot;No Data&quot;,
                      maxLines: null,
                    ),
                  ),
                ],
              ),
            ],
          ),
        ),
      );
    }
  }
  </code></pre>