fix(ui_components): rollback private fileds in component theme data
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Malo Léon 2023-08-28 17:18:40 +02:00
parent efa4c4e13d
commit b2d97623b7

View File

@ -68,23 +68,23 @@ class ComponentThemeData {
// /// {@macro component_theme_data}
factory ComponentThemeData.fromOther(ComponentThemeData other) =>
ComponentThemeData(
topAppBars: other._topAppBars,
topNavigationBars: other._topNavigationBars,
bottomNavigationBars: other._bottomNavigationBars,
errors: other._errors,
loaders: other._loaders,
richTextBuilders: other._richTextBuilders,
textInputs: other._textInputs,
fileSelectionButtons: other._fileSelectionButtons,
flatButtons: other._flatButtons,
simpleIconButtons: other._simpleIconButtons,
symbolButtons: other._symbolButtons,
informationCards: other._informationCards,
portfolioCards: other._portfolioCards,
quoteCards: other._quoteCards,
skillCards: other._skillCards,
pricingCards: other._pricingCards,
floatingActionButtons: other._floatingActionButtons,
topAppBars: other.topAppBars,
topNavigationBars: other.topNavigationBars,
bottomNavigationBars: other.bottomNavigationBars,
errors: other.errors,
loaders: other.loaders,
richTextBuilders: other.richTextBuilders,
textInputs: other.textInputs,
fileSelectionButtons: other.fileSelectionButtons,
flatButtons: other.flatButtons,
simpleIconButtons: other.simpleIconButtons,
symbolButtons: other.symbolButtons,
informationCards: other.informationCards,
portfolioCards: other.portfolioCards,
quoteCards: other.quoteCards,
skillCards: other.skillCards,
pricingCards: other.pricingCards,
floatingActionButtons: other.floatingActionButtons,
);
/// Create a [ComponentThemeData] given a set of exact values. Most values
@ -94,40 +94,24 @@ class ComponentThemeData {
/// create intermediate themes based on two themes created with the
/// [ComponentThemeData] constructor.
const ComponentThemeData.raw({
ComponentRegistry<TopAppBarComponent>? topAppBars,
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars,
ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars,
ComponentRegistry<ErrorComponent>? errors,
ComponentRegistry<LoaderComponent>? loaders,
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders,
ComponentRegistry<TextInputComponent>? textInputs,
ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons,
ComponentRegistry<FlatButtonComponent>? flatButtons,
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons,
ComponentRegistry<SymbolButtonComponent>? symbolButtons,
ComponentRegistry<InformationCardComponent>? informationCards,
ComponentRegistry<PortfolioCardComponent>? portfolioCards,
ComponentRegistry<QuoteCardComponent>? quoteCards,
ComponentRegistry<SkillCardComponent>? skillCards,
ComponentRegistry<PricingCardComponent>? pricingCards,
ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons,
}) : _floatingActionButtons = floatingActionButtons,
_symbolButtons = symbolButtons,
_simpleIconButtons = simpleIconButtons,
_flatButtons = flatButtons,
_fileSelectionButtons = fileSelectionButtons,
_textInputs = textInputs,
_richTextBuilders = richTextBuilders,
_pricingCards = pricingCards,
_skillCards = skillCards,
_quoteCards = quoteCards,
_portfolioCards = portfolioCards,
_informationCards = informationCards,
_loaders = loaders,
_errors = errors,
_bottomNavigationBars = bottomNavigationBars,
_topNavigationBars = topNavigationBars,
_topAppBars = topAppBars;
this.topAppBars,
this.topNavigationBars,
this.bottomNavigationBars,
this.errors,
this.loaders,
this.richTextBuilders,
this.textInputs,
this.fileSelectionButtons,
this.flatButtons,
this.simpleIconButtons,
this.symbolButtons,
this.informationCards,
this.portfolioCards,
this.quoteCards,
this.skillCards,
this.pricingCards,
this.floatingActionButtons,
});
R _get<T extends Component, R>(T? component, R? returned) {
if (component == null) {
@ -145,97 +129,97 @@ class ComponentThemeData {
}
// Bars
final ComponentRegistry<TopAppBarComponent>? _topAppBars;
final ComponentRegistry<TopAppBarComponent>? topAppBars;
$TopAppBarComponentCWProxy topAppBarComponent([String? id]) =>
_get(_topAppBars?.call(id), _topAppBars?.call(id)?.copyWith);
_get(topAppBars?.call(id), topAppBars?.call(id)?.copyWith);
final ComponentRegistry<TopNavigationBarComponent>? _topNavigationBars;
final ComponentRegistry<TopNavigationBarComponent>? topNavigationBars;
$TopNavigationBarComponentCWProxy topNavigationBarComponent([String? id]) =>
_get(
_topNavigationBars?.call(id),
_topNavigationBars?.call(id)?.copyWith,
topNavigationBars?.call(id),
topNavigationBars?.call(id)?.copyWith,
);
final ComponentRegistry<BottomNavigationBarComponent>? _bottomNavigationBars;
final ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars;
$BottomNavigationBarComponentCWProxy bottomNavigationBarComponent([
String? id,
]) =>
_get(
_bottomNavigationBars?.call(id),
_bottomNavigationBars?.call(id)?.copyWith,
bottomNavigationBars?.call(id),
bottomNavigationBars?.call(id)?.copyWith,
);
// CRUD Widgets
final ComponentRegistry<ErrorComponent>? _errors;
final ComponentRegistry<ErrorComponent>? errors;
$ErrorComponentCWProxy errorComponent([String? id]) =>
_get(_errors?.call(id), _errors?.call(id)?.copyWith);
_get(errors?.call(id), errors?.call(id)?.copyWith);
final ComponentRegistry<LoaderComponent>? _loaders;
final ComponentRegistry<LoaderComponent>? loaders;
$LoaderComponentCWProxy loaderComponent([String? id]) =>
_get(_loaders?.call(id), _loaders?.call(id)?.copyWith);
_get(loaders?.call(id), loaders?.call(id)?.copyWith);
// Cards
final ComponentRegistry<InformationCardComponent>? _informationCards;
final ComponentRegistry<InformationCardComponent>? informationCards;
$InformationCardComponentCWProxy informationCardComponent([String? id]) =>
_get(_informationCards?.call(id), _informationCards?.call(id)?.copyWith);
_get(informationCards?.call(id), informationCards?.call(id)?.copyWith);
final ComponentRegistry<PortfolioCardComponent>? _portfolioCards;
final ComponentRegistry<PortfolioCardComponent>? portfolioCards;
$PortfolioCardComponentCWProxy portfolioCardComponent([String? id]) =>
_get(_portfolioCards?.call(id), _portfolioCards?.call(id)?.copyWith);
_get(portfolioCards?.call(id), portfolioCards?.call(id)?.copyWith);
final ComponentRegistry<QuoteCardComponent>? _quoteCards;
final ComponentRegistry<QuoteCardComponent>? quoteCards;
$QuoteCardComponentCWProxy quoteCardComponent([String? id]) =>
_get(_quoteCards?.call(id), _quoteCards?.call(id)?.copyWith);
_get(quoteCards?.call(id), quoteCards?.call(id)?.copyWith);
final ComponentRegistry<SkillCardComponent>? _skillCards;
final ComponentRegistry<SkillCardComponent>? skillCards;
$SkillCardComponentCWProxy skillCardComponent([String? id]) =>
_get(_skillCards?.call(id), _skillCards?.call(id)?.copyWith);
final ComponentRegistry<PricingCardComponent>? _pricingCards;
_get(skillCards?.call(id), skillCards?.call(id)?.copyWith);
final ComponentRegistry<PricingCardComponent>? pricingCards;
$PricingCardComponentCWProxy pricingCardComponent([String? id]) =>
_get(_pricingCards?.call(id), _pricingCards?.call(id)?.copyWith);
_get(pricingCards?.call(id), pricingCards?.call(id)?.copyWith);
// Rich Text
final ComponentRegistry<RichTextBuilderComponent>? _richTextBuilders;
final ComponentRegistry<RichTextBuilderComponent>? richTextBuilders;
$RichTextBuilderComponentCWProxy richTextBuilderComponent([String? id]) =>
_get(_richTextBuilders?.call(id), _richTextBuilders?.call(id)?.copyWith);
_get(richTextBuilders?.call(id), richTextBuilders?.call(id)?.copyWith);
// Text Inputs
final ComponentRegistry<TextInputComponent>? _textInputs;
final ComponentRegistry<TextInputComponent>? textInputs;
$TextInputComponentCWProxy textInputComponent([String? id]) =>
_get(_textInputs?.call(id), _textInputs?.call(id)?.copyWith);
_get(textInputs?.call(id), textInputs?.call(id)?.copyWith);
// Buttons
final ComponentRegistry<FileSelectionButtonComponent>? _fileSelectionButtons;
final ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons;
$FileSelectionButtonComponentCWProxy fileSelectionButtonComponent([
String? id,
]) =>
_get(
_fileSelectionButtons?.call(id),
_fileSelectionButtons?.call(id)?.copyWith,
fileSelectionButtons?.call(id),
fileSelectionButtons?.call(id)?.copyWith,
);
final ComponentRegistry<FlatButtonComponent>? _flatButtons;
final ComponentRegistry<FlatButtonComponent>? flatButtons;
$FlatButtonComponentCWProxy flatButtonComponent([String? id]) =>
_get(_flatButtons?.call(id), _flatButtons?.call(id)?.copyWith);
_get(flatButtons?.call(id), flatButtons?.call(id)?.copyWith);
final ComponentRegistry<SimpleIconButtonComponent>? _simpleIconButtons;
final ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons;
$SimpleIconButtonComponentCWProxy simpleIconButtonComponent([String? id]) =>
_get(
_simpleIconButtons?.call(id),
_simpleIconButtons?.call(id)?.copyWith,
simpleIconButtons?.call(id),
simpleIconButtons?.call(id)?.copyWith,
);
final ComponentRegistry<SymbolButtonComponent>? _symbolButtons;
final ComponentRegistry<SymbolButtonComponent>? symbolButtons;
$SymbolButtonComponentCWProxy symbolButtonComponent([String? id]) =>
_get(_symbolButtons?.call(id), _symbolButtons?.call(id)?.copyWith);
_get(symbolButtons?.call(id), symbolButtons?.call(id)?.copyWith);
final ComponentRegistry<FloatingActionButtonComponent>?
_floatingActionButtons;
final ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons;
$FloatingActionButtonComponentCWProxy floatingActionButtonComponent([
String? id,
]) =>
_get(
_floatingActionButtons?.call(id),
_floatingActionButtons?.call(id)?.copyWith,
floatingActionButtons?.call(id),
floatingActionButtons?.call(id)?.copyWith,
);
}