|
|
|
|
@ -107,7 +107,7 @@ class _MxcImageState extends State<MxcImage> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _tryLoad(_) async {
|
|
|
|
|
void _tryLoad() async {
|
|
|
|
|
if (_imageData != null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@ -116,14 +116,14 @@ class _MxcImageState extends State<MxcImage> {
|
|
|
|
|
} 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) =>
|
|
|
|
|
|