flutter_sms_inbox 1.0.0-nullsafety.0 copy "flutter_sms_inbox: ^1.0.0-nullsafety.0" to clipboard
flutter_sms_inbox: ^1.0.0-nullsafety.0 copied to clipboard

outdated

Flutter plugin to easily query device SMS Inbox. Supports android only.

Flutter SMS Inbox #

Flutter android SMS inbox library based on Flutter SMS.

Installation #

Install the library from pub:

dependencies:
  flutter_sms_inbox: [version]

Querying SMS messages #

Add the import statement for sms and create an instance of the SmsQuery class:

import 'package:flutter_sms_inbox/flutter_sms_inbox.dart';

void main() {
  SmsQuery query = SmsQuery();
}

Getting all SMS messages #

List<SmsMessage> messages = await query.getAllSms;

Filtering SMS messages #

The method querySms from the SmsQuery class returns a list of sms depending of the supplied parameters. For example, for querying all the sms messages sent and received write the followed code:

await query.querySms({
    kinds: [SmsQueryKind.Inbox, SmsQueryKind.Sent]
});

You can also query all the sms messages sent and received from a specific contact:

await query.querySms({
    address: getContactAddress()
});
80
likes
0
points
3.94k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin to easily query device SMS Inbox. Supports android only.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_sms_inbox