diff --git a/README.md b/README.md index a66112d..4a86347 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,64 @@ # flutter_sms -A Flutter plugin for Sending SMS on Android and iOS. +![alt text](repo/blob/master/screenshots/ios_blank.PNG) -## Getting Started +## Description -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). +Flutter Plugin for sending SMS and MMS on Android and iOS. If you send to more than one person it will send as MMS. On the iOS if the number is an iPhone and iMessage is enabled it will send as an iMessage. -For help on editing plugin code, view the [documentation](https://flutter.io/developing-packages/#edit-plugin-package). +## How To Use + +You can send multiple ways: + +1. Message and No People +2. People and No Message +3. Message and People + +This will prefil the correct fields. + +## Setup + +### Android + +Add this to your AndroidManifest.xml + +``` xml + +``` + +### iOS + +Good to go! + +## Example + +Make sure to Install and Import the Package. + +``` dart +import 'package:flutter_sms/flutter_sms.dart'; +``` + +Create a function for sending messages. + +``` dart +String _message = ""; + +void _sendSMS(String message, List recipents) async { + String _result = + await FlutterSms.sendSMS(message: message, recipients: recipents); + setState(() => _message = _result); +} +``` + +You can quickly send the message with this function. + +``` dart +_sendSMS("Here is a test Message", ["5555543454", "78467477788"]) +``` + +## Screenshots + +![alt text](repo/blob/master/screenshots/ios_sms.PNG) +![alt text](repo/blob/master/screenshots/android_mms.png) + +You can find other [screenshots here](repo/blob/screenshots). \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index dd0d044..e228bc3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'dart:async'; -import 'package:flutter/services.dart'; import 'package:flutter_sms/flutter_sms.dart'; void main() => runApp(new MyApp()); diff --git a/screenshots/android_blank.png b/screenshots/android_blank.png new file mode 100644 index 0000000..7741708 Binary files /dev/null and b/screenshots/android_blank.png differ diff --git a/screenshots/android_mms.png b/screenshots/android_mms.png new file mode 100644 index 0000000..1f29b11 Binary files /dev/null and b/screenshots/android_mms.png differ diff --git a/screenshots/android_multiple.png b/screenshots/android_multiple.png new file mode 100644 index 0000000..13cba58 Binary files /dev/null and b/screenshots/android_multiple.png differ diff --git a/screenshots/android_single.png b/screenshots/android_single.png new file mode 100644 index 0000000..66af6a3 Binary files /dev/null and b/screenshots/android_single.png differ diff --git a/screenshots/android_sms.png b/screenshots/android_sms.png new file mode 100644 index 0000000..e2133b4 Binary files /dev/null and b/screenshots/android_sms.png differ diff --git a/screenshots/ios_blank.PNG b/screenshots/ios_blank.PNG new file mode 100644 index 0000000..aa5ba1c Binary files /dev/null and b/screenshots/ios_blank.PNG differ diff --git a/screenshots/ios_mms.PNG b/screenshots/ios_mms.PNG new file mode 100644 index 0000000..bf5833e Binary files /dev/null and b/screenshots/ios_mms.PNG differ diff --git a/screenshots/ios_multiple.PNG b/screenshots/ios_multiple.PNG new file mode 100644 index 0000000..78057fb Binary files /dev/null and b/screenshots/ios_multiple.PNG differ diff --git a/screenshots/ios_single.PNG b/screenshots/ios_single.PNG new file mode 100644 index 0000000..79184b1 Binary files /dev/null and b/screenshots/ios_single.PNG differ diff --git a/screenshots/ios_sms.PNG b/screenshots/ios_sms.PNG new file mode 100644 index 0000000..797834d Binary files /dev/null and b/screenshots/ios_sms.PNG differ