jonahwilliams/flutter_shaders

assert error when enabled=false

gskinner opened this issue · 2 comments

assert(offset == Offset.zero) in _RenderShaderSamplerBuilderWidget.paint throws when enabled=false.

I fixed this by checking enabled at the top of _RenderShaderSamplerBuilderWidget.paint:

  void paint(PaintingContext context, Offset offset) {
    if (size.isEmpty || !_enabled) {
      return;
    }
// etc

Happy to submit a PR for this @jonahwilliams

Ahh, good catch. Happy to review a PR