Merge pull request #1965 from algorithmiker/fix-try-load

fix: fix compile error related to MxcImage
pull/1815/head
Krille-chan 5 months ago committed by GitHub
commit 505f2e149a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save