From d780c2cff6aba4db66587d969234fb07507c6083 Mon Sep 17 00:00:00 2001 From: hizzd <39532556+hizzd@users.noreply.github.com> Date: Fri, 28 Jun 2019 23:50:01 +0800 Subject: [PATCH] Fixed the LicensePage to close the page before loading the License causes an error (#34907) --- packages/flutter/lib/src/material/about.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index 787702a30f..c0b76c7100 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -401,6 +401,9 @@ class _LicensePageState extends State { Priority.animation, debugLabel: 'License', ); + if (!mounted) { + return; + } setState(() { _licenses.add(const Padding( padding: EdgeInsets.symmetric(vertical: 18.0),