mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Fixups for master CI (#2118)
## 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]. <!-- Links --> [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
This commit is contained in:
@@ -46,7 +46,7 @@ class _MethodChannelDemoState extends State<MethodChannelDemo> {
|
||||
final value = await Counter.increment(counterValue: count);
|
||||
setState(() => count = value);
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
if (!context.mounted) return;
|
||||
showErrorMessage(
|
||||
context,
|
||||
(error as PlatformException).message!,
|
||||
@@ -65,7 +65,7 @@ class _MethodChannelDemoState extends State<MethodChannelDemo> {
|
||||
final value = await Counter.decrement(counterValue: count);
|
||||
setState(() => count = value);
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
if (!context.mounted) return;
|
||||
showErrorMessage(
|
||||
context,
|
||||
(error as PlatformException).message!,
|
||||
|
||||
Reference in New Issue
Block a user