This commit is contained in:
@@ -121,4 +121,11 @@ class TextWrapper {
|
||||
/// that, the selection color defaults to [DefaultSelectionStyle.defaultColor]
|
||||
/// (semi-transparent grey).
|
||||
final Color? selectionColor;
|
||||
|
||||
@override
|
||||
String toString() => 'TextWrapper(data: $data, style: $style, '
|
||||
'gradientColors: $gradientColors, textAlign: $textAlign, '
|
||||
'textDirection: $textDirection, softWrap: $softWrap, '
|
||||
'overflow: $overflow, maxLines: $maxLines, '
|
||||
'selectionColor: $selectionColor)';
|
||||
}
|
||||
|
||||
+1
-2
@@ -40,8 +40,7 @@ class SymbolButtonThemeExtensionDefault extends SymbolButtonThemeExtension {
|
||||
final textColor = MultiColor.single(theme.textTheme.bodyMedium?.color);
|
||||
|
||||
final style = SymbolButtonStyle(
|
||||
labelStyle:
|
||||
theme.textTheme.labelLarge?.copyWith(color: textColor.color),
|
||||
labelStyle: theme.textTheme.labelLarge?.copyWith(color: textColor.color),
|
||||
dimension: theme.buttonTheme.height * 1.5,
|
||||
radius: (theme.buttonTheme.shape is RoundedRectangleBorder)
|
||||
? (theme.buttonTheme.shape as RoundedRectangleBorder).borderRadius
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
export './card_component.dart';
|
||||
export './information_card_component.dart';
|
||||
export './portfolio_card_component.dart';
|
||||
export './pricing_card_component.dart';
|
||||
export './quote_card_component.dart';
|
||||
export './skill_card_component.dart';
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||
|
||||
part 'pricing_card_component.g.dart';
|
||||
|
||||
class PricingLine {
|
||||
const PricingLine({
|
||||
required this.data,
|
||||
this.icon,
|
||||
});
|
||||
|
||||
final TextWrapper data;
|
||||
final Widget? icon;
|
||||
|
||||
@override
|
||||
String toString() => 'PricingLine(data: $data, icon: $icon)';
|
||||
}
|
||||
|
||||
class Pricing {
|
||||
const Pricing({
|
||||
required this.price,
|
||||
this.period,
|
||||
this.hasAsterisk = false,
|
||||
});
|
||||
|
||||
final TextWrapper price;
|
||||
final TextWrapper? period;
|
||||
|
||||
/// If [hasAsterisk] is true then the price will be displayed with
|
||||
/// an asterisk to emphasize that it is a special price.
|
||||
final bool hasAsterisk;
|
||||
}
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class PricingCardComponent extends CardComponent
|
||||
with CopyWithMixin<$PricingCardComponentCWProxy> {
|
||||
const PricingCardComponent({
|
||||
this.axis,
|
||||
this.title,
|
||||
this.pricing,
|
||||
this.description,
|
||||
this.features,
|
||||
this.cta,
|
||||
super.radius,
|
||||
super.padding,
|
||||
super.borderColors,
|
||||
super.backgroundColors,
|
||||
super.stroke,
|
||||
super.minSize,
|
||||
super.maxSize,
|
||||
super.shadow,
|
||||
super.titleStyle,
|
||||
super.subtitleStyle,
|
||||
super.bodyStyle,
|
||||
super.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
/// Axis of the card
|
||||
///
|
||||
/// If [axis] is [Axis.horizontal] then only the first icon will be displayed.
|
||||
/// Used in header of the card.
|
||||
final Axis? axis;
|
||||
|
||||
/// Title of the card
|
||||
///
|
||||
/// If [axis] is [Axis.vertical] then icon of the title will be displayed
|
||||
/// above the title.
|
||||
final PricingLine? title;
|
||||
|
||||
/// Pricing of the card
|
||||
final Pricing? pricing;
|
||||
|
||||
/// Description of the card
|
||||
final TextWrapper? description;
|
||||
|
||||
/// List of special features of the card
|
||||
final List<PricingLine>? features;
|
||||
|
||||
/// CTA of the card
|
||||
final Widget? cta;
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'pricing_card_component.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentProxyGenerator
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $PricingCardComponentCWProxy {
|
||||
PricingCardComponent axis(Axis? axis);
|
||||
PricingCardComponent title(PricingLine? title);
|
||||
PricingCardComponent pricing(Pricing? pricing);
|
||||
PricingCardComponent description(TextWrapper? description);
|
||||
PricingCardComponent features(List<PricingLine>? features);
|
||||
PricingCardComponent cta(Widget? cta);
|
||||
PricingCardComponent radius(BorderRadiusGeometry? radius);
|
||||
PricingCardComponent padding(EdgeInsetsGeometry? padding);
|
||||
PricingCardComponent borderColors(MultiColor? borderColors);
|
||||
PricingCardComponent backgroundColors(MultiColor? backgroundColors);
|
||||
PricingCardComponent stroke(double? stroke);
|
||||
PricingCardComponent minSize(Size? minSize);
|
||||
PricingCardComponent maxSize(Size? maxSize);
|
||||
PricingCardComponent shadow(BoxShadow? shadow);
|
||||
PricingCardComponent titleStyle(TextStyle? titleStyle);
|
||||
PricingCardComponent subtitleStyle(TextStyle? subtitleStyle);
|
||||
PricingCardComponent bodyStyle(TextStyle? bodyStyle);
|
||||
PricingCardComponent background(Widget? background);
|
||||
PricingCardComponent key(Key? key);
|
||||
PricingCardComponent call({
|
||||
Axis? axis,
|
||||
PricingLine? title,
|
||||
Pricing? pricing,
|
||||
TextWrapper? description,
|
||||
List<PricingLine>? features,
|
||||
Widget? cta,
|
||||
BorderRadiusGeometry? radius,
|
||||
EdgeInsetsGeometry? padding,
|
||||
MultiColor? borderColors,
|
||||
MultiColor? backgroundColors,
|
||||
double? stroke,
|
||||
Size? minSize,
|
||||
Size? maxSize,
|
||||
BoxShadow? shadow,
|
||||
TextStyle? titleStyle,
|
||||
TextStyle? subtitleStyle,
|
||||
TextStyle? bodyStyle,
|
||||
Widget? background,
|
||||
Key? key,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user