ably / ably-flutter

A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.
https://ably.com/download
Apache License 2.0
60 stars 16 forks source link

Fail early on unsupported platforms #428

Open ikurek opened 2 years ago

ikurek commented 2 years ago

Right now, when used on an unsupported platform (for example on Flutter Web) the {{ably-flutter}} plugin will fail with {{Unsupported operation}} error, only when a method from Ably is called on the platform side. This doesn't really explain what happened to the user, and it may be hard to understand the reason behind the error.

It may be a good idea to implement a more specific, user-facing error and make sure that it get's thrown on runtime as soon as the code is ran on an unsupported platform.