191 lines
5.4 KiB
Dart
191 lines
5.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'purchase_banner.dart';
|
|
|
|
// **************************************************************************
|
|
// DesignSpecGenerator
|
|
// **************************************************************************
|
|
|
|
class _PurchaseBannerDesignSpec extends PurchaseBannerDesignSpec {
|
|
_PurchaseBannerDesignSpec._(
|
|
this.measuredMetrics,
|
|
this.specOffset,
|
|
this.bannerHorizontalSpcing,
|
|
this.bannerHeight,
|
|
this.bannerRadius,
|
|
this.removeAdsBackgroungWidth,
|
|
this.removeAdsImageWidth,
|
|
this.removeAdsImageEndSpacing,
|
|
this.removeAdsImageVerticalSpacing,
|
|
this.productDetailsWidth,
|
|
this.productDetailsFontSize,
|
|
this.productPriceFontSize,
|
|
this.productPriceTextShadowOffset,
|
|
this.productDetailsTopSpacing,
|
|
this.productDetailsStartSpacing,
|
|
this.productDetailsEndSpacing,
|
|
this.purchaseButtonTopSpacing,
|
|
this.purchaseButtonHeight,
|
|
this.purchaseButtonWidth,
|
|
this.tipsSpacing,
|
|
this.tipsSize,
|
|
this.tipsMinHeight,
|
|
this.tipsWidth,
|
|
this.tipsFontSize,
|
|
this.tipsGap,
|
|
this.tipsRadius,
|
|
this.tipsContentPadding,
|
|
this.summaryHeight,
|
|
);
|
|
|
|
static final designMetrics = DesignMetrics.create(const Size(750.0, 200.0));
|
|
|
|
static final Map<String, _PurchaseBannerDesignSpec> _cache = {};
|
|
|
|
@override
|
|
final double bannerHorizontalSpcing;
|
|
|
|
@override
|
|
final double bannerHeight;
|
|
|
|
@override
|
|
final double bannerRadius;
|
|
|
|
@override
|
|
final double removeAdsBackgroungWidth;
|
|
|
|
@override
|
|
final double removeAdsImageWidth;
|
|
|
|
@override
|
|
final double removeAdsImageEndSpacing;
|
|
|
|
@override
|
|
final double removeAdsImageVerticalSpacing;
|
|
|
|
@override
|
|
final double productDetailsWidth;
|
|
|
|
@override
|
|
final double productDetailsFontSize;
|
|
|
|
@override
|
|
final double productPriceFontSize;
|
|
|
|
@override
|
|
final Offset productPriceTextShadowOffset;
|
|
|
|
@override
|
|
final double productDetailsTopSpacing;
|
|
|
|
@override
|
|
final double productDetailsStartSpacing;
|
|
|
|
@override
|
|
final double productDetailsEndSpacing;
|
|
|
|
@override
|
|
final double purchaseButtonTopSpacing;
|
|
|
|
@override
|
|
final double purchaseButtonHeight;
|
|
|
|
@override
|
|
final double purchaseButtonWidth;
|
|
|
|
@override
|
|
final double tipsSpacing;
|
|
|
|
@override
|
|
final double tipsSize;
|
|
|
|
@override
|
|
final double tipsMinHeight;
|
|
|
|
@override
|
|
final double tipsWidth;
|
|
|
|
@override
|
|
final double tipsFontSize;
|
|
|
|
@override
|
|
final double tipsGap;
|
|
|
|
@override
|
|
final double tipsRadius;
|
|
|
|
@override
|
|
final EdgeInsets tipsContentPadding;
|
|
|
|
@override
|
|
final double summaryHeight;
|
|
|
|
@override
|
|
final MeasuredMetrics measuredMetrics;
|
|
|
|
@override
|
|
final Offset specOffset;
|
|
|
|
@override
|
|
Size get measuredSize => measuredMetrics.size;
|
|
|
|
static _PurchaseBannerDesignSpec _create(
|
|
Size measuredSize, {
|
|
Offset offset = Offset.zero,
|
|
}) {
|
|
final _measuredMetrics = designMetrics.measure(measuredSize);
|
|
return _PurchaseBannerDesignSpec._(
|
|
_measuredMetrics, offset,
|
|
_measuredMetrics.measureHorizontal(40.0), // bannerHorizontalSpcing
|
|
_measuredMetrics.measureHeight(200.0, consistent: false), // bannerHeight
|
|
12.0, // bannerRadius
|
|
_measuredMetrics.measureHorizontal(354.0), // removeAdsBackgroungWidth
|
|
_measuredMetrics.measureHeight(144.0,
|
|
consistent: false), // removeAdsImageWidth
|
|
_measuredMetrics.measureVertical(80.0), // removeAdsImageEndSpacing
|
|
_measuredMetrics.measureVertical(28.0), // removeAdsImageVerticalSpacing
|
|
_measuredMetrics.measureWidth(390.0), // productDetailsWidth
|
|
_measuredMetrics.measureAbsoluteFontSize(26.0,
|
|
consistent: true), // productDetailsFontSize
|
|
_measuredMetrics.measureFontSize(26.0), // productPriceFontSize
|
|
Offset(
|
|
0.0,
|
|
_measuredMetrics
|
|
.measureVertical(1.0)), // productPriceTextShadowOffset
|
|
_measuredMetrics.measureVertical(32.0), // productDetailsTopSpacing
|
|
_measuredMetrics.measureHorizontal(40.0), // productDetailsStartSpacing
|
|
_measuredMetrics.measureHorizontal(300.0), // productDetailsEndSpacing
|
|
_measuredMetrics.measureVertical(20.0), // purchaseButtonTopSpacing
|
|
_measuredMetrics.measureVertical(56.0), // purchaseButtonHeight
|
|
_measuredMetrics.measureWidth(168.0), // purchaseButtonWidth
|
|
_measuredMetrics.measureVertical(16.0), // tipsSpacing
|
|
_measuredMetrics.measureHeight(40.0, consistent: false), // tipsSize
|
|
_measuredMetrics.measureHeight(136.0, consistent: false), // tipsMinHeight
|
|
_measuredMetrics.measureWidth(486.0), // tipsWidth
|
|
_measuredMetrics.measureFontSize(26.0), // tipsFontSize
|
|
_measuredMetrics.measureVertical(12.0), // tipsGap
|
|
_measuredMetrics.measureHeight(24.0, consistent: false), // tipsRadius
|
|
EdgeInsets.only(
|
|
left: _measuredMetrics.measureWidth(32.0),
|
|
right: _measuredMetrics.measureWidth(32.0),
|
|
top: _measuredMetrics.measureHeight(22.0),
|
|
bottom: _measuredMetrics.measureHeight(26.0)),
|
|
_measuredMetrics.measureHeight(70.0, consistent: true), // summaryHeight
|
|
);
|
|
}
|
|
|
|
static PurchaseBannerDesignSpec from(
|
|
Size size, {
|
|
Offset offset = Offset.zero,
|
|
}) {
|
|
final Size measuredSize = size;
|
|
final key = BasicDesignSpec.buildSpecKey(measuredSize, offset);
|
|
_PurchaseBannerDesignSpec? designSpec = _cache[key];
|
|
if (kDebugMode || designSpec == null) {
|
|
designSpec = _create(measuredSize, offset: offset);
|
|
_cache[key] = designSpec;
|
|
}
|
|
return designSpec;
|
|
}
|
|
}
|