From e1ec87d3aaae00eb030bcfda28ec8f247e2c3346 Mon Sep 17 00:00:00 2001 From: gilice <104317939+gilice@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:25:20 +0200 Subject: [PATCH] fix: fix compile error related to MxcImage We ran into this error after updating Flutter from 3.27 to 3.32: ``` lib/widgets/mxc_image.dart:119:16: Error: The getter '_' isn't defined for the class '_MxcImageState'. - '_MxcImageState' is from 'package:fluffychat/widgets/mxc_image.dart' ('lib/widgets/mxc_image.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named '_'. _tryLoad(_); ``` This patch fixes that error. --- lib/widgets/mxc_image.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/widgets/mxc_image.dart b/lib/widgets/mxc_image.dart index d8ced1965..37ed5e27a 100644 --- a/lib/widgets/mxc_image.dart +++ b/lib/widgets/mxc_image.dart @@ -107,7 +107,7 @@ class _MxcImageState extends State { } } - void _tryLoad(_) async { + void _tryLoad() async { if (_imageData != null) { return; } @@ -116,14 +116,14 @@ class _MxcImageState extends State { } on IOException catch (_) { if (!mounted) return; await Future.delayed(widget.retryDuration); - _tryLoad(_); + _tryLoad(); } } @override void initState() { super.initState(); - WidgetsBinding.instance.addPostFrameCallback(_tryLoad); + WidgetsBinding.instance.addPostFrameCallback((_) => _tryLoad()); } Widget placeholder(BuildContext context) =>