Flutter Message Center

Airship’s SDK provides a simple interface for managing the Message Center within your Flutter application.

Airship Message Center is a place in your app where you can display persistent rich messages, including HTML, video, etc. The messages are hosted by Airship, and are typically displayed in standard inbox-style within your app.

Events
Airship.messageCenter.onInboxUpdated
    .listen((event) => debugPrint('Inbox updated $event'));

Airship.messageCenter.onDisplay
    .listen((event) => debugPrint('Navigate to app's inbox $event'));
Using the InboxMessageView
InboxMessage message = messages[0];

void onInboxMessageViewCreated(InboxMessageViewController controller) {
    controller.loadMessage(message);
}

@override
Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(
            title: const Text('Message: $message.title'),
        ),
        body:  Container(
            child: InboxMessageView(onViewCreated: onInboxMessageViewCreated),
            height: 300.0,
        )
    ));
}