refactor(ui_kit): Refactored code using the UI components package, due to breaking changes

This commit is contained in:
Malo Léon 2023-08-28 14:19:36 +02:00
parent 18f34bc95c
commit 244dc38089
3 changed files with 71 additions and 72 deletions

View File

@ -30,7 +30,7 @@ class PortfolioCards extends StatelessWidget {
'quis elit ut amet velit. Incididunt fugiat proident '
'proident deserunt tempor Lorem cillum qui do '),
ctas: [
context.components.flatButtonComponent.call(
context.components.flatButtonComponent().call(
label: const TextWrapper('En savoir plus'),
suffix: const Icon(
Icons.arrow_forward_ios,
@ -65,7 +65,7 @@ class PortfolioCards extends StatelessWidget {
'quis elit ut amet velit. Incididunt fugiat proident '
'proident deserunt tempor Lorem cillum qui do '),
ctas: [
context.components.flatButtonComponent.call(
context.components.flatButtonComponent().call(
label: const TextWrapper('En savoir plus'),
suffix: const Icon(
Icons.arrow_forward_ios,
@ -100,7 +100,7 @@ class PortfolioCards extends StatelessWidget {
'quis elit ut amet velit. Incididunt fugiat proident '
'proident deserunt tempor Lorem cillum qui do '),
ctas: [
context.components.flatButtonComponent.call(
context.components.flatButtonComponent().call(
label: const TextWrapper('En savoir plus'),
suffix: const Icon(
Icons.arrow_forward_ios,
@ -145,7 +145,7 @@ class PortfolioCards extends StatelessWidget {
'quis elit ut amet velit. Incididunt fugiat proident '
'proident deserunt tempor Lorem cillum qui do '),
ctas: [
context.components.flatButtonComponent.call(
context.components.flatButtonComponent().call(
label: const TextWrapper('En savoir plus'),
suffix: const Icon(
Icons.arrow_forward_ios,

View File

@ -73,7 +73,7 @@ class PricingCards extends StatelessWidget {
),
),
],
cta: context.components.flatButtonComponent.call(
cta: context.components.flatButtonComponent().call(
label: const TextWrapper(
'Contactez-nous',
style: TextStyle(color: Colors.white),
@ -130,7 +130,7 @@ class PricingCards extends StatelessWidget {
),
),
],
cta: context.components.flatButtonComponent.call(
cta: context.components.flatButtonComponent().call(
label: const TextWrapper(
'Contactez-nous',
style: TextStyle(color: Colors.white),

View File

@ -22,23 +22,22 @@ import 'package:wyatt_ui_kit/wyatt_ui_kit.dart';
/// {@endtemplate}
abstract class WyattComponentThemeData {
/// {@macro wyatt_component_theme_data}
static const ComponentThemeData wyattComponentThemeData =
ComponentThemeData.raw(
topAppBar: TopAppBar(),
topNavigationBar: TopNavigationBar(),
// bottomNavigationBar: ,
// error: ,
loader: Loader(),
richTextBuilder: RichTextBuilder(),
textInput: TextInput(),
fileSelectionButton: FileSelectionButton(),
flatButton: FlatButton(),
simpleIconButton: SimpleIconButton(),
symbolButton: SymbolButton(),
informationCard: InformationCard(),
portfolioCard: PortfolioCard(),
quoteCard: QuoteCard(),
skillCard: SkillCard(),
pricingCard: PricingCard(),
static ComponentThemeData wyattComponentThemeData = ComponentThemeData.raw(
topAppBars: const TopAppBar().registry(),
topNavigationBars: const TopNavigationBar().registry(),
// bottomNavigationBars: ,
// errors: ,
loaders: const Loader().registry(),
richTextBuilders: const RichTextBuilder().registry(),
textInputs: const TextInput().registry(),
fileSelectionButtons: const FileSelectionButton().registry(),
flatButtons: const FlatButton().registry(),
simpleIconButtons: const SimpleIconButton().registry(),
symbolButtons: const SymbolButton().registry(),
informationCards: const InformationCard().registry(),
portfolioCards: const PortfolioCard().registry(),
quoteCards: const QuoteCard().registry(),
skillCards: const SkillCard().registry(),
pricingCards: const PricingCard().registry(),
);
}