You have a few options for using Ably with Flutter:
- Use our Flutter Plugin which, at the time of writing (Jan 2021),has pub/sub enabled as part of the plugin V1. The next update will include presence and message history
- Use a Dart MQTT client with our MQTT adapter
- Use a Dart SSE client with our SSE adapter
Can I write my own Flutter plugin?
Yes, you could consider writing your own Flutter plugin which wraps our ably-java and ably-cocoa client libraries, but that is exactly what our Flutter Plugin is already doing so we would encourage you to take a look at the work we've done on that project and see if that suits your needs.
It's all open source and we welcome contributions. We would love to hear about what you need to work with your Flutter apps and will do our best to help you find a solution.
Can I write my own Dart package?
Yes, you could consider writing your own 'pure' Dart package and that is something we have also considered writing ourselves. However, for the time being at least, we have settled on the approach of delivering a Flutter plugin as this leverages the many hours of existing work that already went in to developing our Cocoa and Android client libraries.
If you have strong reasons why you may be seeking a pure Dart solution, then get in touch as we would be interested to discuss this with you.
More Flutter Resources:
For more resources on using Flutter with Ably, check out the following:
Ably Flutter Plugin Blog (not live yet)
Realtime Cryptocurrency Flutter App Tutorial (not live yet)
Building realtime apps with Flutter and WebSockets: client-side considerations
And, as always, if you have any questions then reach out to email@example.com