From 4dcb64a99f9152b19f9d80b7eab64b1c0e01c36e Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Fri, 6 Mar 2015 12:23:53 -0800 Subject: [PATCH] Effen: willUmount->didUnmount, allow setState after didUnmount This patch changes the timing of the unmount call until after the component is removed (and marked as such) and allows setState to be called after this point. If this happens, setState will still invoke the closer to do any neccesary cleanup, but doesn't schedule the component for render R=eseidel@chromium.org, eseidel BUG= Review URL: https://codereview.chromium.org/985853002 --- examples/fn/widgets/fixedheightscrollable.dart | 2 +- examples/fn/widgets/material.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fn/widgets/fixedheightscrollable.dart b/examples/fn/widgets/fixedheightscrollable.dart index ecb558962ad..83733ea7c0b 100644 --- a/examples/fn/widgets/fixedheightscrollable.dart +++ b/examples/fn/widgets/fixedheightscrollable.dart @@ -64,7 +64,7 @@ abstract class FixedHeightScrollable extends Component { ..events.listen('wheel', _handleWheel); } - void willUnmount() { + void didUnmount() { _stopFling(); } diff --git a/examples/fn/widgets/material.dart b/examples/fn/widgets/material.dart index 89cbdf23531..56aa417ac31 100644 --- a/examples/fn/widgets/material.dart +++ b/examples/fn/widgets/material.dart @@ -61,7 +61,7 @@ abstract class MaterialComponent extends Component { }); } - void willUnmount() { + void didUnmount() { _cancelSplashes(null); }