fix ticker provider not being set when controller arg to LazyCanvas changed

This commit is contained in:
2025-08-16 04:06:44 +00:00
parent cdb4f5bc0c
commit 6a262c1723
+8
View File
@@ -32,6 +32,14 @@ class _LazyCanvasState extends State<LazyCanvas> with TickerProviderStateMixin<L
super.dispose();
}
@override
void didUpdateWidget(covariant LazyCanvas oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.controller != widget.controller) {
widget.controller.setTickerProvider(this);
}
}
@override
Widget build(BuildContext context) {
widget.controller.setBuildContext(context);