File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,7 @@ import 'package:ui_kit/ui_kit.dart';
1111/// {@endtemplate}
1212class DemoBannerAdWidget extends StatelessWidget {
1313 /// {@macro demo_banner_ad_widget}
14- const DemoBannerAdWidget ({
15- this .headlineImageStyle,
16- super .key,
17- });
14+ const DemoBannerAdWidget ({this .headlineImageStyle, super .key});
1815
1916 /// The user's preference for feed layout, used to determine the ad's visual size.
2017 final HeadlineImageStyle ? headlineImageStyle;
@@ -24,7 +21,8 @@ class DemoBannerAdWidget extends StatelessWidget {
2421 final theme = Theme .of (context);
2522
2623 // Determine the height based on the headlineImageStyle, mimicking real ad widgets.
27- final double adHeight = headlineImageStyle == HeadlineImageStyle .largeThumbnail
24+ final adHeight =
25+ headlineImageStyle == HeadlineImageStyle .largeThumbnail
2826 ? 250 // Height for mediumRectangle banner
2927 : 50 ; // Height for standard banner
3028
@@ -34,7 +32,7 @@ class DemoBannerAdWidget extends StatelessWidget {
3432 vertical: AppSpacing .xs,
3533 ),
3634 child: SizedBox (
37- height: adHeight,
35+ height: adHeight. toDouble () ,
3836 width: double .infinity,
3937 child: Center (
4038 child: Text (
Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
2- import 'package:go_router/go_router.dart' ;
32import 'package:flutter_news_app_mobile_client_full_source_code/l10n/app_localizations.dart' ;
43import 'package:ui_kit/ui_kit.dart' ;
54
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ class DemoNativeAdWidget extends StatelessWidget {
2222 final l10n = AppLocalizations .of (context);
2323
2424 // Determine the height based on the headlineImageStyle, mimicking real ad widgets.
25- final double adHeight = headlineImageStyle == HeadlineImageStyle .largeThumbnail
25+ final adHeight =
26+ headlineImageStyle == HeadlineImageStyle .largeThumbnail
2627 ? 340 // Height for medium native ad template
2728 : 120 ; // Height for small native ad template
2829
@@ -32,7 +33,7 @@ class DemoNativeAdWidget extends StatelessWidget {
3233 vertical: AppSpacing .xs,
3334 ),
3435 child: SizedBox (
35- height: adHeight,
36+ height: adHeight. toDouble () ,
3637 width: double .infinity,
3738 child: Center (
3839 child: Text (
@@ -47,4 +48,3 @@ class DemoNativeAdWidget extends StatelessWidget {
4748 );
4849 }
4950}
50-
You can’t perform that action at this time.
0 commit comments