// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'purchase_card.dart';

// **************************************************************************
// DesignSpecGenerator
// **************************************************************************

class _PurchaseCardDesignSpec extends PurchaseCardDesignSpec {
  _PurchaseCardDesignSpec._(
    this.measuredMetrics,
    this.specOffset,
    this.cardRadius,
    this.exhibitionRadius,
    this.exhibitionPositionedRect,
    this.extraBonusPadding,
    this.bonusFontSize,
    this.quantityFontSize,
    this.quantityPadding,
    this.quantityUnitSpacing,
    this.quantityUnitSize,
    this.illustrationSize,
    this.illustrationPadding,
    this.purchaseButtonTopSpacing,
    this.purchaseButtonSize,
    this.labelSize,
    this.labelTopSpacing,
    this.labalEndSpacing,
  );

  static final designMetrics = DesignMetrics.create(const Size(210.0, 320.0));

  static final Map<String, _PurchaseCardDesignSpec> _cache = {};

  @override
  final BorderRadius cardRadius;

  @override
  final BorderRadius exhibitionRadius;

  @override
  final Rect exhibitionPositionedRect;

  @override
  final EdgeInsets extraBonusPadding;

  @override
  final double bonusFontSize;

  @override
  final double quantityFontSize;

  @override
  final EdgeInsets quantityPadding;

  @override
  final double quantityUnitSpacing;

  @override
  final double quantityUnitSize;

  @override
  final Size illustrationSize;

  @override
  final EdgeInsets illustrationPadding;

  @override
  final double purchaseButtonTopSpacing;

  @override
  final Size purchaseButtonSize;

  @override
  final double labelSize;

  @override
  final double labelTopSpacing;

  @override
  final double labalEndSpacing;

  @override
  final MeasuredMetrics measuredMetrics;

  @override
  final Offset specOffset;

  @override
  Size get measuredSize => measuredMetrics.size;

  static _PurchaseCardDesignSpec _create(
    Size measuredSize, {
    Offset offset = Offset.zero,
  }) {
    final _measuredMetrics = designMetrics.measure(measuredSize);
    return _PurchaseCardDesignSpec._(
      _measuredMetrics, offset,
      BorderRadius.circular(_measuredMetrics.measureHeight(24.0)),
      BorderRadius.circular(_measuredMetrics.measureHeight(12.0)),
      Rect.fromLTRB(
          _measuredMetrics.measureHorizontal(12.0),
          _measuredMetrics.measureVertical(13.0),
          _measuredMetrics.measureHorizontal(12.0),
          _measuredMetrics.measureVertical(106.0)), // exhibitionPositionedRect
      EdgeInsets.only(
          left: _measuredMetrics.measureHorizontal(12.0),
          right: _measuredMetrics.measureHorizontal(12.0),
          top: _measuredMetrics.measureVertical(22.0),
          bottom: _measuredMetrics.measureVertical(2.0)),
      _measuredMetrics.measureFontSize(18.0), // bonusFontSize
      _measuredMetrics.measureAbsoluteFontSize(36.0,
          consistent: false), // quantityFontSize
      EdgeInsets.only(
          left: _measuredMetrics.measureHorizontal(12.0),
          right: _measuredMetrics.measureHorizontal(12.0),
          top: 0.0,
          bottom: 0.0),
      _measuredMetrics.measureHeight(4.0,
          consistent: false), // quantityUnitSpacing
      _measuredMetrics.measureHeight(34.0,
          consistent: false), // quantityUnitSize
      Size(_measuredMetrics.measureWidth(144.0),
          _measuredMetrics.measureHeight(112.0)), // illustrationSize
      EdgeInsets.only(
          left: 0.0,
          right: 0.0,
          top: _measuredMetrics.measureVertical(18.0),
          bottom: _measuredMetrics.measureVertical(12.0)),
      _measuredMetrics.measureHeight(12.0,
          consistent: true), // purchaseButtonTopSpacing
      Size(_measuredMetrics.measureHeight(60.0, consistent: true) * 2.83333333,
          _measuredMetrics.measureHeight(60.0, consistent: true)), // purchaseButtonSize
      _measuredMetrics.measureHeight(92.0, consistent: true), // labelSize
      _measuredMetrics.measureHeight(88.0,
          consistent: true), // labelTopSpacing
      _measuredMetrics.measureWidth(6.0), // labalEndSpacing
    );
  }

  static PurchaseCardDesignSpec from(
    Size size, {
    Offset offset = Offset.zero,
  }) {
    final Size measuredSize = size;
    final key = BasicDesignSpec.buildSpecKey(measuredSize, offset);
    _PurchaseCardDesignSpec? designSpec = _cache[key];
    if (kDebugMode || designSpec == null) {
      designSpec = _create(measuredSize, offset: offset);
      _cache[key] = designSpec;
    }
    return designSpec;
  }
}
