diff --git a/lib/launches/widgets/mission_image.dart b/lib/launches/widgets/mission_image.dart index 104d7c6..6548d7b 100644 --- a/lib/launches/widgets/mission_image.dart +++ b/lib/launches/widgets/mission_image.dart @@ -9,9 +9,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -// Project imports: -import 'package:starcat/constants.dart'; - class MissionImage extends StatelessWidget { const MissionImage({ required this.imageUrl, @@ -50,38 +47,22 @@ class MissionImage extends StatelessWidget { fit: fit, cacheManager: cacheManager, progressIndicatorBuilder: (context, child, _) { - return SizedBox( - height: 150, - child: ColoredBox( - color: Theme.of(context).colorScheme.surface, - child: const Center( - child: CircularProgressIndicator.adaptive(), - ), + return ColoredBox( + color: Theme.of(context).colorScheme.surface, + child: const Center( + child: CircularProgressIndicator.adaptive(), ), ); }, errorWidget: (context, error, stackTrace) { log(error); - return SizedBox( - height: 150, - child: ColoredBox( - color: Theme.of(context).colorScheme.errorContainer, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.image_not_supported_rounded, - color: Theme.of(context).colorScheme.onErrorContainer, - ), - Text( - kImageErrorText, - style: TextStyle( - color: Theme.of(context).colorScheme.onErrorContainer, - ), - ), - ], - ), + return ColoredBox( + color: Theme.of(context).colorScheme.errorContainer, + child: Icon( + Icons.image_not_supported_rounded, + color: Theme.of(context).colorScheme.onErrorContainer, + size: 32, ), ); }, diff --git a/lib/shared/status_indicator.dart b/lib/shared/status_indicator.dart index 0d85e15..7fc04f6 100644 --- a/lib/shared/status_indicator.dart +++ b/lib/shared/status_indicator.dart @@ -67,7 +67,7 @@ class StatusIndicator extends StatelessWidget { width: 14, height: 14, child: sourcesRefreshing > 0 - ? const CircularProgressIndicator(strokeWidth: 2) + ? const CircularProgressIndicator.adaptive(strokeWidth: 2) : const Icon(Icons.check_rounded, size: 16), ), const SizedBox(width: kListSpacing),