Browse Source

Merge pull request #1092 from nextcloud/fix/neon/cached-image-boxfit

pull/1100/head
Kate 1 year ago committed by GitHub
parent
commit
3db2a39826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/neon/neon/lib/src/widgets/image.dart

4
packages/neon/neon/lib/src/widgets/image.dart

@ -135,8 +135,7 @@ class NeonCachedImage extends StatefulWidget {
class _NeonCachedImageState extends State<NeonCachedImage> { class _NeonCachedImageState extends State<NeonCachedImage> {
@override @override
Widget build(final BuildContext context) => Center( Widget build(final BuildContext context) => FutureBuilder(
child: FutureBuilder(
future: widget.image, future: widget.image,
builder: (final context, final fileSnapshot) { builder: (final context, final fileSnapshot) {
if (fileSnapshot.hasError) { if (fileSnapshot.hasError) {
@ -176,7 +175,6 @@ class _NeonCachedImageState extends State<NeonCachedImage> {
errorBuilder: (final context, final error, final stacktrace) => _buildError(error), errorBuilder: (final context, final error, final stacktrace) => _buildError(error),
); );
}, },
),
); );
Widget _buildError(final Object? error) => Widget _buildError(final Object? error) =>

Loading…
Cancel
Save