refactor/update-packages-with-new-component-version #215
| @ -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,24 +94,40 @@ 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({ | ||||||
|     this.topAppBars, |     ComponentRegistry<TopAppBarComponent>? topAppBars, | ||||||
|     this.topNavigationBars, |     ComponentRegistry<TopNavigationBarComponent>? topNavigationBars, | ||||||
|     this.bottomNavigationBars, |     ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars, | ||||||
|     this.errors, |     ComponentRegistry<ErrorComponent>? errors, | ||||||
|     this.loaders, |     ComponentRegistry<LoaderComponent>? loaders, | ||||||
|     this.richTextBuilders, |     ComponentRegistry<RichTextBuilderComponent>? richTextBuilders, | ||||||
|     this.textInputs, |     ComponentRegistry<TextInputComponent>? textInputs, | ||||||
|     this.fileSelectionButtons, |     ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons, | ||||||
|     this.flatButtons, |     ComponentRegistry<FlatButtonComponent>? flatButtons, | ||||||
|     this.simpleIconButtons, |     ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons, | ||||||
|     this.symbolButtons, |     ComponentRegistry<SymbolButtonComponent>? symbolButtons, | ||||||
|     this.informationCards, |     ComponentRegistry<InformationCardComponent>? informationCards, | ||||||
|     this.portfolioCards, |     ComponentRegistry<PortfolioCardComponent>? portfolioCards, | ||||||
|     this.quoteCards, |     ComponentRegistry<QuoteCardComponent>? quoteCards, | ||||||
|     this.skillCards, |     ComponentRegistry<SkillCardComponent>? skillCards, | ||||||
|     this.pricingCards, |     ComponentRegistry<PricingCardComponent>? pricingCards, | ||||||
|     this.floatingActionButtons, |     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; | ||||||
| 
 | 
 | ||||||
|   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) { | ||||||
| @ -129,90 +145,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(topNavigationBars?.call(id), topNavigationBars?.call(id)?.copyWith); |       _get( | ||||||
|  |         _topNavigationBars?.call(id), | ||||||
|  |         _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(simpleIconButtons?.call(id), simpleIconButtons?.call(id)?.copyWith); |       _get( | ||||||
|  |         _simpleIconButtons?.call(id), | ||||||
|  |         _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>? floatingActionButtons; |   final ComponentRegistry<FloatingActionButtonComponent>? | ||||||
|  |       _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