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