jonahwilliams/flutter_shaders

_ShaderSamplerBuilderLayer throws "Invalid image dimensions" if target has no size.

Closed this issue · 3 comments

_ShaderSamplerBuilderLayer._buildChildScene throws an "Invalid image dimensions" error if the target widget does not have a size, which is difficult to resolve in a number of scenarios.

I resolved this by checking the size at the top of _ShaderSamplerBuilderLayer.addToScene:

void addToScene(ui.SceneBuilder builder) {
    if (size.isEmpty) return;
// etc

Happy to submit a PR for this @jonahwilliams

Also good catch :)

Want me to just package these as a single PR?

sure!