fix ticker provider not being set when controller arg to LazyCanvas changed
This commit is contained in:
@@ -32,6 +32,14 @@ class _LazyCanvasState extends State<LazyCanvas> with TickerProviderStateMixin<L
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didUpdateWidget(covariant LazyCanvas oldWidget) {
|
||||||
|
super.didUpdateWidget(oldWidget);
|
||||||
|
if (oldWidget.controller != widget.controller) {
|
||||||
|
widget.controller.setTickerProvider(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
widget.controller.setBuildContext(context);
|
widget.controller.setBuildContext(context);
|
||||||
|
|||||||
Reference in New Issue
Block a user