android_conversation_shortcut 0.0.3 copy "android_conversation_shortcut: ^0.0.3" to clipboard
android_conversation_shortcut: ^0.0.3 copied to clipboard

PlatformAndroid

A new Flutter plugin.

flutter_android_conversation_shortcut #

A Simple Plugin that creates an android conversation shortcut for messaging style notifications, so that the notification will be displayed in the Conversations part of the notifications.
This plugin is intended as an enhancement to flutter_local_notifications.

Usage:

Create a person object from the flutter_local_notification plugin's Person class

Person person = Person(
  key: '1',
  name: 'Bob',
  icon: ...,
  ...
);

Then create the shorcut with the provided function:

final shortcutId = await AndroidConversationShortcut.createConversationShortcut(person);

flutter_local_notifications provides an attribute for AndroidNotificationDetails that let's you specify the shortcutId. Additionally the styleInformation has to be a MessagingStyleInformation object:

AndroidNotificationDetails(
  channel.id,
  channel.name,
  channel.description,
  icon: '@drawable/is_notification',
  shortcutId: shortcutId,
  styleInformation: MessagingStyleInformation(
    person,
    groupConversation: false,
    messages: messages,
    ...
  ),
  ...
);
2
likes
130
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter plugin.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_local_notifications

More

Packages that depend on android_conversation_shortcut