Skip to content

Commit

Permalink
Further updates to fields of the widget_toolkit themes
Browse files Browse the repository at this point in the history
  • Loading branch information
DDavidPrime committed Apr 4, 2024
1 parent e55f1db commit dd3216b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
required this.bottomSheetPaddingAlternative,
required this.spacingXS,
required this.spacingS,
required this.spacingL,
required this.spacingM,
required this.spacingXL,
required this.spacingXXL,
required this.spacingXXXXL,
required this.textButtonIconRightPadding,
required this.textButtonPadding,
required this.appBarTextButtonPadding,
Expand Down Expand Up @@ -290,9 +292,11 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
bottomSheetPaddingAlternative = const EdgeInsets.all(16),
spacingXS = WidgetToolkitDesignSystem.light().spacings.xs1,
spacingS = WidgetToolkitDesignSystem.light().spacings.s,
spacingL = WidgetToolkitDesignSystem.light().spacings.l,
spacingM = WidgetToolkitDesignSystem.light().spacings.m,
spacingXL = WidgetToolkitDesignSystem.light().spacings.xl,
spacingXXL = WidgetToolkitDesignSystem.light().spacings.xxl,
spacingXXXXL = WidgetToolkitDesignSystem.light().spacings.xxxxl,
textButtonIconRightPadding =
WidgetToolkitDesignSystem.light().spacings.s,
textButtonPadding = WidgetToolkitDesignSystem.light().spacings.xs,
Expand Down Expand Up @@ -476,9 +480,11 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
bottomSheetPaddingAlternative = const EdgeInsets.all(16),
spacingXS = WidgetToolkitDesignSystem.dark().spacings.xs1,
spacingS = WidgetToolkitDesignSystem.dark().spacings.s,
spacingL = WidgetToolkitDesignSystem.dark().spacings.l,
spacingM = WidgetToolkitDesignSystem.dark().spacings.m,
spacingXL = WidgetToolkitDesignSystem.dark().spacings.xl,
spacingXXL = WidgetToolkitDesignSystem.dark().spacings.xxl,
spacingXXXXL = WidgetToolkitDesignSystem.dark().spacings.xxxxl,
textButtonIconRightPadding =
WidgetToolkitDesignSystem.dark().spacings.s,
textButtonPadding = WidgetToolkitDesignSystem.dark().spacings.xs,
Expand Down Expand Up @@ -676,16 +682,22 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
final EdgeInsets messagePanelEdgeInsets;
@override
final EdgeInsets bottomSheetPaddingAlternative;

@override
final double spacingXS;
@override
final double spacingS;
@override
final double spacingL;
@override
final double spacingM;
@override
final double spacingXL;
@override
final double spacingXXL;
@override
final double spacingXXXXL;

@override
final double textButtonIconRightPadding;
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
EdgeInsets get bottomSheetPaddingAlternative;
double get spacingXS;
double get spacingS;
double get spacingL;
double get spacingM;
double get spacingXL;
double get spacingXXL;
double get spacingXXXXL;
double get textButtonIconRightPadding;
double get textButtonPadding;
double get appBarTextButtonPadding;
Expand Down Expand Up @@ -211,9 +213,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
EdgeInsets? bottomSheetPaddingAlternative,
double? spacingXS,
double? spacingS,
double? spacingL,
double? spacingM,
double? spacingXL,
double? spacingXXL,
double? spacingXXXXL,
double? textButtonIconRightPadding,
double? textButtonPadding,
double? appBarTextButtonPadding,
Expand Down Expand Up @@ -395,9 +399,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
bottomSheetPaddingAlternative ?? this.bottomSheetPaddingAlternative,
spacingXS: spacingXS ?? this.spacingXS,
spacingS: spacingS ?? this.spacingS,
spacingL: spacingL ?? this.spacingL,
spacingM: spacingM ?? this.spacingM,
spacingXL: spacingXL ?? this.spacingXL,
spacingXXL: spacingXXL ?? this.spacingXXL,
spacingXXXXL: spacingXXXXL ?? this.spacingXXXXL,
textButtonIconRightPadding:
textButtonIconRightPadding ?? this.textButtonIconRightPadding,
textButtonPadding: textButtonPadding ?? this.textButtonPadding,
Expand Down Expand Up @@ -630,9 +636,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
: other.bottomSheetPaddingAlternative,
spacingXS: t < 0.5 ? spacingXS : other.spacingXS,
spacingS: t < 0.5 ? spacingS : other.spacingS,
spacingL: t < 0.5 ? spacingL : other.spacingL,
spacingM: t < 0.5 ? spacingM : other.spacingM,
spacingXL: t < 0.5 ? spacingXL : other.spacingXL,
spacingXXL: t < 0.5 ? spacingXXL : other.spacingXXL,
spacingXXXXL: t < 0.5 ? spacingXXXXL : other.spacingXXXXL,
textButtonIconRightPadding: t < 0.5
? textButtonIconRightPadding
: other.textButtonIconRightPadding,
Expand Down Expand Up @@ -770,9 +778,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
const DeepCollectionEquality().equals(bottomSheetPaddingAlternative, other.bottomSheetPaddingAlternative) &&
const DeepCollectionEquality().equals(spacingXS, other.spacingXS) &&
const DeepCollectionEquality().equals(spacingS, other.spacingS) &&
const DeepCollectionEquality().equals(spacingL, other.spacingL) &&
const DeepCollectionEquality().equals(spacingM, other.spacingM) &&
const DeepCollectionEquality().equals(spacingXL, other.spacingXL) &&
const DeepCollectionEquality().equals(spacingXXL, other.spacingXXL) &&
const DeepCollectionEquality().equals(spacingXXXXL, other.spacingXXXXL) &&
const DeepCollectionEquality().equals(textButtonIconRightPadding, other.textButtonIconRightPadding) &&
const DeepCollectionEquality().equals(textButtonPadding, other.textButtonPadding) &&
const DeepCollectionEquality().equals(appBarTextButtonPadding, other.appBarTextButtonPadding) &&
Expand Down Expand Up @@ -885,9 +895,11 @@ mixin _$WidgetToolkitThemeTailorMixin on ThemeExtension<WidgetToolkitTheme> {
const DeepCollectionEquality().hash(bottomSheetPaddingAlternative),
const DeepCollectionEquality().hash(spacingXS),
const DeepCollectionEquality().hash(spacingS),
const DeepCollectionEquality().hash(spacingL),
const DeepCollectionEquality().hash(spacingM),
const DeepCollectionEquality().hash(spacingXL),
const DeepCollectionEquality().hash(spacingXXL),
const DeepCollectionEquality().hash(spacingXXXXL),
const DeepCollectionEquality().hash(textButtonIconRightPadding),
const DeepCollectionEquality().hash(textButtonPadding),
const DeepCollectionEquality().hash(appBarTextButtonPadding),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
required this.labelBoxOptionalBackground,
required this.labelBoxOptionalBorder,
required this.editFieldBorderRadius,
required this.spacingXS,
required this.spacingXXXS,
required this.spacingXSS,
required this.spacingXS,
required this.spacingS,
required this.spacingM,
required this.spacingL,
required this.spacingXL,
required this.spacingXXXS,
required this.descriptionThin,
required this.titleBold,
required this.descriptionBold,
Expand Down Expand Up @@ -128,7 +127,6 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
spacingXSS = WidgetToolkitDesignSystem.light().spacings.xss,
spacingS = WidgetToolkitDesignSystem.light().spacings.s,
spacingM = WidgetToolkitDesignSystem.light().spacings.m,
spacingL = WidgetToolkitDesignSystem.light().spacings.l,
spacingXL = WidgetToolkitDesignSystem.light().spacings.xl,
spacingXXXS = WidgetToolkitDesignSystem.light().spacings.xxxs,
descriptionThin =
Expand Down Expand Up @@ -285,7 +283,6 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
spacingXSS = WidgetToolkitDesignSystem.dark().spacings.xss,
spacingS = WidgetToolkitDesignSystem.dark().spacings.s,
spacingM = WidgetToolkitDesignSystem.dark().spacings.m,
spacingL = WidgetToolkitDesignSystem.dark().spacings.l,
spacingXL = WidgetToolkitDesignSystem.dark().spacings.xl,
spacingXXXS = WidgetToolkitDesignSystem.dark().spacings.xxxs,
descriptionThin =
Expand Down Expand Up @@ -438,8 +435,6 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
@override
final double spacingM;
@override
final double spacingL;
@override
final double spacingXL;
@override
final double spacingXXXS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mixin _$TextFieldDialogThemeTailorMixin
double get spacingXSS;
double get spacingS;
double get spacingM;
double get spacingL;
double get spacingXL;
double get spacingXXXS;
TextStyle get descriptionThin;
Expand Down Expand Up @@ -109,7 +108,6 @@ mixin _$TextFieldDialogThemeTailorMixin
double? spacingXSS,
double? spacingS,
double? spacingM,
double? spacingL,
double? spacingXL,
double? spacingXXXS,
TextStyle? descriptionThin,
Expand Down Expand Up @@ -203,7 +201,6 @@ mixin _$TextFieldDialogThemeTailorMixin
spacingXSS: spacingXSS ?? this.spacingXSS,
spacingS: spacingS ?? this.spacingS,
spacingM: spacingM ?? this.spacingM,
spacingL: spacingL ?? this.spacingL,
spacingXL: spacingXL ?? this.spacingXL,
spacingXXXS: spacingXXXS ?? this.spacingXXXS,
descriptionThin: descriptionThin ?? this.descriptionThin,
Expand Down Expand Up @@ -362,7 +359,6 @@ mixin _$TextFieldDialogThemeTailorMixin
spacingXSS: t < 0.5 ? spacingXSS : other.spacingXSS,
spacingS: t < 0.5 ? spacingS : other.spacingS,
spacingM: t < 0.5 ? spacingM : other.spacingM,
spacingL: t < 0.5 ? spacingL : other.spacingL,
spacingXL: t < 0.5 ? spacingXL : other.spacingXL,
spacingXXXS: t < 0.5 ? spacingXXXS : other.spacingXXXS,
descriptionThin:
Expand Down Expand Up @@ -547,7 +543,6 @@ mixin _$TextFieldDialogThemeTailorMixin
.equals(spacingXSS, other.spacingXSS) &&
const DeepCollectionEquality().equals(spacingS, other.spacingS) &&
const DeepCollectionEquality().equals(spacingM, other.spacingM) &&
const DeepCollectionEquality().equals(spacingL, other.spacingL) &&
const DeepCollectionEquality().equals(spacingXL, other.spacingXL) &&
const DeepCollectionEquality()
.equals(spacingXXXS, other.spacingXXXS) &&
Expand Down Expand Up @@ -649,7 +644,6 @@ mixin _$TextFieldDialogThemeTailorMixin
const DeepCollectionEquality().hash(spacingXSS),
const DeepCollectionEquality().hash(spacingS),
const DeepCollectionEquality().hash(spacingM),
const DeepCollectionEquality().hash(spacingL),
const DeepCollectionEquality().hash(spacingXL),
const DeepCollectionEquality().hash(spacingXXXS),
const DeepCollectionEquality().hash(descriptionThin),
Expand Down
2 changes: 1 addition & 1 deletion packages/widget_toolkit_qr/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HomePage extends StatelessWidget {
),
body: Padding(
padding: EdgeInsets.symmetric(
horizontal: context.widgetToolkitTheme.spacingXXXXL1,
horizontal: context.widgetToolkitTheme.spacingXXXXL,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class _CameraPermissionWidget extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
context.widgetToolkitTheme.spacingXS1,
context.widgetToolkitTheme.spacingXS,
),
border: Border.all(
color: context.qrScannerTheme
Expand Down

0 comments on commit dd3216b

Please sign in to comment.