From 3b7418c01a7d0582b63121cf4c20e927a495a6cd Mon Sep 17 00:00:00 2001 From: jakubbaldyga Date: Fri, 13 Dec 2024 15:15:58 +0100 Subject: [PATCH] repaired code to pass gh actions checks --- .../presentation/digital_guide_view.dart | 5 ++--- .../guide_detail_view/guide_detail_view.dart | 1 - .../detail_views/sliver_header_section.dart | 2 -- lib/widgets/detail_views/sliver_logo.dart | 4 +--- .../zoomable_optimized_directus_image.dart | 21 +++++++------------ 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/lib/features/digital_guide_view/general_info/presentation/digital_guide_view.dart b/lib/features/digital_guide_view/general_info/presentation/digital_guide_view.dart index 70eca89c..2d6b6e55 100644 --- a/lib/features/digital_guide_view/general_info/presentation/digital_guide_view.dart +++ b/lib/features/digital_guide_view/general_info/presentation/digital_guide_view.dart @@ -9,7 +9,6 @@ import "../../../../utils/context_extensions.dart"; import "../../../../utils/determine_contact_icon.dart"; import "../../../../widgets/detail_views/contact_section.dart"; import "../../../../widgets/detail_views/detail_view_app_bar.dart"; -import "../../../../widgets/my_cached_image.dart"; import "../../../../widgets/my_error_widget.dart"; import "../../../../widgets/zoomable_optimized_directus_image.dart"; import "../data/models/digital_guide_response_extended.dart"; @@ -56,9 +55,9 @@ class _DigitalGuideView extends ConsumerWidget { final widgets1 = [ const SizedBox(height: DetailViewsConfig.heightImage), SizedBox( - height: 254, + height: DetailViewsConfig.heightImage, child: ZoomableOptimizedDirectusImage( - digitalGuideResponseExtended.imageUrl, + digitalGuideResponseExtended.imageUrl, ), ), HeadlinesSection( diff --git a/lib/features/guide_detail_view/guide_detail_view.dart b/lib/features/guide_detail_view/guide_detail_view.dart index 17b2aee3..f215f159 100644 --- a/lib/features/guide_detail_view/guide_detail_view.dart +++ b/lib/features/guide_detail_view/guide_detail_view.dart @@ -13,7 +13,6 @@ import "../../widgets/loading_widgets/simple_previews/preview_text_prototype.dar import "../../widgets/my_error_widget.dart"; import "../../widgets/my_expansion_tile.dart"; import "../../widgets/my_html_widget.dart"; -import "../../widgets/optimized_directus_image.dart"; import "../../widgets/zoomable_optimized_directus_image.dart"; import "repository/guide_detail_view_repository.dart"; import "utils/get_the_latest_date.dart"; diff --git a/lib/widgets/detail_views/sliver_header_section.dart b/lib/widgets/detail_views/sliver_header_section.dart index 33c0a94e..31803021 100644 --- a/lib/widgets/detail_views/sliver_header_section.dart +++ b/lib/widgets/detail_views/sliver_header_section.dart @@ -3,7 +3,6 @@ import "dart:math"; import "package:flutter/material.dart"; import "../../config/ui_config.dart"; -import "../optimized_directus_image.dart"; import "../zoomable_optimized_directus_image.dart"; import "sliver_logo.dart"; @@ -57,7 +56,6 @@ class SliverHeaderSection extends SliverPersistentHeaderDelegate { child: ZoomableOptimizedDirectusImage(backgroundImageUrl), ), ), - SliverLogo( scaleFactor: scaleFactor, activeGradient: activeGradient, diff --git a/lib/widgets/detail_views/sliver_logo.dart b/lib/widgets/detail_views/sliver_logo.dart index faa73da3..827da326 100644 --- a/lib/widgets/detail_views/sliver_logo.dart +++ b/lib/widgets/detail_views/sliver_logo.dart @@ -1,6 +1,5 @@ import "package:flutter/material.dart"; -import "../optimized_directus_image.dart"; import "../zoomable_optimized_directus_image.dart"; class SliverLogo extends StatelessWidget { @@ -47,7 +46,7 @@ class SliverLogo extends StatelessWidget { fit: BoxFit.scaleDown, child: SizedBox.square( dimension: logoSize * scaleFactor, - child: ZoomableOptimizedDirectusImage( + child: ZoomableOptimizedDirectusImage( logoDirectusUrl, boxFit: boxfit, noShimmeringLoading: noShimmeringLoading, @@ -62,4 +61,3 @@ class SliverLogo extends StatelessWidget { ); } } - diff --git a/lib/widgets/zoomable_optimized_directus_image.dart b/lib/widgets/zoomable_optimized_directus_image.dart index 861240f8..b37ea8c7 100644 --- a/lib/widgets/zoomable_optimized_directus_image.dart +++ b/lib/widgets/zoomable_optimized_directus_image.dart @@ -1,18 +1,14 @@ -import "dart:ui"; - -import 'package:flutter/material.dart'; +import "package:flutter/material.dart"; import "../theme/colors.dart"; import "optimized_directus_image.dart"; - class ZoomableOptimizedDirectusImage extends StatelessWidget { - const ZoomableOptimizedDirectusImage( - this.imageUrl, { - super.key, - this.noShimmeringLoading = false, - this.boxFit = BoxFit.cover, - }); + this.imageUrl, { + super.key, + this.noShimmeringLoading = false, + this.boxFit = BoxFit.cover, + }); final String? imageUrl; final bool noShimmeringLoading; @@ -35,8 +31,7 @@ class ZoomableOptimizedDirectusImage extends StatelessWidget { Future _showFullScreenImage(BuildContext context) async { await Navigator.of(context).push( MaterialPageRoute( - builder: (newContext) => - Scaffold( + builder: (newContext) => Scaffold( backgroundColor: ColorsConsts.greyLight, body: GestureDetector( onTap: () { @@ -56,4 +51,4 @@ class ZoomableOptimizedDirectusImage extends StatelessWidget { ), ); } -} \ No newline at end of file +}