master #81
@ -107,6 +107,30 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
|
|||||||
final TextStyle? subTitle;
|
final TextStyle? subTitle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FileSelectionButtonStyle mergeWith(FileSelectionButtonStyle? other) =>
|
FileSelectionButtonStyle? mergeWith(FileSelectionButtonStyle? other) =>
|
||||||
FileSelectionButtonStyle.merge(this, other)!;
|
FileSelectionButtonStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FileSelectionButtonStyle? copyWith({
|
||||||
|
TextStyle? title,
|
||||||
|
TextStyle? subTitle,
|
||||||
|
BorderRadiusGeometry? radius,
|
||||||
|
EdgeInsetsGeometry? padding,
|
||||||
|
MultiColor? foregroundColors,
|
||||||
|
MultiColor? backgroundColors,
|
||||||
|
MultiColor? borderColors,
|
||||||
|
double? stroke,
|
||||||
|
BoxShadow? shadow,
|
||||||
|
}) =>
|
||||||
|
FileSelectionButtonStyle(
|
||||||
|
title: title ?? this.title,
|
||||||
|
subTitle: subTitle ?? this.subTitle,
|
||||||
|
radius: radius ?? this.radius,
|
||||||
|
padding: padding ?? this.padding,
|
||||||
|
foregroundColors: foregroundColors ?? this.foregroundColors,
|
||||||
|
backgroundColors: backgroundColors ?? this.backgroundColors,
|
||||||
|
borderColors: borderColors ?? this.borderColors,
|
||||||
|
stroke: stroke ?? this.stroke,
|
||||||
|
shadow: shadow ?? this.shadow,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,28 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
|
|||||||
final TextStyle? label;
|
final TextStyle? label;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FlatButtonStyle mergeWith(FlatButtonStyle? other) =>
|
FlatButtonStyle? mergeWith(FlatButtonStyle? other) =>
|
||||||
FlatButtonStyle.merge(this, other)!;
|
FlatButtonStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FlatButtonStyle? copyWith({
|
||||||
|
TextStyle? label,
|
||||||
|
BorderRadiusGeometry? radius,
|
||||||
|
EdgeInsetsGeometry? padding,
|
||||||
|
MultiColor? foregroundColors,
|
||||||
|
MultiColor? backgroundColors,
|
||||||
|
MultiColor? borderColors,
|
||||||
|
double? stroke,
|
||||||
|
BoxShadow? shadow,
|
||||||
|
}) =>
|
||||||
|
FlatButtonStyle(
|
||||||
|
label: label ?? this.label,
|
||||||
|
radius: radius ?? this.radius,
|
||||||
|
padding: padding ?? this.padding,
|
||||||
|
foregroundColors: foregroundColors ?? this.foregroundColors,
|
||||||
|
backgroundColors: backgroundColors ?? this.backgroundColors,
|
||||||
|
borderColors: borderColors ?? this.borderColors,
|
||||||
|
stroke: stroke ?? this.stroke,
|
||||||
|
shadow: shadow ?? this.shadow,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,28 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
|
|||||||
final double? dimension;
|
final double? dimension;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SimpleIconButtonStyle mergeWith(SimpleIconButtonStyle? other) =>
|
SimpleIconButtonStyle? mergeWith(SimpleIconButtonStyle? other) =>
|
||||||
SimpleIconButtonStyle.merge(this, other)!;
|
SimpleIconButtonStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
SimpleIconButtonStyle copyWith({
|
||||||
|
double? dimension,
|
||||||
|
BorderRadiusGeometry? radius,
|
||||||
|
EdgeInsetsGeometry? padding,
|
||||||
|
MultiColor? foregroundColors,
|
||||||
|
MultiColor? backgroundColors,
|
||||||
|
MultiColor? borderColors,
|
||||||
|
double? stroke,
|
||||||
|
BoxShadow? shadow,
|
||||||
|
}) =>
|
||||||
|
SimpleIconButtonStyle(
|
||||||
|
dimension: dimension ?? this.dimension,
|
||||||
|
radius: radius ?? this.radius,
|
||||||
|
padding: padding ?? this.padding,
|
||||||
|
foregroundColors: foregroundColors ?? this.foregroundColors,
|
||||||
|
backgroundColors: backgroundColors ?? this.backgroundColors,
|
||||||
|
borderColors: borderColors ?? this.borderColors,
|
||||||
|
stroke: stroke ?? this.stroke,
|
||||||
|
shadow: shadow ?? this.shadow,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,30 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
|
|||||||
final double? dimension;
|
final double? dimension;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SymbolButtonStyle mergeWith(SymbolButtonStyle? other) =>
|
SymbolButtonStyle? mergeWith(SymbolButtonStyle? other) =>
|
||||||
SymbolButtonStyle.merge(this, other)!;
|
SymbolButtonStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
SymbolButtonStyle? copyWith({
|
||||||
|
TextStyle? label,
|
||||||
|
double? dimension,
|
||||||
|
BorderRadiusGeometry? radius,
|
||||||
|
EdgeInsetsGeometry? padding,
|
||||||
|
MultiColor? foregroundColors,
|
||||||
|
MultiColor? backgroundColors,
|
||||||
|
MultiColor? borderColors,
|
||||||
|
double? stroke,
|
||||||
|
BoxShadow? shadow,
|
||||||
|
}) =>
|
||||||
|
SymbolButtonStyle(
|
||||||
|
label: label ?? this.label,
|
||||||
|
dimension: dimension ?? this.dimension,
|
||||||
|
radius: radius ?? this.radius,
|
||||||
|
padding: padding ?? this.padding,
|
||||||
|
foregroundColors: foregroundColors ?? this.foregroundColors,
|
||||||
|
backgroundColors: backgroundColors ?? this.backgroundColors,
|
||||||
|
borderColors: borderColors ?? this.borderColors,
|
||||||
|
stroke: stroke ?? this.stroke,
|
||||||
|
shadow: shadow ?? this.shadow,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,17 @@ class LoaderStyle extends ThemeStyle<LoaderStyle> {
|
|||||||
final double? stroke;
|
final double? stroke;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
LoaderStyle mergeWith(LoaderStyle? other) => LoaderStyle.merge(this, other)!;
|
LoaderStyle? mergeWith(LoaderStyle? other) => LoaderStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
LoaderStyle copyWith({
|
||||||
|
MultiColor? colors,
|
||||||
|
double? stroke,
|
||||||
|
}) =>
|
||||||
|
LoaderStyle(
|
||||||
|
colors: colors ?? this.colors,
|
||||||
|
stroke: stroke ?? this.stroke,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'LoaderStyle($colors, $stroke)';
|
String toString() => 'LoaderStyle($colors, $stroke)';
|
||||||
|
@ -67,6 +67,16 @@ class RichTextBuilderStyle extends ThemeStyle<RichTextBuilderStyle> {
|
|||||||
final Map<String, TextStyle>? styles;
|
final Map<String, TextStyle>? styles;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RichTextBuilderStyle mergeWith(RichTextBuilderStyle? other) =>
|
RichTextBuilderStyle? mergeWith(RichTextBuilderStyle? other) =>
|
||||||
RichTextBuilderStyle.merge(this, other)!;
|
RichTextBuilderStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
RichTextBuilderStyle? copyWith({
|
||||||
|
TextStyle? defaultStyle,
|
||||||
|
Map<String, TextStyle>? styles,
|
||||||
|
}) =>
|
||||||
|
RichTextBuilderStyle(
|
||||||
|
defaultStyle: defaultStyle ?? this.defaultStyle,
|
||||||
|
styles: styles ?? this.styles,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -58,19 +58,19 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
|
|||||||
if (a == null) {
|
if (a == null) {
|
||||||
return b.copyWith();
|
return b.copyWith();
|
||||||
}
|
}
|
||||||
return a.copyWith(
|
return b.copyWith(
|
||||||
labelStyle: b.labelStyle,
|
labelStyle: a.labelStyle,
|
||||||
hintStyle: b.hintStyle,
|
hintStyle: a.hintStyle,
|
||||||
backgroundColors: b.backgroundColors,
|
backgroundColors: a.backgroundColors,
|
||||||
borderColors: b.borderColors,
|
borderColors: a.borderColors,
|
||||||
boxShadow: b.boxShadow,
|
boxShadow: a.boxShadow,
|
||||||
radius: b.radius,
|
radius: a.radius,
|
||||||
inputStyle: b.inputStyle,
|
inputStyle: a.inputStyle,
|
||||||
iconColor: b.iconColor,
|
iconColor: a.iconColor,
|
||||||
prefixStyle: b.prefixStyle,
|
prefixStyle: a.prefixStyle,
|
||||||
prefixIconColor: b.prefixIconColor,
|
prefixIconColor: a.prefixIconColor,
|
||||||
suffixIconColor: b.suffixIconColor,
|
suffixIconColor: a.suffixIconColor,
|
||||||
suffixStyle: b.suffixStyle,
|
suffixStyle: a.suffixStyle,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,4 +103,34 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
|
|||||||
@override
|
@override
|
||||||
TextInputStyle? mergeWith(TextInputStyle? other) =>
|
TextInputStyle? mergeWith(TextInputStyle? other) =>
|
||||||
TextInputStyle.merge(this, other);
|
TextInputStyle.merge(this, other);
|
||||||
|
|
||||||
|
@override
|
||||||
|
TextInputStyle copyWith({
|
||||||
|
TextStyle? labelStyle,
|
||||||
|
TextStyle? hintStyle,
|
||||||
|
MultiColor? backgroundColors,
|
||||||
|
MultiColor? borderColors,
|
||||||
|
BoxShadow? boxShadow,
|
||||||
|
BorderRadiusGeometry? radius,
|
||||||
|
TextStyle? inputStyle,
|
||||||
|
Color? iconColor,
|
||||||
|
TextStyle? prefixStyle,
|
||||||
|
Color? prefixIconColor,
|
||||||
|
TextStyle? suffixStyle,
|
||||||
|
Color? suffixIconColor,
|
||||||
|
}) =>
|
||||||
|
TextInputStyle(
|
||||||
|
labelStyle: labelStyle ?? this.labelStyle,
|
||||||
|
hintStyle: hintStyle ?? this.hintStyle,
|
||||||
|
backgroundColors: backgroundColors ?? this.backgroundColors,
|
||||||
|
radius: radius ?? this.radius,
|
||||||
|
borderColors: borderColors ?? this.borderColors,
|
||||||
|
boxShadow: boxShadow ?? this.boxShadow,
|
||||||
|
inputStyle: inputStyle ?? this.inputStyle,
|
||||||
|
prefixStyle: prefixStyle ?? this.prefixStyle,
|
||||||
|
suffixStyle: suffixStyle ?? this.suffixStyle,
|
||||||
|
prefixIconColor: prefixIconColor ?? this.prefixIconColor,
|
||||||
|
suffixIconColor: suffixIconColor ?? this.suffixIconColor,
|
||||||
|
iconColor: iconColor ?? this.iconColor,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -19,4 +19,7 @@ abstract class ThemeStyle<T> {
|
|||||||
|
|
||||||
/// Merges non-null `other` attributes in `this` and returns a copy.
|
/// Merges non-null `other` attributes in `this` and returns a copy.
|
||||||
T? mergeWith(T? other);
|
T? mergeWith(T? other);
|
||||||
|
|
||||||
|
/// Copy with (mandatory for mergeWith, needs to be simple and ignore `null`)
|
||||||
|
T? copyWith();
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,13 @@ dependencies:
|
|||||||
git:
|
git:
|
||||||
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
||||||
path: packages/wyatt_component_copy_with_extension
|
path: packages/wyatt_component_copy_with_extension
|
||||||
|
freezed_annotation: ^2.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.3.3
|
build_runner: ^2.3.3
|
||||||
copy_with_extension_gen: ^5.0.0
|
copy_with_extension_gen: ^5.0.0
|
||||||
flutter_test: { sdk: flutter }
|
flutter_test: { sdk: flutter }
|
||||||
|
freezed: ^2.3.2
|
||||||
wyatt_analysis:
|
wyatt_analysis:
|
||||||
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
||||||
version: ^2.4.0
|
version: ^2.4.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user