From 679c6c1cbf0bf06f6c3e8d53e4847576131fd1f6 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 21 Jun 2023 22:13:35 +0200 Subject: [PATCH] Re-enable `platform_channels` CI (#1903) ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/wiki/Chat [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --- platform_channels/lib/src/method_channel_demo.dart | 2 ++ tool/flutter_ci_script_beta.sh | 3 +-- tool/flutter_ci_script_master.sh | 3 +-- tool/flutter_ci_script_stable.sh | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/platform_channels/lib/src/method_channel_demo.dart b/platform_channels/lib/src/method_channel_demo.dart index 0758ca9ef..f4810c61e 100644 --- a/platform_channels/lib/src/method_channel_demo.dart +++ b/platform_channels/lib/src/method_channel_demo.dart @@ -46,6 +46,7 @@ class _MethodChannelDemoState extends State { final value = await Counter.increment(counterValue: count); setState(() => count = value); } catch (error) { + if (!mounted) return; showErrorMessage( context, (error as PlatformException).message!, @@ -64,6 +65,7 @@ class _MethodChannelDemoState extends State { final value = await Counter.decrement(counterValue: count); setState(() => count = value); } catch (error) { + if (!mounted) return; showErrorMessage( context, (error as PlatformException).message!, diff --git a/tool/flutter_ci_script_beta.sh b/tool/flutter_ci_script_beta.sh index da43b3366..8fede7de2 100755 --- a/tool/flutter_ci_script_beta.sh +++ b/tool/flutter_ci_script_beta.sh @@ -55,8 +55,7 @@ declare -ar PROJECT_NAMES=( # "navigation_and_routing" "next_gen_ui_demo" "place_tracker" - # TODO: https://github.com/flutter/samples/issues/1765 - # "platform_channels" + "platform_channels" "platform_design" "platform_view_swift" "provider_counter" diff --git a/tool/flutter_ci_script_master.sh b/tool/flutter_ci_script_master.sh index afd6d5e95..420a9e4b1 100755 --- a/tool/flutter_ci_script_master.sh +++ b/tool/flutter_ci_script_master.sh @@ -56,8 +56,7 @@ declare -ar PROJECT_NAMES=( # TODO: Dependency 'gap-3.0.0' fails to compile # "next_gen_ui_demo" "place_tracker" - # TODO: https://github.com/flutter/samples/issues/1765 - # "platform_channels" + "platform_channels" "platform_design" "platform_view_swift" "provider_counter" diff --git a/tool/flutter_ci_script_stable.sh b/tool/flutter_ci_script_stable.sh index 59b04e10b..f3854fded 100755 --- a/tool/flutter_ci_script_stable.sh +++ b/tool/flutter_ci_script_stable.sh @@ -49,8 +49,7 @@ declare -ar PROJECT_NAMES=( "navigation_and_routing" "next_gen_ui_demo" "place_tracker" - # TODO: https://github.com/flutter/samples/issues/1765 - # "platform_channels" + "platform_channels" "platform_design" "platform_view_swift" "provider_counter"