Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Using CustomButton in place of ImageButton #12

Closed
LuchoTurtle opened this issue Oct 11, 2023 · 0 comments · Fixed by #13
Closed

chore: Using CustomButton in place of ImageButton #12

LuchoTurtle opened this issue Oct 11, 2023 · 0 comments · Fixed by #13
Assignees
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.

Comments

@LuchoTurtle
Copy link
Member

For additional context, please see dwyl/app#341 (comment).

The ImageButton from flutter_quill has different behaviour when the app is accessed from a mobile app or a web browser. It uses kIsWeb 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 an ImageButton does.

@LuchoTurtle LuchoTurtle added documentation Improvements or additions to documentation enhancement New feature or enhancement of existing functionality flutter Flutter related issues chore a tedious but necessary task often paying technical debt priority-1 Highest priority issue. This is costing us money every minute that passes. labels Oct 11, 2023
@LuchoTurtle LuchoTurtle self-assigned this Oct 11, 2023
LuchoTurtle added a commit that referenced this issue Oct 16, 2023
LuchoTurtle added a commit that referenced this issue Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: Done
1 participant