chore: Using CustomButton
in place of ImageButton
#12
Labels
chore
a tedious but necessary task often paying technical debt
documentation
Improvements or additions to documentation
enhancement
New feature or enhancement of existing functionality
flutter
Flutter related issues
priority-1
Highest priority issue. This is costing us money every minute that passes.
For additional context, please see dwyl/app#341 (comment).
The
ImageButton
fromflutter_quill
has different behaviour when the app is accessed from a mobile app or a web browser. It useskIsWeb
to check if the platform is web-based or not - see https://github.com/singerdmx/flutter-quill/blob/8cb14b8155219a94c612467df79206ff09b9b386/flutter_quill_extensions/lib/embeds/toolbar/media_button.dart#L120.Unfortunately, this makes it impossible to widget/integration/unit test web embeds and reduces the code coverage because there's no apparent way of overriding this variable during tests.
However, I believe we can work around this problem by having a
CustomButton
that does the exact same thing anImageButton
does.The text was updated successfully, but these errors were encountered: