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.
This commit is contained in:
parent
37d313c271
commit
e1ec87d3aa
1 changed files with 3 additions and 3 deletions
|
|
@ -107,7 +107,7 @@ class _MxcImageState extends State<MxcImage> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _tryLoad(_) async {
|
void _tryLoad() async {
|
||||||
if (_imageData != null) {
|
if (_imageData != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -116,14 +116,14 @@ class _MxcImageState extends State<MxcImage> {
|
||||||
} on IOException catch (_) {
|
} on IOException catch (_) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
await Future.delayed(widget.retryDuration);
|
await Future.delayed(widget.retryDuration);
|
||||||
_tryLoad(_);
|
_tryLoad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance.addPostFrameCallback(_tryLoad);
|
WidgetsBinding.instance.addPostFrameCallback((_) => _tryLoad());
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget placeholder(BuildContext context) =>
|
Widget placeholder(BuildContext context) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue