diff --git a/next_gen_ui_demo/lib/common/shader_effect.dart b/next_gen_ui_demo/lib/common/shader_effect.dart index 86db665f1..0caa7394b 100644 --- a/next_gen_ui_demo/lib/common/shader_effect.dart +++ b/next_gen_ui_demo/lib/common/shader_effect.dart @@ -283,10 +283,10 @@ class _RenderShaderSamplerBuilderWidget extends RenderProxyBox { @override void paint(PaintingContext context, Offset offset) { - if (size.isEmpty || !_enabled) { + if (size.isEmpty) { return; } - assert(offset == Offset.zero); + assert(!_enabled || offset == Offset.zero); return super.paint(context, offset); } } @@ -359,4 +359,10 @@ class _ShaderSamplerBuilderLayer extends OffsetLayer { _lastPicture = pictureRecorder.endRecording(); builder.addPicture(offset, _lastPicture!); } + + @override + void dispose() { + _lastPicture?.dispose(); + super.dispose(); + } } diff --git a/next_gen_ui_demo/pubspec.yaml b/next_gen_ui_demo/pubspec.yaml index 0a0cf36ed..a2c7f0fb2 100644 --- a/next_gen_ui_demo/pubspec.yaml +++ b/next_gen_ui_demo/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' version: 0.1.0 environment: - sdk: '>=3.0.0-417.4.beta <4.0.0' + sdk: ^3.0.0 dependencies: cupertino_icons: ^1.0.5