Skip to content

Erasing crashes app on mobile web #38

@theandrewmack

Description

@theandrewmack

I noticed a crash when attempting to erase in my Flutter web application only on mobile web browsers. I then tested it with the example code from pub.dev and experienced the same behavior.

It appears that paint.blendMode = BlendMode.clear; is the culprit.

One quick workaround I found is to just simulate an erase stroke by painting using the backgroundColor.

if (_eraseMode) {
  paint.blendMode = BlendMode.srcOver;
  paint.color = backgroundColor;
}

However, in my app, my PainterController has backgroundColor = Colors.transparent.

I am not that familiar with different blend modes and if there is another way to achieve my desired result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions