From 1797426c43dca31711e9609182a4192ab91d5bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 12:23:55 +0200 Subject: [PATCH 1/7] chore(copy_with_gen): update dart sdk version --- packages/wyatt_component_copy_with_gen/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wyatt_component_copy_with_gen/pubspec.yaml b/packages/wyatt_component_copy_with_gen/pubspec.yaml index e7e40745..a43fe72b 100644 --- a/packages/wyatt_component_copy_with_gen/pubspec.yaml +++ b/packages/wyatt_component_copy_with_gen/pubspec.yaml @@ -6,7 +6,7 @@ version: 2.0.1 publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub environment: - sdk: ">=2.19.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: build: ^2.3.1 -- 2.47.2 From e231f1416250ad27471fca78828f6a736fb9b06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:46:59 +0200 Subject: [PATCH 2/7] feat(gen): add impl of proxy component generator --- .../component_multi_proxy_generator.dart | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 packages/wyatt_component_copy_with_gen/lib/src/generators/component_multi_proxy_generator.dart diff --git a/packages/wyatt_component_copy_with_gen/lib/src/generators/component_multi_proxy_generator.dart b/packages/wyatt_component_copy_with_gen/lib/src/generators/component_multi_proxy_generator.dart new file mode 100644 index 00000000..119e594f --- /dev/null +++ b/packages/wyatt_component_copy_with_gen/lib/src/generators/component_multi_proxy_generator.dart @@ -0,0 +1,101 @@ +// Copyright (C) 2023 WYATT GROUP +// Please see the AUTHORS file for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +import 'dart:async'; + +import 'package:analyzer/dart/element/element.dart'; +import 'package:build/build.dart'; +import 'package:source_gen/source_gen.dart'; +import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; + +class ComponentMultiProxyGenerator + extends GeneratorForAnnotation { + @override + FutureOr generateForAnnotatedElement( + Element element, + ConstantReader annotation, + BuildStep buildStep, + ) { + /// Check element type + if (element is! ClassElement) { + throw InvalidGenerationSourceError( + 'Only classes can be annotated with "CopyWith". "$element" is ' + 'not a ClassElement.', + element: element, + ); + } + + final classAnnotation = ComponentProxyExtension( + skipFields: annotation.peek('skipFields')?.boolValue ?? true, + ); + + final multiProxyClassName = + element.displayName.replaceAll('Component', 'MultiProxy'); + final generatedCode = StringBuffer() + ..write( + '@ComponentCopyWithExtension() class ' + '\$$multiProxyClassName extends ${element.displayName} with ' + '\$\$${multiProxyClassName}CWMixin {', + ) + ..write('final bool? freezed; ' + 'final ${element.displayName} Function(BuildContext context) select;') + ..write('\$$multiProxyClassName('); + + if (classAnnotation.skipFields ?? true) { + generatedCode.write('this.select,'); + for (final field in element.constructors.first.parameters + .where((element) => element.isNamed == false)) { + generatedCode.write('super.${field.displayName},'); + } + + generatedCode + ..write('{') + ..write('this.freezed,'); + for (final field in element.constructors.first.parameters + .where((element) => element.isNamed)) { + if (field.isRequiredNamed) { + generatedCode.write('required '); + } + generatedCode.write('super.${field.displayName},'); + } + generatedCode + ..write('});') + ..write(' factory \$$multiProxyClassName.multi( ' + ' ${element.displayName} Function(BuildContext context) test, ' + '{bool freezed = true}) => ' + '\$$multiProxyClassName( ' + 'test, ' + 'freezed: freezed,); ') + ..write( + ' ${element.displayName}? compo; ' + '@override ' + 'Widget build(BuildContext context) { final component = ' + '(compo ??= select(context)).copyWith.call(', + ); + for (final field in element.constructors.first.parameters) { + generatedCode.write('${field.displayName}:${field.displayName},'); + } + generatedCode + ..write(');') + ..write('if (!(freezed ?? true)) { ' + 'compo = null; } ' + 'return component; ' + '}} '); + } + + return generatedCode.toString(); + } +} -- 2.47.2 From 34b72179c8e8605c663d0f9a075402687a9c9f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:50:20 +0200 Subject: [PATCH 3/7] feat(gen): update builders and build extensions --- .../lib/src/builder.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/wyatt_component_copy_with_gen/lib/src/builder.dart b/packages/wyatt_component_copy_with_gen/lib/src/builder.dart index c82cd976..e355b9a9 100644 --- a/packages/wyatt_component_copy_with_gen/lib/src/builder.dart +++ b/packages/wyatt_component_copy_with_gen/lib/src/builder.dart @@ -17,12 +17,18 @@ import 'package:build/build.dart'; import 'package:source_gen/source_gen.dart'; import 'package:wyatt_component_copy_with_gen/src/generators/component_copy_with_generator.dart'; +import 'package:wyatt_component_copy_with_gen/src/generators/component_multi_proxy_generator.dart'; import 'package:wyatt_component_copy_with_gen/src/generators/component_proxy_generator.dart'; -Builder componentCopyWithReporter(BuilderOptions options) => SharedPartBuilder( +Builder componentCopyWithProxyReporter(BuilderOptions options) => PartBuilder( [ ComponentProxyGenerator(), - ComponentCopyWithGenerator(), + ComponentMultiProxyGenerator(), ], - 'component_copy_with', + '.interface.g.dart', + ); + +Builder componentCopyWithReporter(BuilderOptions options) => PartBuilder( + [ComponentCopyWithGenerator()], + '.impl.g.dart', ); -- 2.47.2 From bc0d476f4cf7832d2ca7d5c145e4a85d13aaa75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:50:49 +0200 Subject: [PATCH 4/7] build(gen): update builders config --- .../wyatt_component_copy_with_gen/build.yaml | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/wyatt_component_copy_with_gen/build.yaml b/packages/wyatt_component_copy_with_gen/build.yaml index ec4b846d..b9165003 100644 --- a/packages/wyatt_component_copy_with_gen/build.yaml +++ b/packages/wyatt_component_copy_with_gen/build.yaml @@ -1,6 +1,14 @@ targets: $default: builders: + wyatt_component_copy_with_proxy_gen: + enabled: true + generate_for: + exclude: + - test + - example + include: + - test/gen_* wyatt_component_copy_with_gen: enabled: true generate_for: @@ -9,13 +17,26 @@ targets: - example include: - test/gen_* + source_gen|combining_builder: + options: + ignore_for_file: + - "type=lint" builders: + wyatt_component_copy_with_proxy_gen: + target: ":wyatt_component_copy_with_proxy_gen" + import: "package:wyatt_component_copy_with_gen/wyatt_component_copy_with_gen.dart" + builder_factories: ["componentCopyWithProxyReporter"] + build_extensions: { ".dart": [".interface.g.part"] } + auto_apply: dependents + build_to: source + applies_builders: ["source_gen|combining_builder"] + wyatt_component_copy_with_gen: target: ":wyatt_component_copy_with_gen" import: "package:wyatt_component_copy_with_gen/wyatt_component_copy_with_gen.dart" builder_factories: ["componentCopyWithReporter"] - build_extensions: { ".dart": ["copy_with_extension_gen.g.part"] } + build_extensions: { ".dart": [".impl.g.dart"] } auto_apply: dependents - build_to: cache + build_to: source applies_builders: ["source_gen|combining_builder"] -- 2.47.2 From 5c4af15583251f14e144511f526acfad21630300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:51:19 +0200 Subject: [PATCH 5/7] chore(gen): upadate example --- .../example/lib/custom_top_bar_example.dart | 2 +- ...op_bar_example.g.dart => custom_top_bar_example.impl.g.dart} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/wyatt_component_copy_with_gen/example/lib/{custom_top_bar_example.g.dart => custom_top_bar_example.impl.g.dart} (100%) diff --git a/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.dart b/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.dart index b9404eab..97b0424b 100644 --- a/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.dart +++ b/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.dart @@ -19,7 +19,7 @@ import 'package:flutter/services.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'custom_top_bar_example.g.dart'; +part 'custom_top_bar_example.impl.g.dart'; @ComponentCopyWithExtension() class CustomTopAppBarExample extends TopAppBarComponent diff --git a/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.g.dart b/packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.impl.g.dart similarity index 100% rename from packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.g.dart rename to packages/wyatt_component_copy_with_gen/example/lib/custom_top_bar_example.impl.g.dart -- 2.47.2 From 85f53d7cc31793af2d6336600a098694112d4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:52:00 +0200 Subject: [PATCH 6/7] fix(gen): rework on copy with generator script --- .../component_copy_with_generator.dart | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/wyatt_component_copy_with_gen/lib/src/generators/component_copy_with_generator.dart b/packages/wyatt_component_copy_with_gen/lib/src/generators/component_copy_with_generator.dart index d64b2b25..d81a2b3d 100644 --- a/packages/wyatt_component_copy_with_gen/lib/src/generators/component_copy_with_generator.dart +++ b/packages/wyatt_component_copy_with_gen/lib/src/generators/component_copy_with_generator.dart @@ -80,8 +80,22 @@ class ComponentCopyWithGenerator for (final superField in element.constructors.first.parameters) { final superFieldDisplayName = superField.displayName; - generatedCode.write('$superFieldDisplayName:$superFieldDisplayName?? ' - '_value.$superFieldDisplayName,'); + if (superField.isNamed) { + if (superField.isSuperFormal) { + generatedCode.write('$superFieldDisplayName:$superFieldDisplayName?? ' + '_value.$superFieldDisplayName,'); + } else { + generatedCode.write('$superFieldDisplayName: ' + '_value.$superFieldDisplayName,'); + } + } else if (!superField.isNamed) { + if (superField.isSuperFormal) { + generatedCode.write('$superFieldDisplayName?? ' + '_value.$superFieldDisplayName,'); + } else { + generatedCode.write('_value.$superFieldDisplayName,'); + } + } } generatedCode -- 2.47.2 From 5d10d00000584189b3c8496be357eb46c198d0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malo=20L=C3=A9on?= Date: Fri, 19 May 2023 18:52:45 +0200 Subject: [PATCH 7/7] refactor(ui_component): update all components using new generators --- .../example/lib/component_theme.dart | 18 +- .../lib/components/custom_app_bar.dart | 7 +- ..._bar.g.dart => custom_app_bar.impl.g.dart} | 1 + .../lib/components/custom_bottom_bar.dart | 2 +- ...r.g.dart => custom_bottom_bar.impl.g.dart} | 0 .../lib/components/custom_error_widget.dart | 2 +- ...g.dart => custom_error_widget.impl.g.dart} | 0 .../lib/components/custom_loader_widget.dart | 2 +- ....dart => custom_loader_widget.impl.g.dart} | 0 .../lib/components/second_custom_app_bar.dart | 20 + .../second_custom_app_bar.impl.g.dart | 103 +++++ .../wyatt_ui_components/example/lib/main.dart | 54 ++- .../wyatt_ui_components/example/pubspec.yaml | 3 +- .../bars/bottom_navigation_bar_component.dart | 3 +- .../bottom_navigation_bar_component.g.dart | 18 - ...ottom_navigation_bar_component.impl.g.dart | 41 ++ ..._navigation_bar_component.interface.g.dart | 56 +++ .../entities/bars/top_app_bar_component.dart | 3 +- .../bars/top_app_bar_component.g.dart | 55 --- .../bars/top_app_bar_component.impl.g.dart | 128 ++++++ .../top_app_bar_component.interface.g.dart | 136 +++++++ .../bars/top_navigation_bar_component.dart | 3 +- .../top_navigation_bar_component.impl.g.dart | 141 +++++++ ...navigation_bar_component.interface.g.dart} | 76 ++++ .../file_selection_button_component.dart | 26 +- ...ile_selection_button_component.impl.g.dart | 109 +++++ ...lection_button_component.interface.g.dart} | 62 +++ .../buttons/flat_button_component.dart | 18 +- .../buttons/flat_button_component.g.dart | 39 -- .../buttons/flat_button_component.impl.g.dart | 86 ++++ .../flat_button_component.interface.g.dart | 97 +++++ .../buttons/simple_icon_button_component.dart | 18 +- .../simple_icon_button_component.g.dart | 33 -- .../simple_icon_button_component.impl.g.dart | 79 ++++ ...ple_icon_button_component.interface.g.dart | 85 ++++ .../buttons/symbol_button_component.dart | 21 +- .../symbol_button_component.impl.g.dart | 88 +++++ ... symbol_button_component.interface.g.dart} | 58 +++ .../cards/information_card_component.dart | 3 +- .../cards/information_card_component.g.dart | 48 --- .../information_card_component.impl.g.dart | 107 +++++ ...nformation_card_component.interface.g.dart | 116 ++++++ .../cards/portfolio_card_component.dart | 3 +- .../portfolio_card_component.impl.g.dart | 129 ++++++ ...portfolio_card_component.interface.g.dart} | 76 ++++ .../cards/pricing_card_component.dart | 3 +- .../cards/pricing_card_component.g.dart | 50 --- .../cards/pricing_card_component.impl.g.dart | 111 ++++++ .../pricing_card_component.interface.g.dart | 120 ++++++ .../entities/cards/quote_card_component.dart | 3 +- .../cards/quote_card_component.g.dart | 50 --- .../cards/quote_card_component.impl.g.dart | 111 ++++++ .../quote_card_component.interface.g.dart | 120 ++++++ .../entities/cards/skill_card_component.dart | 3 +- .../cards/skill_card_component.impl.g.dart | 121 ++++++ ... => skill_card_component.interface.g.dart} | 74 ++++ .../entities/error/error_component.dart | 3 +- .../entities/error/error_component.g.dart | 23 -- .../error/error_component.impl.g.dart | 46 +++ .../error/error_component.interface.g.dart | 64 +++ .../floating_action_button_component.dart | 3 +- ...oating_action_button_component.impl.g.dart | 166 ++++++++ ..._action_button_component.interface.g.dart} | 86 ++++ .../gradients/gradient_component.dart | 2 +- .../gradients/gradient_icon_component.dart | 9 +- .../gradients/gradient_icon_component.g.dart | 36 -- .../gradient_icon_component.impl.g.dart | 78 ++++ .../gradient_icon_component.interface.g.dart | 92 +++++ .../gradients/gradient_text_component.dart | 14 +- .../gradients/gradient_text_component.g.dart | 45 --- .../gradient_text_component.impl.g.dart | 100 +++++ .../gradient_text_component.interface.g.dart | 109 +++++ .../entities/loader/loader_component.dart | 3 +- .../entities/loader/loader_component.g.dart | 27 -- .../loader/loader_component.impl.g.dart | 54 +++ .../loader/loader_component.interface.g.dart | 72 ++++ .../rich_text_builder_component.dart | 3 +- .../rich_text_builder_component.g.dart | 44 --- .../rich_text_builder_component.impl.g.dart | 103 +++++ ...ch_text_builder_component.interface.g.dart | 108 +++++ .../text_inputs/text_input_component.dart | 5 +- .../text_input_component.impl.g.dart | 374 ++++++++++++++++++ ... => text_input_component.interface.g.dart} | 168 ++++++++ packages/wyatt_ui_components/pubspec.yaml | 2 +- 84 files changed, 4190 insertions(+), 588 deletions(-) rename packages/wyatt_ui_components/example/lib/components/{custom_app_bar.g.dart => custom_app_bar.impl.g.dart} (98%) rename packages/wyatt_ui_components/example/lib/components/{custom_bottom_bar.g.dart => custom_bottom_bar.impl.g.dart} (100%) rename packages/wyatt_ui_components/example/lib/components/{custom_error_widget.g.dart => custom_error_widget.impl.g.dart} (100%) rename packages/wyatt_ui_components/example/lib/components/{custom_loader_widget.g.dart => custom_loader_widget.impl.g.dart} (100%) create mode 100644 packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.dart create mode 100644 packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.impl.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/bars/{top_navigation_bar_component.g.dart => top_navigation_bar_component.interface.g.dart} (51%) create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/buttons/{file_selection_button_component.g.dart => file_selection_button_component.interface.g.dart} (52%) delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/buttons/{symbol_button_component.g.dart => symbol_button_component.interface.g.dart} (50%) delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/cards/{portfolio_card_component.g.dart => portfolio_card_component.interface.g.dart} (51%) delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/cards/{skill_card_component.g.dart => skill_card_component.interface.g.dart} (50%) delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/{floating_action_button_component.g.dart => floating_action_button_component.interface.g.dart} (52%) delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.interface.g.dart delete mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.impl.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.interface.g.dart create mode 100644 packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.impl.g.dart rename packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/{text_input_component.g.dart => text_input_component.interface.g.dart} (57%) diff --git a/packages/wyatt_ui_components/example/lib/component_theme.dart b/packages/wyatt_ui_components/example/lib/component_theme.dart index 258dfd0e..f60e1b04 100644 --- a/packages/wyatt_ui_components/example/lib/component_theme.dart +++ b/packages/wyatt_ui_components/example/lib/component_theme.dart @@ -1,14 +1,22 @@ +import 'package:go_router/go_router.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; import 'package:wyatt_ui_components_example/components/custom_app_bar.dart'; import 'package:wyatt_ui_components_example/components/custom_bottom_bar.dart'; import 'package:wyatt_ui_components_example/components/custom_error_widget.dart'; import 'package:wyatt_ui_components_example/components/custom_loader_widget.dart'; +import 'package:wyatt_ui_components_example/components/second_custom_app_bar.dart'; class AppThemeComponent { - static ComponentThemeData get components => const ComponentThemeData.raw( - topAppBar: CustomAppBar(), - bottomNavigationBar: CustomBottomNavigationBar(), - error: CustomErrorWidget(), - loader: CustomLoaderWidget(), + static ComponentThemeData get components => ComponentThemeData.raw( + topAppBar: $TopAppBarMultiProxy.multi( + (context) => switch (GoRouter.of(context).location) { + '/home' => const CustomAppBar(), + '/home/secondary' => const SecondCustomAppBar(), + _ => const CustomAppBar(), + }, + ), + bottomNavigationBar: const CustomBottomNavigationBar(), + error: const CustomErrorWidget(), + loader: const CustomLoaderWidget(), ); } diff --git a/packages/wyatt_ui_components/example/lib/components/custom_app_bar.dart b/packages/wyatt_ui_components/example/lib/components/custom_app_bar.dart index e14c228f..8d4176ca 100644 --- a/packages/wyatt_ui_components/example/lib/components/custom_app_bar.dart +++ b/packages/wyatt_ui_components/example/lib/components/custom_app_bar.dart @@ -1,15 +1,18 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'custom_app_bar.g.dart'; +part 'custom_app_bar.impl.g.dart'; @ComponentCopyWithExtension() class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin { - const CustomAppBar({super.title, super.key}); + const CustomAppBar({super.title, super.key, super.actions}); @override Widget build(BuildContext context) => AppBar( + backgroundColor: Colors.deepPurpleAccent, + actions: actions, title: Text( super.title?.data ?? '', ), diff --git a/packages/wyatt_ui_components/example/lib/components/custom_app_bar.g.dart b/packages/wyatt_ui_components/example/lib/components/custom_app_bar.impl.g.dart similarity index 98% rename from packages/wyatt_ui_components/example/lib/components/custom_app_bar.g.dart rename to packages/wyatt_ui_components/example/lib/components/custom_app_bar.impl.g.dart index 125680d9..5f2a7e61 100644 --- a/packages/wyatt_ui_components/example/lib/components/custom_app_bar.g.dart +++ b/packages/wyatt_ui_components/example/lib/components/custom_app_bar.impl.g.dart @@ -90,6 +90,7 @@ class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy { CustomAppBar( title: title ?? _value.title, key: key ?? _value.key, + actions: actions ?? _value.actions, ); } diff --git a/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.dart b/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.dart index e3a7937f..14c43e2c 100644 --- a/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.dart +++ b/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'custom_bottom_bar.g.dart'; +part 'custom_bottom_bar.impl.g.dart'; @ComponentCopyWithExtension() class CustomBottomNavigationBar extends BottomNavigationBarComponent diff --git a/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.g.dart b/packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.impl.g.dart similarity index 100% rename from packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.g.dart rename to packages/wyatt_ui_components/example/lib/components/custom_bottom_bar.impl.g.dart diff --git a/packages/wyatt_ui_components/example/lib/components/custom_error_widget.dart b/packages/wyatt_ui_components/example/lib/components/custom_error_widget.dart index 5362dbb2..a9bc9490 100644 --- a/packages/wyatt_ui_components/example/lib/components/custom_error_widget.dart +++ b/packages/wyatt_ui_components/example/lib/components/custom_error_widget.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'custom_error_widget.g.dart'; +part 'custom_error_widget.impl.g.dart'; @ComponentCopyWithExtension() class CustomErrorWidget extends ErrorComponent with $CustomErrorWidgetCWMixin { diff --git a/packages/wyatt_ui_components/example/lib/components/custom_error_widget.g.dart b/packages/wyatt_ui_components/example/lib/components/custom_error_widget.impl.g.dart similarity index 100% rename from packages/wyatt_ui_components/example/lib/components/custom_error_widget.g.dart rename to packages/wyatt_ui_components/example/lib/components/custom_error_widget.impl.g.dart diff --git a/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.dart b/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.dart index 0167ce60..d2464498 100644 --- a/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.dart +++ b/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'custom_loader_widget.g.dart'; +part 'custom_loader_widget.impl.g.dart'; @ComponentCopyWithExtension() class CustomLoaderWidget extends LoaderComponent diff --git a/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.g.dart b/packages/wyatt_ui_components/example/lib/components/custom_loader_widget.impl.g.dart similarity index 100% rename from packages/wyatt_ui_components/example/lib/components/custom_loader_widget.g.dart rename to packages/wyatt_ui_components/example/lib/components/custom_loader_widget.impl.g.dart diff --git a/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.dart b/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.dart new file mode 100644 index 00000000..3c3b9668 --- /dev/null +++ b/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; +import 'package:wyatt_ui_components/wyatt_ui_components.dart'; + +part 'second_custom_app_bar.impl.g.dart'; + +@ComponentCopyWithExtension() +class SecondCustomAppBar extends TopAppBarComponent + with $SecondCustomAppBarCWMixin { + const SecondCustomAppBar({super.title, super.key}); + + @override + Widget build(BuildContext context) => AppBar( + backgroundColor: Colors.orange, + title: Text( + super.title?.data ?? '', + ), + ); +} diff --git a/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.impl.g.dart b/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.impl.g.dart new file mode 100644 index 00000000..66a96468 --- /dev/null +++ b/packages/wyatt_ui_components/example/lib/components/second_custom_app_bar.impl.g.dart @@ -0,0 +1,103 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'second_custom_app_bar.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $SecondCustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy { + const $SecondCustomAppBarCWProxyImpl(this._value); + final SecondCustomAppBar _value; + @override + SecondCustomAppBar title(TextWrapper? title) => this(title: title); + @override + SecondCustomAppBar centerTitle(bool? centerTitle) => + this(centerTitle: centerTitle); + @override + SecondCustomAppBar shape(ShapeBorder? shape) => this(shape: shape); + @override + SecondCustomAppBar systemOverlayStyle( + SystemUiOverlayStyle? systemOverlayStyle) => + this(systemOverlayStyle: systemOverlayStyle); + @override + SecondCustomAppBar automaticallyImplyLeading( + bool? automaticallyImplyLeading) => + this(automaticallyImplyLeading: automaticallyImplyLeading); + @override + SecondCustomAppBar flexibleSpace(Widget? flexibleSpace) => + this(flexibleSpace: flexibleSpace); + @override + SecondCustomAppBar bottom(PreferredSizeWidget? bottom) => + this(bottom: bottom); + @override + SecondCustomAppBar elevation(double? elevation) => this(elevation: elevation); + @override + SecondCustomAppBar scrolledUnderElevation(double? scrolledUnderElevation) => + this(scrolledUnderElevation: scrolledUnderElevation); + @override + SecondCustomAppBar shadowColor(Color? shadowColor) => + this(shadowColor: shadowColor); + @override + SecondCustomAppBar surfaceTintColor(Color? surfaceTintColor) => + this(surfaceTintColor: surfaceTintColor); + @override + SecondCustomAppBar backgroundColor(MultiColor? backgroundColor) => + this(backgroundColor: backgroundColor); + @override + SecondCustomAppBar iconTheme(IconThemeData? iconTheme) => + this(iconTheme: iconTheme); + @override + SecondCustomAppBar primary(bool? primary) => this(primary: primary); + @override + SecondCustomAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) => + this(excludeHeaderSemantics: excludeHeaderSemantics); + @override + SecondCustomAppBar toolbarHeight(double? toolbarHeight) => + this(toolbarHeight: toolbarHeight); + @override + SecondCustomAppBar leadingWidth(double? leadingWidth) => + this(leadingWidth: leadingWidth); + @override + SecondCustomAppBar leading(Widget? leading) => this(leading: leading); + @override + SecondCustomAppBar actions(List? actions) => this(actions: actions); + @override + SecondCustomAppBar expandedWidget(List? expandedWidget) => + this(expandedWidget: expandedWidget); + @override + SecondCustomAppBar key(Key? key) => this(key: key); + @override + SecondCustomAppBar call({ + TextWrapper? title, + bool? centerTitle, + ShapeBorder? shape, + SystemUiOverlayStyle? systemOverlayStyle, + bool? automaticallyImplyLeading, + Widget? flexibleSpace, + PreferredSizeWidget? bottom, + double? elevation, + double? scrolledUnderElevation, + Color? shadowColor, + Color? surfaceTintColor, + MultiColor? backgroundColor, + IconThemeData? iconTheme, + bool? primary, + bool? excludeHeaderSemantics, + double? toolbarHeight, + double? leadingWidth, + Widget? leading, + List? actions, + List? expandedWidget, + Key? key, + }) => + SecondCustomAppBar( + title: title ?? _value.title, + key: key ?? _value.key, + ); +} + +mixin $SecondCustomAppBarCWMixin on Component { + $TopAppBarComponentCWProxy get copyWith => + $SecondCustomAppBarCWProxyImpl(this as SecondCustomAppBar); +} diff --git a/packages/wyatt_ui_components/example/lib/main.dart b/packages/wyatt_ui_components/example/lib/main.dart index be86f9b0..24d6f51e 100644 --- a/packages/wyatt_ui_components/example/lib/main.dart +++ b/packages/wyatt_ui_components/example/lib/main.dart @@ -15,6 +15,7 @@ // along with this program. If not, see . import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; import 'package:wyatt_ui_components_example/component_theme.dart'; @@ -22,6 +23,20 @@ void main() { runApp(const MyApp()); } +final router = GoRouter( + initialLocation: '/home', + routes: [ + GoRoute( + path: '/home', + builder: (context, state) => const Home(), + ), + GoRoute( + path: '/home/secondary', + builder: (context, state) => const Home2(), + ), + ], +); + class MyApp extends StatelessWidget { const MyApp({super.key}); @@ -29,14 +44,12 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) => ComponentTheme( data: AppThemeComponent.components, - child: MaterialApp( + child: MaterialApp.router( title: 'Wyatt Ui Components Example', theme: ThemeData( primarySwatch: Colors.blue, ), - home: const Scaffold( - body: Home(), - ), + routerConfig: router, ), ); } @@ -48,8 +61,37 @@ class Home extends StatelessWidget { Widget build(BuildContext context) => Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(60), - child: context.components.topAppBarComponent - .title(const TextWrapper('Example title')), + child: context.components.topAppBar ?? const SizedBox.shrink(), + ), + body: Column( + children: [ + Expanded( + child: context.components.errorComponent.call( + message: const TextWrapper('Example error'), + ), + ), + const SizedBox( + height: 10, + ), + Expanded( + child: context.components.loaderComponent.call( + colors: const MultiColor.single(Colors.green), + ), + ), + ], + ), + bottomNavigationBar: context.components.bottomNavigationBar, + ); +} + +class Home2 extends StatelessWidget { + const Home2({super.key}); + + @override + Widget build(BuildContext context) => Scaffold( + appBar: PreferredSize( + preferredSize: const Size.fromHeight(60), + child: context.components.topAppBar ?? const SizedBox.shrink(), ), body: Column( children: [ diff --git a/packages/wyatt_ui_components/example/pubspec.yaml b/packages/wyatt_ui_components/example/pubspec.yaml index e98d29fb..07400d18 100644 --- a/packages/wyatt_ui_components/example/pubspec.yaml +++ b/packages/wyatt_ui_components/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -28,6 +28,7 @@ environment: # versions available, run `flutter pub outdated`. dependencies: flutter: { sdk: flutter } + go_router: ^7.0.1 wyatt_ui_components: path: "../" diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.dart index 99b5f93b..795baa29 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.dart @@ -19,7 +19,8 @@ import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_ex import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart'; import 'package:wyatt_ui_components/src/domain/entities/component.dart'; -part 'bottom_navigation_bar_component.g.dart'; +part 'bottom_navigation_bar_component.interface.g.dart'; +part 'bottom_navigation_bar_component.impl.g.dart'; @ComponentProxyExtension() abstract class BottomNavigationBarComponent extends Component diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.g.dart deleted file mode 100644 index 9e5fdd5e..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.g.dart +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'bottom_navigation_bar_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $BottomNavigationBarComponentCWProxy { - BottomNavigationBarComponent onTap(void Function(BuildContext, int)? onTap); - BottomNavigationBarComponent currentIndex(int? currentIndex); - BottomNavigationBarComponent key(Key? key); - BottomNavigationBarComponent call({ - void Function(BuildContext, int)? onTap, - int? currentIndex, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.impl.g.dart new file mode 100644 index 00000000..bd33b6c7 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.impl.g.dart @@ -0,0 +1,41 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bottom_navigation_bar_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$BottomNavigationBarMultiProxyCWProxyImpl + implements $BottomNavigationBarComponentCWProxy { + const $$BottomNavigationBarMultiProxyCWProxyImpl(this._value); + final $BottomNavigationBarMultiProxy _value; + @override + $BottomNavigationBarMultiProxy onTap( + void Function(BuildContext, int)? onTap) => + this(onTap: onTap); + @override + $BottomNavigationBarMultiProxy currentIndex(int? currentIndex) => + this(currentIndex: currentIndex); + @override + $BottomNavigationBarMultiProxy key(Key? key) => this(key: key); + @override + $BottomNavigationBarMultiProxy call({ + void Function(BuildContext, int)? onTap, + int? currentIndex, + Key? key, + }) => + $BottomNavigationBarMultiProxy( + _value.select, + freezed: _value.freezed, + onTap: onTap ?? _value.onTap, + currentIndex: currentIndex ?? _value.currentIndex, + key: key ?? _value.key, + ); +} + +mixin $$BottomNavigationBarMultiProxyCWMixin on Component { + $BottomNavigationBarComponentCWProxy get copyWith => + $$BottomNavigationBarMultiProxyCWProxyImpl( + this as $BottomNavigationBarMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.interface.g.dart new file mode 100644 index 00000000..43701be5 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/bottom_navigation_bar_component.interface.g.dart @@ -0,0 +1,56 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bottom_navigation_bar_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $BottomNavigationBarComponentCWProxy { + BottomNavigationBarComponent onTap(void Function(BuildContext, int)? onTap); + BottomNavigationBarComponent currentIndex(int? currentIndex); + BottomNavigationBarComponent key(Key? key); + BottomNavigationBarComponent call({ + void Function(BuildContext, int)? onTap, + int? currentIndex, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $BottomNavigationBarMultiProxy extends BottomNavigationBarComponent + with $$BottomNavigationBarMultiProxyCWMixin { + final bool? freezed; + final BottomNavigationBarComponent Function(BuildContext context) select; + $BottomNavigationBarMultiProxy( + this.select, { + this.freezed, + super.onTap, + super.currentIndex, + super.key, + }); + factory $BottomNavigationBarMultiProxy.multi( + BottomNavigationBarComponent Function(BuildContext context) test, + {bool freezed = true}) => + $BottomNavigationBarMultiProxy( + test, + freezed: freezed, + ); + BottomNavigationBarComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + onTap: onTap, + currentIndex: currentIndex, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.dart index 4e9dc220..daa53628 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.dart @@ -19,7 +19,8 @@ import 'package:flutter/services.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'top_app_bar_component.g.dart'; +part 'top_app_bar_component.interface.g.dart'; +part 'top_app_bar_component.impl.g.dart'; @ComponentProxyExtension() abstract class TopAppBarComponent extends TopBarComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.g.dart deleted file mode 100644 index e71c01be..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.g.dart +++ /dev/null @@ -1,55 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'top_app_bar_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $TopAppBarComponentCWProxy { - TopAppBarComponent title(TextWrapper? title); - TopAppBarComponent centerTitle(bool? centerTitle); - TopAppBarComponent shape(ShapeBorder? shape); - TopAppBarComponent systemOverlayStyle( - SystemUiOverlayStyle? systemOverlayStyle); - TopAppBarComponent automaticallyImplyLeading(bool? automaticallyImplyLeading); - TopAppBarComponent flexibleSpace(Widget? flexibleSpace); - TopAppBarComponent bottom(PreferredSizeWidget? bottom); - TopAppBarComponent elevation(double? elevation); - TopAppBarComponent scrolledUnderElevation(double? scrolledUnderElevation); - TopAppBarComponent shadowColor(Color? shadowColor); - TopAppBarComponent surfaceTintColor(Color? surfaceTintColor); - TopAppBarComponent backgroundColor(MultiColor? backgroundColor); - TopAppBarComponent iconTheme(IconThemeData? iconTheme); - TopAppBarComponent primary(bool? primary); - TopAppBarComponent excludeHeaderSemantics(bool? excludeHeaderSemantics); - TopAppBarComponent toolbarHeight(double? toolbarHeight); - TopAppBarComponent leadingWidth(double? leadingWidth); - TopAppBarComponent leading(Widget? leading); - TopAppBarComponent actions(List? actions); - TopAppBarComponent expandedWidget(List? expandedWidget); - TopAppBarComponent key(Key? key); - TopAppBarComponent call({ - TextWrapper? title, - bool? centerTitle, - ShapeBorder? shape, - SystemUiOverlayStyle? systemOverlayStyle, - bool? automaticallyImplyLeading, - Widget? flexibleSpace, - PreferredSizeWidget? bottom, - double? elevation, - double? scrolledUnderElevation, - Color? shadowColor, - Color? surfaceTintColor, - MultiColor? backgroundColor, - IconThemeData? iconTheme, - bool? primary, - bool? excludeHeaderSemantics, - double? toolbarHeight, - double? leadingWidth, - Widget? leading, - List? actions, - List? expandedWidget, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.impl.g.dart new file mode 100644 index 00000000..394b10f6 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.impl.g.dart @@ -0,0 +1,128 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'top_app_bar_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$TopAppBarMultiProxyCWProxyImpl implements $TopAppBarComponentCWProxy { + const $$TopAppBarMultiProxyCWProxyImpl(this._value); + final $TopAppBarMultiProxy _value; + @override + $TopAppBarMultiProxy title(TextWrapper? title) => this(title: title); + @override + $TopAppBarMultiProxy centerTitle(bool? centerTitle) => + this(centerTitle: centerTitle); + @override + $TopAppBarMultiProxy shape(ShapeBorder? shape) => this(shape: shape); + @override + $TopAppBarMultiProxy systemOverlayStyle( + SystemUiOverlayStyle? systemOverlayStyle) => + this(systemOverlayStyle: systemOverlayStyle); + @override + $TopAppBarMultiProxy automaticallyImplyLeading( + bool? automaticallyImplyLeading) => + this(automaticallyImplyLeading: automaticallyImplyLeading); + @override + $TopAppBarMultiProxy flexibleSpace(Widget? flexibleSpace) => + this(flexibleSpace: flexibleSpace); + @override + $TopAppBarMultiProxy bottom(PreferredSizeWidget? bottom) => + this(bottom: bottom); + @override + $TopAppBarMultiProxy elevation(double? elevation) => + this(elevation: elevation); + @override + $TopAppBarMultiProxy scrolledUnderElevation(double? scrolledUnderElevation) => + this(scrolledUnderElevation: scrolledUnderElevation); + @override + $TopAppBarMultiProxy shadowColor(Color? shadowColor) => + this(shadowColor: shadowColor); + @override + $TopAppBarMultiProxy surfaceTintColor(Color? surfaceTintColor) => + this(surfaceTintColor: surfaceTintColor); + @override + $TopAppBarMultiProxy backgroundColor(MultiColor? backgroundColor) => + this(backgroundColor: backgroundColor); + @override + $TopAppBarMultiProxy iconTheme(IconThemeData? iconTheme) => + this(iconTheme: iconTheme); + @override + $TopAppBarMultiProxy primary(bool? primary) => this(primary: primary); + @override + $TopAppBarMultiProxy excludeHeaderSemantics(bool? excludeHeaderSemantics) => + this(excludeHeaderSemantics: excludeHeaderSemantics); + @override + $TopAppBarMultiProxy toolbarHeight(double? toolbarHeight) => + this(toolbarHeight: toolbarHeight); + @override + $TopAppBarMultiProxy leadingWidth(double? leadingWidth) => + this(leadingWidth: leadingWidth); + @override + $TopAppBarMultiProxy leading(Widget? leading) => this(leading: leading); + @override + $TopAppBarMultiProxy actions(List? actions) => this(actions: actions); + @override + $TopAppBarMultiProxy expandedWidget(List? expandedWidget) => + this(expandedWidget: expandedWidget); + @override + $TopAppBarMultiProxy key(Key? key) => this(key: key); + @override + $TopAppBarMultiProxy call({ + TextWrapper? title, + bool? centerTitle, + ShapeBorder? shape, + SystemUiOverlayStyle? systemOverlayStyle, + bool? automaticallyImplyLeading, + Widget? flexibleSpace, + PreferredSizeWidget? bottom, + double? elevation, + double? scrolledUnderElevation, + Color? shadowColor, + Color? surfaceTintColor, + MultiColor? backgroundColor, + IconThemeData? iconTheme, + bool? primary, + bool? excludeHeaderSemantics, + double? toolbarHeight, + double? leadingWidth, + Widget? leading, + List? actions, + List? expandedWidget, + Key? key, + }) => + $TopAppBarMultiProxy( + _value.select, + freezed: _value.freezed, + title: title ?? _value.title, + centerTitle: centerTitle ?? _value.centerTitle, + shape: shape ?? _value.shape, + systemOverlayStyle: systemOverlayStyle ?? _value.systemOverlayStyle, + automaticallyImplyLeading: + automaticallyImplyLeading ?? _value.automaticallyImplyLeading, + flexibleSpace: flexibleSpace ?? _value.flexibleSpace, + bottom: bottom ?? _value.bottom, + elevation: elevation ?? _value.elevation, + scrolledUnderElevation: + scrolledUnderElevation ?? _value.scrolledUnderElevation, + shadowColor: shadowColor ?? _value.shadowColor, + surfaceTintColor: surfaceTintColor ?? _value.surfaceTintColor, + backgroundColor: backgroundColor ?? _value.backgroundColor, + iconTheme: iconTheme ?? _value.iconTheme, + primary: primary ?? _value.primary, + excludeHeaderSemantics: + excludeHeaderSemantics ?? _value.excludeHeaderSemantics, + toolbarHeight: toolbarHeight ?? _value.toolbarHeight, + leadingWidth: leadingWidth ?? _value.leadingWidth, + leading: leading ?? _value.leading, + actions: actions ?? _value.actions, + expandedWidget: expandedWidget ?? _value.expandedWidget, + key: key ?? _value.key, + ); +} + +mixin $$TopAppBarMultiProxyCWMixin on Component { + $TopAppBarComponentCWProxy get copyWith => + $$TopAppBarMultiProxyCWProxyImpl(this as $TopAppBarMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.interface.g.dart new file mode 100644 index 00000000..108b02d0 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_app_bar_component.interface.g.dart @@ -0,0 +1,136 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'top_app_bar_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $TopAppBarComponentCWProxy { + TopAppBarComponent title(TextWrapper? title); + TopAppBarComponent centerTitle(bool? centerTitle); + TopAppBarComponent shape(ShapeBorder? shape); + TopAppBarComponent systemOverlayStyle( + SystemUiOverlayStyle? systemOverlayStyle); + TopAppBarComponent automaticallyImplyLeading(bool? automaticallyImplyLeading); + TopAppBarComponent flexibleSpace(Widget? flexibleSpace); + TopAppBarComponent bottom(PreferredSizeWidget? bottom); + TopAppBarComponent elevation(double? elevation); + TopAppBarComponent scrolledUnderElevation(double? scrolledUnderElevation); + TopAppBarComponent shadowColor(Color? shadowColor); + TopAppBarComponent surfaceTintColor(Color? surfaceTintColor); + TopAppBarComponent backgroundColor(MultiColor? backgroundColor); + TopAppBarComponent iconTheme(IconThemeData? iconTheme); + TopAppBarComponent primary(bool? primary); + TopAppBarComponent excludeHeaderSemantics(bool? excludeHeaderSemantics); + TopAppBarComponent toolbarHeight(double? toolbarHeight); + TopAppBarComponent leadingWidth(double? leadingWidth); + TopAppBarComponent leading(Widget? leading); + TopAppBarComponent actions(List? actions); + TopAppBarComponent expandedWidget(List? expandedWidget); + TopAppBarComponent key(Key? key); + TopAppBarComponent call({ + TextWrapper? title, + bool? centerTitle, + ShapeBorder? shape, + SystemUiOverlayStyle? systemOverlayStyle, + bool? automaticallyImplyLeading, + Widget? flexibleSpace, + PreferredSizeWidget? bottom, + double? elevation, + double? scrolledUnderElevation, + Color? shadowColor, + Color? surfaceTintColor, + MultiColor? backgroundColor, + IconThemeData? iconTheme, + bool? primary, + bool? excludeHeaderSemantics, + double? toolbarHeight, + double? leadingWidth, + Widget? leading, + List? actions, + List? expandedWidget, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $TopAppBarMultiProxy extends TopAppBarComponent + with $$TopAppBarMultiProxyCWMixin { + final bool? freezed; + final TopAppBarComponent Function(BuildContext context) select; + $TopAppBarMultiProxy( + this.select, { + this.freezed, + super.title, + super.centerTitle, + super.shape, + super.systemOverlayStyle, + super.automaticallyImplyLeading, + super.flexibleSpace, + super.bottom, + super.elevation, + super.scrolledUnderElevation, + super.shadowColor, + super.surfaceTintColor, + super.backgroundColor, + super.iconTheme, + super.primary, + super.excludeHeaderSemantics, + super.toolbarHeight, + super.leadingWidth, + super.leading, + super.actions, + super.expandedWidget, + super.key, + }) { + print('AKI'); + } + factory $TopAppBarMultiProxy.multi( + TopAppBarComponent Function(BuildContext context) test, + {bool freezed = true}) => + $TopAppBarMultiProxy( + test, + freezed: freezed, + ); + TopAppBarComponent? compo; + @override + Widget build(BuildContext context) { + print('ICI ${this.hashCode}'); + print(compo != null); + final component = (compo ??= select(context)).copyWith.call( + title: title, + centerTitle: centerTitle, + shape: shape, + systemOverlayStyle: systemOverlayStyle, + automaticallyImplyLeading: automaticallyImplyLeading, + flexibleSpace: flexibleSpace, + bottom: bottom, + elevation: elevation, + scrolledUnderElevation: scrolledUnderElevation, + shadowColor: shadowColor, + surfaceTintColor: surfaceTintColor, + backgroundColor: backgroundColor, + iconTheme: iconTheme, + primary: primary, + excludeHeaderSemantics: excludeHeaderSemantics, + toolbarHeight: toolbarHeight, + leadingWidth: leadingWidth, + leading: leading, + actions: actions, + expandedWidget: expandedWidget, + key: key, + ); + if (!(freezed ?? true)) { + print('Make compo null !'); + compo = null; + } else { + print('compo not null..'); + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.dart index 8abde68c..66cb27cb 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.dart @@ -19,7 +19,8 @@ import 'package:flutter/services.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'top_navigation_bar_component.g.dart'; +part 'top_navigation_bar_component.interface.g.dart'; +part 'top_navigation_bar_component.impl.g.dart'; @ComponentProxyExtension() abstract class TopNavigationBarComponent extends TopBarComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.impl.g.dart new file mode 100644 index 00000000..67cf8b76 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.impl.g.dart @@ -0,0 +1,141 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'top_navigation_bar_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$TopNavigationBarMultiProxyCWProxyImpl + implements $TopNavigationBarComponentCWProxy { + const $$TopNavigationBarMultiProxyCWProxyImpl(this._value); + final $TopNavigationBarMultiProxy _value; + @override + $TopNavigationBarMultiProxy navigationItems( + List? navigationItems) => + this(navigationItems: navigationItems); + @override + $TopNavigationBarMultiProxy onTap(void Function(BuildContext, int)? onTap) => + this(onTap: onTap); + @override + $TopNavigationBarMultiProxy currentIndex(int? currentIndex) => + this(currentIndex: currentIndex); + @override + $TopNavigationBarMultiProxy shape(ShapeBorder? shape) => this(shape: shape); + @override + $TopNavigationBarMultiProxy systemOverlayStyle( + SystemUiOverlayStyle? systemOverlayStyle) => + this(systemOverlayStyle: systemOverlayStyle); + @override + $TopNavigationBarMultiProxy automaticallyImplyLeading( + bool? automaticallyImplyLeading) => + this(automaticallyImplyLeading: automaticallyImplyLeading); + @override + $TopNavigationBarMultiProxy flexibleSpace(Widget? flexibleSpace) => + this(flexibleSpace: flexibleSpace); + @override + $TopNavigationBarMultiProxy bottom(PreferredSizeWidget? bottom) => + this(bottom: bottom); + @override + $TopNavigationBarMultiProxy elevation(double? elevation) => + this(elevation: elevation); + @override + $TopNavigationBarMultiProxy scrolledUnderElevation( + double? scrolledUnderElevation) => + this(scrolledUnderElevation: scrolledUnderElevation); + @override + $TopNavigationBarMultiProxy shadowColor(Color? shadowColor) => + this(shadowColor: shadowColor); + @override + $TopNavigationBarMultiProxy surfaceTintColor(Color? surfaceTintColor) => + this(surfaceTintColor: surfaceTintColor); + @override + $TopNavigationBarMultiProxy backgroundColor(MultiColor? backgroundColor) => + this(backgroundColor: backgroundColor); + @override + $TopNavigationBarMultiProxy iconTheme(IconThemeData? iconTheme) => + this(iconTheme: iconTheme); + @override + $TopNavigationBarMultiProxy primary(bool? primary) => this(primary: primary); + @override + $TopNavigationBarMultiProxy excludeHeaderSemantics( + bool? excludeHeaderSemantics) => + this(excludeHeaderSemantics: excludeHeaderSemantics); + @override + $TopNavigationBarMultiProxy toolbarHeight(double? toolbarHeight) => + this(toolbarHeight: toolbarHeight); + @override + $TopNavigationBarMultiProxy leadingWidth(double? leadingWidth) => + this(leadingWidth: leadingWidth); + @override + $TopNavigationBarMultiProxy leading(Widget? leading) => + this(leading: leading); + @override + $TopNavigationBarMultiProxy actions(List? actions) => + this(actions: actions); + @override + $TopNavigationBarMultiProxy expandedWidget(List? expandedWidget) => + this(expandedWidget: expandedWidget); + @override + $TopNavigationBarMultiProxy key(Key? key) => this(key: key); + @override + $TopNavigationBarMultiProxy call({ + List? navigationItems, + void Function(BuildContext, int)? onTap, + int? currentIndex, + ShapeBorder? shape, + SystemUiOverlayStyle? systemOverlayStyle, + bool? automaticallyImplyLeading, + Widget? flexibleSpace, + PreferredSizeWidget? bottom, + double? elevation, + double? scrolledUnderElevation, + Color? shadowColor, + Color? surfaceTintColor, + MultiColor? backgroundColor, + IconThemeData? iconTheme, + bool? primary, + bool? excludeHeaderSemantics, + double? toolbarHeight, + double? leadingWidth, + Widget? leading, + List? actions, + List? expandedWidget, + Key? key, + }) => + $TopNavigationBarMultiProxy( + _value.select, + freezed: _value.freezed, + navigationItems: navigationItems ?? _value.navigationItems, + onTap: onTap ?? _value.onTap, + currentIndex: currentIndex ?? _value.currentIndex, + shape: shape ?? _value.shape, + systemOverlayStyle: systemOverlayStyle ?? _value.systemOverlayStyle, + automaticallyImplyLeading: + automaticallyImplyLeading ?? _value.automaticallyImplyLeading, + flexibleSpace: flexibleSpace ?? _value.flexibleSpace, + bottom: bottom ?? _value.bottom, + elevation: elevation ?? _value.elevation, + scrolledUnderElevation: + scrolledUnderElevation ?? _value.scrolledUnderElevation, + shadowColor: shadowColor ?? _value.shadowColor, + surfaceTintColor: surfaceTintColor ?? _value.surfaceTintColor, + backgroundColor: backgroundColor ?? _value.backgroundColor, + iconTheme: iconTheme ?? _value.iconTheme, + primary: primary ?? _value.primary, + excludeHeaderSemantics: + excludeHeaderSemantics ?? _value.excludeHeaderSemantics, + toolbarHeight: toolbarHeight ?? _value.toolbarHeight, + leadingWidth: leadingWidth ?? _value.leadingWidth, + leading: leading ?? _value.leading, + actions: actions ?? _value.actions, + expandedWidget: expandedWidget ?? _value.expandedWidget, + key: key ?? _value.key, + ); +} + +mixin $$TopNavigationBarMultiProxyCWMixin on Component { + $TopNavigationBarComponentCWProxy get copyWith => + $$TopNavigationBarMultiProxyCWProxyImpl( + this as $TopNavigationBarMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.interface.g.dart similarity index 51% rename from packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.interface.g.dart index 7d51e749..e29d6bf1 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/bars/top_navigation_bar_component.interface.g.dart @@ -58,3 +58,79 @@ abstract class $TopNavigationBarComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $TopNavigationBarMultiProxy extends TopNavigationBarComponent + with $$TopNavigationBarMultiProxyCWMixin { + final bool? freezed; + final TopNavigationBarComponent Function(BuildContext context) select; + $TopNavigationBarMultiProxy( + this.select, { + this.freezed, + super.navigationItems, + super.onTap, + super.currentIndex, + super.shape, + super.systemOverlayStyle, + super.automaticallyImplyLeading, + super.flexibleSpace, + super.bottom, + super.elevation, + super.scrolledUnderElevation, + super.shadowColor, + super.surfaceTintColor, + super.backgroundColor, + super.iconTheme, + super.primary, + super.excludeHeaderSemantics, + super.toolbarHeight, + super.leadingWidth, + super.leading, + super.actions, + super.expandedWidget, + super.key, + }); + factory $TopNavigationBarMultiProxy.multi( + TopNavigationBarComponent Function(BuildContext context) test, + {bool freezed = true}) => + $TopNavigationBarMultiProxy( + test, + freezed: freezed, + ); + TopNavigationBarComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + navigationItems: navigationItems, + onTap: onTap, + currentIndex: currentIndex, + shape: shape, + systemOverlayStyle: systemOverlayStyle, + automaticallyImplyLeading: automaticallyImplyLeading, + flexibleSpace: flexibleSpace, + bottom: bottom, + elevation: elevation, + scrolledUnderElevation: scrolledUnderElevation, + shadowColor: shadowColor, + surfaceTintColor: surfaceTintColor, + backgroundColor: backgroundColor, + iconTheme: iconTheme, + primary: primary, + excludeHeaderSemantics: excludeHeaderSemantics, + toolbarHeight: toolbarHeight, + leadingWidth: leadingWidth, + leading: leading, + actions: actions, + expandedWidget: expandedWidget, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.dart index 5a6988d1..90beb301 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'file_selection_button_component.g.dart'; +part 'file_selection_button_component.interface.g.dart'; +part 'file_selection_button_component.impl.g.dart'; @ComponentProxyExtension() abstract class FileSelectionButtonComponent extends ButtonComponent @@ -41,29 +42,6 @@ abstract class FileSelectionButtonComponent extends ButtonComponent super.key, }); - @override - FileSelectionButtonStyle? get disabledStyle; - - @override - FileSelectionButtonStyle? get normalStyle; - - @override - FileSelectionButtonStyle? get hoveredStyle; - - @override - FileSelectionButtonStyle? get focusedStyle; - - @override - FileSelectionButtonStyle? get tappedStyle; - - // When a file is selected - @override - FileSelectionButtonStyle? get selectedStyle; - - // When the input file is invalid (too large, not supported format... etc) - @override - FileSelectionButtonStyle? get invalidStyle; - /// The main axis size of the button final MainAxisSize? mainAxisSize; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.impl.g.dart new file mode 100644 index 00000000..e329ce53 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.impl.g.dart @@ -0,0 +1,109 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'file_selection_button_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$FileSelectionButtonMultiProxyCWProxyImpl + implements $FileSelectionButtonComponentCWProxy { + const $$FileSelectionButtonMultiProxyCWProxyImpl(this._value); + final $FileSelectionButtonMultiProxy _value; + @override + $FileSelectionButtonMultiProxy mainAxisSize(MainAxisSize? mainAxisSize) => + this(mainAxisSize: mainAxisSize); + @override + $FileSelectionButtonMultiProxy leading(Widget? leading) => + this(leading: leading); + @override + $FileSelectionButtonMultiProxy title(TextWrapper? title) => + this(title: title); + @override + $FileSelectionButtonMultiProxy subtitle(TextWrapper? subtitle) => + this(subtitle: subtitle); + @override + $FileSelectionButtonMultiProxy disabledStyle( + ButtonStyle? disabledStyle) => + this(disabledStyle: disabledStyle); + @override + $FileSelectionButtonMultiProxy normalStyle( + ButtonStyle? normalStyle) => + this(normalStyle: normalStyle); + @override + $FileSelectionButtonMultiProxy hoveredStyle( + ButtonStyle? hoveredStyle) => + this(hoveredStyle: hoveredStyle); + @override + $FileSelectionButtonMultiProxy focusedStyle( + ButtonStyle? focusedStyle) => + this(focusedStyle: focusedStyle); + @override + $FileSelectionButtonMultiProxy tappedStyle( + ButtonStyle? tappedStyle) => + this(tappedStyle: tappedStyle); + @override + $FileSelectionButtonMultiProxy selectedStyle( + ButtonStyle? selectedStyle) => + this(selectedStyle: selectedStyle); + @override + $FileSelectionButtonMultiProxy invalidStyle( + ButtonStyle? invalidStyle) => + this(invalidStyle: invalidStyle); + @override + $FileSelectionButtonMultiProxy onPressed( + void Function(ControlState)? onPressed) => + this(onPressed: onPressed); + @override + $FileSelectionButtonMultiProxy disabled(ValueNotifier? disabled) => + this(disabled: disabled); + @override + $FileSelectionButtonMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $FileSelectionButtonMultiProxy key(Key? key) => this(key: key); + @override + $FileSelectionButtonMultiProxy call({ + MainAxisSize? mainAxisSize, + Widget? leading, + TextWrapper? title, + TextWrapper? subtitle, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + ButtonStyle? selectedStyle, + ButtonStyle? invalidStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }) => + $FileSelectionButtonMultiProxy( + _value.select, + freezed: _value.freezed, + mainAxisSize: mainAxisSize ?? _value.mainAxisSize, + leading: leading ?? _value.leading, + title: title ?? _value.title, + subtitle: subtitle ?? _value.subtitle, + disabledStyle: disabledStyle ?? _value.disabledStyle, + normalStyle: normalStyle ?? _value.normalStyle, + hoveredStyle: hoveredStyle ?? _value.hoveredStyle, + focusedStyle: focusedStyle ?? _value.focusedStyle, + tappedStyle: tappedStyle ?? _value.tappedStyle, + selectedStyle: selectedStyle ?? _value.selectedStyle, + invalidStyle: invalidStyle ?? _value.invalidStyle, + onPressed: onPressed ?? _value.onPressed, + disabled: disabled ?? _value.disabled, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$FileSelectionButtonMultiProxyCWMixin on Component { + $FileSelectionButtonComponentCWProxy get copyWith => + $$FileSelectionButtonMultiProxyCWProxyImpl( + this as $FileSelectionButtonMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.interface.g.dart similarity index 52% rename from packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.interface.g.dart index 7892e38c..2e7bcb21 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/file_selection_button_component.interface.g.dart @@ -44,3 +44,65 @@ abstract class $FileSelectionButtonComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $FileSelectionButtonMultiProxy extends FileSelectionButtonComponent + with $$FileSelectionButtonMultiProxyCWMixin { + final bool? freezed; + final FileSelectionButtonComponent Function(BuildContext context) select; + $FileSelectionButtonMultiProxy( + this.select, { + this.freezed, + super.mainAxisSize, + super.leading, + super.title, + super.subtitle, + super.disabledStyle, + super.normalStyle, + super.hoveredStyle, + super.focusedStyle, + super.tappedStyle, + super.selectedStyle, + super.invalidStyle, + super.onPressed, + super.disabled, + super.themeResolver, + super.key, + }); + factory $FileSelectionButtonMultiProxy.multi( + FileSelectionButtonComponent Function(BuildContext context) test, + {bool freezed = true}) => + $FileSelectionButtonMultiProxy( + test, + freezed: freezed, + ); + FileSelectionButtonComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + mainAxisSize: mainAxisSize, + leading: leading, + title: title, + subtitle: subtitle, + disabledStyle: disabledStyle, + normalStyle: normalStyle, + hoveredStyle: hoveredStyle, + focusedStyle: focusedStyle, + tappedStyle: tappedStyle, + selectedStyle: selectedStyle, + invalidStyle: invalidStyle, + onPressed: onPressed, + disabled: disabled, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.dart index 6305ac58..d31d0c1e 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'flat_button_component.g.dart'; +part 'flat_button_component.interface.g.dart'; +part 'flat_button_component.impl.g.dart'; @ComponentProxyExtension() abstract class FlatButtonComponent extends ButtonComponent @@ -39,21 +40,6 @@ abstract class FlatButtonComponent extends ButtonComponent super.key, }); - @override - FlatButtonStyle? get disabledStyle; - - @override - FlatButtonStyle? get normalStyle; - - @override - FlatButtonStyle? get hoveredStyle; - - @override - FlatButtonStyle? get focusedStyle; - - @override - FlatButtonStyle? get tappedStyle; - /// The main axis size of the button. final MainAxisSize? mainAxisSize; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.g.dart deleted file mode 100644 index 25acefba..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.g.dart +++ /dev/null @@ -1,39 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'flat_button_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $FlatButtonComponentCWProxy { - FlatButtonComponent mainAxisSize(MainAxisSize? mainAxisSize); - FlatButtonComponent prefix(Widget? prefix); - FlatButtonComponent suffix(Widget? suffix); - FlatButtonComponent label(TextWrapper? label); - FlatButtonComponent disabledStyle(ButtonStyle? disabledStyle); - FlatButtonComponent normalStyle(ButtonStyle? normalStyle); - FlatButtonComponent hoveredStyle(ButtonStyle? hoveredStyle); - FlatButtonComponent focusedStyle(ButtonStyle? focusedStyle); - FlatButtonComponent tappedStyle(ButtonStyle? tappedStyle); - FlatButtonComponent onPressed(void Function(ControlState)? onPressed); - FlatButtonComponent disabled(ValueNotifier? disabled); - FlatButtonComponent themeResolver( - ThemeResolver? themeResolver); - FlatButtonComponent key(Key? key); - FlatButtonComponent call({ - MainAxisSize? mainAxisSize, - Widget? prefix, - Widget? suffix, - TextWrapper? label, - ButtonStyle? disabledStyle, - ButtonStyle? normalStyle, - ButtonStyle? hoveredStyle, - ButtonStyle? focusedStyle, - ButtonStyle? tappedStyle, - void Function(ControlState)? onPressed, - ValueNotifier? disabled, - ThemeResolver? themeResolver, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.impl.g.dart new file mode 100644 index 00000000..30d1c94f --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.impl.g.dart @@ -0,0 +1,86 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'flat_button_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$FlatButtonMultiProxyCWProxyImpl implements $FlatButtonComponentCWProxy { + const $$FlatButtonMultiProxyCWProxyImpl(this._value); + final $FlatButtonMultiProxy _value; + @override + $FlatButtonMultiProxy mainAxisSize(MainAxisSize? mainAxisSize) => + this(mainAxisSize: mainAxisSize); + @override + $FlatButtonMultiProxy prefix(Widget? prefix) => this(prefix: prefix); + @override + $FlatButtonMultiProxy suffix(Widget? suffix) => this(suffix: suffix); + @override + $FlatButtonMultiProxy label(TextWrapper? label) => this(label: label); + @override + $FlatButtonMultiProxy disabledStyle(ButtonStyle? disabledStyle) => + this(disabledStyle: disabledStyle); + @override + $FlatButtonMultiProxy normalStyle(ButtonStyle? normalStyle) => + this(normalStyle: normalStyle); + @override + $FlatButtonMultiProxy hoveredStyle(ButtonStyle? hoveredStyle) => + this(hoveredStyle: hoveredStyle); + @override + $FlatButtonMultiProxy focusedStyle(ButtonStyle? focusedStyle) => + this(focusedStyle: focusedStyle); + @override + $FlatButtonMultiProxy tappedStyle(ButtonStyle? tappedStyle) => + this(tappedStyle: tappedStyle); + @override + $FlatButtonMultiProxy onPressed(void Function(ControlState)? onPressed) => + this(onPressed: onPressed); + @override + $FlatButtonMultiProxy disabled(ValueNotifier? disabled) => + this(disabled: disabled); + @override + $FlatButtonMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $FlatButtonMultiProxy key(Key? key) => this(key: key); + @override + $FlatButtonMultiProxy call({ + MainAxisSize? mainAxisSize, + Widget? prefix, + Widget? suffix, + TextWrapper? label, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }) => + $FlatButtonMultiProxy( + _value.select, + freezed: _value.freezed, + mainAxisSize: mainAxisSize ?? _value.mainAxisSize, + prefix: prefix ?? _value.prefix, + suffix: suffix ?? _value.suffix, + label: label ?? _value.label, + disabledStyle: disabledStyle ?? _value.disabledStyle, + normalStyle: normalStyle ?? _value.normalStyle, + hoveredStyle: hoveredStyle ?? _value.hoveredStyle, + focusedStyle: focusedStyle ?? _value.focusedStyle, + tappedStyle: tappedStyle ?? _value.tappedStyle, + onPressed: onPressed ?? _value.onPressed, + disabled: disabled ?? _value.disabled, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$FlatButtonMultiProxyCWMixin on Component { + $FlatButtonComponentCWProxy get copyWith => + $$FlatButtonMultiProxyCWProxyImpl(this as $FlatButtonMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.interface.g.dart new file mode 100644 index 00000000..d8f52af9 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/flat_button_component.interface.g.dart @@ -0,0 +1,97 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'flat_button_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $FlatButtonComponentCWProxy { + FlatButtonComponent mainAxisSize(MainAxisSize? mainAxisSize); + FlatButtonComponent prefix(Widget? prefix); + FlatButtonComponent suffix(Widget? suffix); + FlatButtonComponent label(TextWrapper? label); + FlatButtonComponent disabledStyle(ButtonStyle? disabledStyle); + FlatButtonComponent normalStyle(ButtonStyle? normalStyle); + FlatButtonComponent hoveredStyle(ButtonStyle? hoveredStyle); + FlatButtonComponent focusedStyle(ButtonStyle? focusedStyle); + FlatButtonComponent tappedStyle(ButtonStyle? tappedStyle); + FlatButtonComponent onPressed(void Function(ControlState)? onPressed); + FlatButtonComponent disabled(ValueNotifier? disabled); + FlatButtonComponent themeResolver( + ThemeResolver? themeResolver); + FlatButtonComponent key(Key? key); + FlatButtonComponent call({ + MainAxisSize? mainAxisSize, + Widget? prefix, + Widget? suffix, + TextWrapper? label, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $FlatButtonMultiProxy extends FlatButtonComponent + with $$FlatButtonMultiProxyCWMixin { + final bool? freezed; + final FlatButtonComponent Function(BuildContext context) select; + $FlatButtonMultiProxy( + this.select, { + this.freezed, + super.mainAxisSize, + super.prefix, + super.suffix, + super.label, + super.disabledStyle, + super.normalStyle, + super.hoveredStyle, + super.focusedStyle, + super.tappedStyle, + super.onPressed, + super.disabled, + super.themeResolver, + super.key, + }); + factory $FlatButtonMultiProxy.multi( + FlatButtonComponent Function(BuildContext context) test, + {bool freezed = true}) => + $FlatButtonMultiProxy( + test, + freezed: freezed, + ); + FlatButtonComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + mainAxisSize: mainAxisSize, + prefix: prefix, + suffix: suffix, + label: label, + disabledStyle: disabledStyle, + normalStyle: normalStyle, + hoveredStyle: hoveredStyle, + focusedStyle: focusedStyle, + tappedStyle: tappedStyle, + onPressed: onPressed, + disabled: disabled, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.dart index 522042f1..918f1c94 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'simple_icon_button_component.g.dart'; +part 'simple_icon_button_component.interface.g.dart'; +part 'simple_icon_button_component.impl.g.dart'; @ComponentProxyExtension() abstract class SimpleIconButtonComponent extends ButtonComponent @@ -36,21 +37,6 @@ abstract class SimpleIconButtonComponent extends ButtonComponent super.key, }); - @override - SimpleIconButtonStyle? get disabledStyle; - - @override - SimpleIconButtonStyle? get normalStyle; - - @override - SimpleIconButtonStyle? get hoveredStyle; - - @override - SimpleIconButtonStyle? get focusedStyle; - - @override - SimpleIconButtonStyle? get tappedStyle; - /// The icon to display inside the button. final Widget? icon; } diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.g.dart deleted file mode 100644 index ecd9d161..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.g.dart +++ /dev/null @@ -1,33 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'simple_icon_button_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $SimpleIconButtonComponentCWProxy { - SimpleIconButtonComponent icon(Widget? icon); - SimpleIconButtonComponent disabledStyle(ButtonStyle? disabledStyle); - SimpleIconButtonComponent normalStyle(ButtonStyle? normalStyle); - SimpleIconButtonComponent hoveredStyle(ButtonStyle? hoveredStyle); - SimpleIconButtonComponent focusedStyle(ButtonStyle? focusedStyle); - SimpleIconButtonComponent tappedStyle(ButtonStyle? tappedStyle); - SimpleIconButtonComponent onPressed(void Function(ControlState)? onPressed); - SimpleIconButtonComponent disabled(ValueNotifier? disabled); - SimpleIconButtonComponent themeResolver( - ThemeResolver? themeResolver); - SimpleIconButtonComponent key(Key? key); - SimpleIconButtonComponent call({ - Widget? icon, - ButtonStyle? disabledStyle, - ButtonStyle? normalStyle, - ButtonStyle? hoveredStyle, - ButtonStyle? focusedStyle, - ButtonStyle? tappedStyle, - void Function(ControlState)? onPressed, - ValueNotifier? disabled, - ThemeResolver? themeResolver, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.impl.g.dart new file mode 100644 index 00000000..762d5c10 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.impl.g.dart @@ -0,0 +1,79 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'simple_icon_button_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$SimpleIconButtonMultiProxyCWProxyImpl + implements $SimpleIconButtonComponentCWProxy { + const $$SimpleIconButtonMultiProxyCWProxyImpl(this._value); + final $SimpleIconButtonMultiProxy _value; + @override + $SimpleIconButtonMultiProxy icon(Widget? icon) => this(icon: icon); + @override + $SimpleIconButtonMultiProxy disabledStyle( + ButtonStyle? disabledStyle) => + this(disabledStyle: disabledStyle); + @override + $SimpleIconButtonMultiProxy normalStyle(ButtonStyle? normalStyle) => + this(normalStyle: normalStyle); + @override + $SimpleIconButtonMultiProxy hoveredStyle( + ButtonStyle? hoveredStyle) => + this(hoveredStyle: hoveredStyle); + @override + $SimpleIconButtonMultiProxy focusedStyle( + ButtonStyle? focusedStyle) => + this(focusedStyle: focusedStyle); + @override + $SimpleIconButtonMultiProxy tappedStyle(ButtonStyle? tappedStyle) => + this(tappedStyle: tappedStyle); + @override + $SimpleIconButtonMultiProxy onPressed( + void Function(ControlState)? onPressed) => + this(onPressed: onPressed); + @override + $SimpleIconButtonMultiProxy disabled(ValueNotifier? disabled) => + this(disabled: disabled); + @override + $SimpleIconButtonMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $SimpleIconButtonMultiProxy key(Key? key) => this(key: key); + @override + $SimpleIconButtonMultiProxy call({ + Widget? icon, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }) => + $SimpleIconButtonMultiProxy( + _value.select, + freezed: _value.freezed, + icon: icon ?? _value.icon, + disabledStyle: disabledStyle ?? _value.disabledStyle, + normalStyle: normalStyle ?? _value.normalStyle, + hoveredStyle: hoveredStyle ?? _value.hoveredStyle, + focusedStyle: focusedStyle ?? _value.focusedStyle, + tappedStyle: tappedStyle ?? _value.tappedStyle, + onPressed: onPressed ?? _value.onPressed, + disabled: disabled ?? _value.disabled, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$SimpleIconButtonMultiProxyCWMixin on Component { + $SimpleIconButtonComponentCWProxy get copyWith => + $$SimpleIconButtonMultiProxyCWProxyImpl( + this as $SimpleIconButtonMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.interface.g.dart new file mode 100644 index 00000000..1c58107c --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/simple_icon_button_component.interface.g.dart @@ -0,0 +1,85 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'simple_icon_button_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $SimpleIconButtonComponentCWProxy { + SimpleIconButtonComponent icon(Widget? icon); + SimpleIconButtonComponent disabledStyle(ButtonStyle? disabledStyle); + SimpleIconButtonComponent normalStyle(ButtonStyle? normalStyle); + SimpleIconButtonComponent hoveredStyle(ButtonStyle? hoveredStyle); + SimpleIconButtonComponent focusedStyle(ButtonStyle? focusedStyle); + SimpleIconButtonComponent tappedStyle(ButtonStyle? tappedStyle); + SimpleIconButtonComponent onPressed(void Function(ControlState)? onPressed); + SimpleIconButtonComponent disabled(ValueNotifier? disabled); + SimpleIconButtonComponent themeResolver( + ThemeResolver? themeResolver); + SimpleIconButtonComponent key(Key? key); + SimpleIconButtonComponent call({ + Widget? icon, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $SimpleIconButtonMultiProxy extends SimpleIconButtonComponent + with $$SimpleIconButtonMultiProxyCWMixin { + final bool? freezed; + final SimpleIconButtonComponent Function(BuildContext context) select; + $SimpleIconButtonMultiProxy( + this.select, { + this.freezed, + super.icon, + super.disabledStyle, + super.normalStyle, + super.hoveredStyle, + super.focusedStyle, + super.tappedStyle, + super.onPressed, + super.disabled, + super.themeResolver, + super.key, + }); + factory $SimpleIconButtonMultiProxy.multi( + SimpleIconButtonComponent Function(BuildContext context) test, + {bool freezed = true}) => + $SimpleIconButtonMultiProxy( + test, + freezed: freezed, + ); + SimpleIconButtonComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + icon: icon, + disabledStyle: disabledStyle, + normalStyle: normalStyle, + hoveredStyle: hoveredStyle, + focusedStyle: focusedStyle, + tappedStyle: tappedStyle, + onPressed: onPressed, + disabled: disabled, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.dart index ba3a3571..4d9d8a45 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'symbol_button_component.g.dart'; +part 'symbol_button_component.interface.g.dart'; +part 'symbol_button_component.impl.g.dart'; @ComponentProxyExtension() abstract class SymbolButtonComponent extends ButtonComponent @@ -39,24 +40,6 @@ abstract class SymbolButtonComponent extends ButtonComponent super.key, }); - @override - SymbolButtonStyle? get disabledStyle; - - @override - SymbolButtonStyle? get normalStyle; - - @override - SymbolButtonStyle? get hoveredStyle; - - @override - SymbolButtonStyle? get focusedStyle; - - @override - SymbolButtonStyle? get tappedStyle; - - @override - SymbolButtonStyle? get selectedStyle; - /// The main axis size of the button. final MainAxisSize? mainAxisSize; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.impl.g.dart new file mode 100644 index 00000000..65ca9e4c --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.impl.g.dart @@ -0,0 +1,88 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'symbol_button_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$SymbolButtonMultiProxyCWProxyImpl + implements $SymbolButtonComponentCWProxy { + const $$SymbolButtonMultiProxyCWProxyImpl(this._value); + final $SymbolButtonMultiProxy _value; + @override + $SymbolButtonMultiProxy mainAxisSize(MainAxisSize? mainAxisSize) => + this(mainAxisSize: mainAxisSize); + @override + $SymbolButtonMultiProxy label(TextWrapper? label) => this(label: label); + @override + $SymbolButtonMultiProxy icon(Widget? icon) => this(icon: icon); + @override + $SymbolButtonMultiProxy disabledStyle(ButtonStyle? disabledStyle) => + this(disabledStyle: disabledStyle); + @override + $SymbolButtonMultiProxy normalStyle(ButtonStyle? normalStyle) => + this(normalStyle: normalStyle); + @override + $SymbolButtonMultiProxy hoveredStyle(ButtonStyle? hoveredStyle) => + this(hoveredStyle: hoveredStyle); + @override + $SymbolButtonMultiProxy focusedStyle(ButtonStyle? focusedStyle) => + this(focusedStyle: focusedStyle); + @override + $SymbolButtonMultiProxy tappedStyle(ButtonStyle? tappedStyle) => + this(tappedStyle: tappedStyle); + @override + $SymbolButtonMultiProxy selectedStyle(ButtonStyle? selectedStyle) => + this(selectedStyle: selectedStyle); + @override + $SymbolButtonMultiProxy onPressed(void Function(ControlState)? onPressed) => + this(onPressed: onPressed); + @override + $SymbolButtonMultiProxy disabled(ValueNotifier? disabled) => + this(disabled: disabled); + @override + $SymbolButtonMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $SymbolButtonMultiProxy key(Key? key) => this(key: key); + @override + $SymbolButtonMultiProxy call({ + MainAxisSize? mainAxisSize, + TextWrapper? label, + Widget? icon, + ButtonStyle? disabledStyle, + ButtonStyle? normalStyle, + ButtonStyle? hoveredStyle, + ButtonStyle? focusedStyle, + ButtonStyle? tappedStyle, + ButtonStyle? selectedStyle, + void Function(ControlState)? onPressed, + ValueNotifier? disabled, + ThemeResolver? themeResolver, + Key? key, + }) => + $SymbolButtonMultiProxy( + _value.select, + freezed: _value.freezed, + mainAxisSize: mainAxisSize ?? _value.mainAxisSize, + label: label ?? _value.label, + icon: icon ?? _value.icon, + disabledStyle: disabledStyle ?? _value.disabledStyle, + normalStyle: normalStyle ?? _value.normalStyle, + hoveredStyle: hoveredStyle ?? _value.hoveredStyle, + focusedStyle: focusedStyle ?? _value.focusedStyle, + tappedStyle: tappedStyle ?? _value.tappedStyle, + selectedStyle: selectedStyle ?? _value.selectedStyle, + onPressed: onPressed ?? _value.onPressed, + disabled: disabled ?? _value.disabled, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$SymbolButtonMultiProxyCWMixin on Component { + $SymbolButtonComponentCWProxy get copyWith => + $$SymbolButtonMultiProxyCWProxyImpl(this as $SymbolButtonMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.interface.g.dart similarity index 50% rename from packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.interface.g.dart index be5cbb51..e1cd1aca 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/buttons/symbol_button_component.interface.g.dart @@ -37,3 +37,61 @@ abstract class $SymbolButtonComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $SymbolButtonMultiProxy extends SymbolButtonComponent + with $$SymbolButtonMultiProxyCWMixin { + final bool? freezed; + final SymbolButtonComponent Function(BuildContext context) select; + $SymbolButtonMultiProxy( + this.select, { + this.freezed, + super.mainAxisSize, + super.label, + super.icon, + super.disabledStyle, + super.normalStyle, + super.hoveredStyle, + super.focusedStyle, + super.tappedStyle, + super.selectedStyle, + super.onPressed, + super.disabled, + super.themeResolver, + super.key, + }); + factory $SymbolButtonMultiProxy.multi( + SymbolButtonComponent Function(BuildContext context) test, + {bool freezed = true}) => + $SymbolButtonMultiProxy( + test, + freezed: freezed, + ); + SymbolButtonComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + mainAxisSize: mainAxisSize, + label: label, + icon: icon, + disabledStyle: disabledStyle, + normalStyle: normalStyle, + hoveredStyle: hoveredStyle, + focusedStyle: focusedStyle, + tappedStyle: tappedStyle, + selectedStyle: selectedStyle, + onPressed: onPressed, + disabled: disabled, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.dart index 71652f62..56869e85 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'information_card_component.g.dart'; +part 'information_card_component.interface.g.dart'; +part 'information_card_component.impl.g.dart'; @ComponentProxyExtension() abstract class InformationCardComponent extends CardComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.g.dart deleted file mode 100644 index 820e1441..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.g.dart +++ /dev/null @@ -1,48 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'information_card_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $InformationCardComponentCWProxy { - InformationCardComponent icons(List? icons); - InformationCardComponent title(TextWrapper? title); - InformationCardComponent subtitle(TextWrapper? subtitle); - InformationCardComponent body(TextWrapper? body); - InformationCardComponent axis(Axis? axis); - InformationCardComponent radius(BorderRadiusGeometry? radius); - InformationCardComponent padding(EdgeInsetsGeometry? padding); - InformationCardComponent borderColors(MultiColor? borderColors); - InformationCardComponent backgroundColors(MultiColor? backgroundColors); - InformationCardComponent stroke(double? stroke); - InformationCardComponent minSize(Size? minSize); - InformationCardComponent maxSize(Size? maxSize); - InformationCardComponent shadow(BoxShadow? shadow); - InformationCardComponent titleStyle(TextStyle? titleStyle); - InformationCardComponent subtitleStyle(TextStyle? subtitleStyle); - InformationCardComponent bodyStyle(TextStyle? bodyStyle); - InformationCardComponent background(Widget? background); - InformationCardComponent key(Key? key); - InformationCardComponent call({ - List? icons, - TextWrapper? title, - TextWrapper? subtitle, - TextWrapper? body, - Axis? axis, - BorderRadiusGeometry? radius, - EdgeInsetsGeometry? padding, - MultiColor? borderColors, - MultiColor? backgroundColors, - double? stroke, - Size? minSize, - Size? maxSize, - BoxShadow? shadow, - TextStyle? titleStyle, - TextStyle? subtitleStyle, - TextStyle? bodyStyle, - Widget? background, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.impl.g.dart new file mode 100644 index 00000000..b6a44585 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.impl.g.dart @@ -0,0 +1,107 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'information_card_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$InformationCardMultiProxyCWProxyImpl + implements $InformationCardComponentCWProxy { + const $$InformationCardMultiProxyCWProxyImpl(this._value); + final $InformationCardMultiProxy _value; + @override + $InformationCardMultiProxy icons(List? icons) => this(icons: icons); + @override + $InformationCardMultiProxy title(TextWrapper? title) => this(title: title); + @override + $InformationCardMultiProxy subtitle(TextWrapper? subtitle) => + this(subtitle: subtitle); + @override + $InformationCardMultiProxy body(TextWrapper? body) => this(body: body); + @override + $InformationCardMultiProxy axis(Axis? axis) => this(axis: axis); + @override + $InformationCardMultiProxy radius(BorderRadiusGeometry? radius) => + this(radius: radius); + @override + $InformationCardMultiProxy padding(EdgeInsetsGeometry? padding) => + this(padding: padding); + @override + $InformationCardMultiProxy borderColors(MultiColor? borderColors) => + this(borderColors: borderColors); + @override + $InformationCardMultiProxy backgroundColors(MultiColor? backgroundColors) => + this(backgroundColors: backgroundColors); + @override + $InformationCardMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $InformationCardMultiProxy minSize(Size? minSize) => this(minSize: minSize); + @override + $InformationCardMultiProxy maxSize(Size? maxSize) => this(maxSize: maxSize); + @override + $InformationCardMultiProxy shadow(BoxShadow? shadow) => this(shadow: shadow); + @override + $InformationCardMultiProxy titleStyle(TextStyle? titleStyle) => + this(titleStyle: titleStyle); + @override + $InformationCardMultiProxy subtitleStyle(TextStyle? subtitleStyle) => + this(subtitleStyle: subtitleStyle); + @override + $InformationCardMultiProxy bodyStyle(TextStyle? bodyStyle) => + this(bodyStyle: bodyStyle); + @override + $InformationCardMultiProxy background(Widget? background) => + this(background: background); + @override + $InformationCardMultiProxy key(Key? key) => this(key: key); + @override + $InformationCardMultiProxy call({ + List? icons, + TextWrapper? title, + TextWrapper? subtitle, + TextWrapper? body, + Axis? axis, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }) => + $InformationCardMultiProxy( + _value.select, + freezed: _value.freezed, + icons: icons ?? _value.icons, + title: title ?? _value.title, + subtitle: subtitle ?? _value.subtitle, + body: body ?? _value.body, + axis: axis ?? _value.axis, + radius: radius ?? _value.radius, + padding: padding ?? _value.padding, + borderColors: borderColors ?? _value.borderColors, + backgroundColors: backgroundColors ?? _value.backgroundColors, + stroke: stroke ?? _value.stroke, + minSize: minSize ?? _value.minSize, + maxSize: maxSize ?? _value.maxSize, + shadow: shadow ?? _value.shadow, + titleStyle: titleStyle ?? _value.titleStyle, + subtitleStyle: subtitleStyle ?? _value.subtitleStyle, + bodyStyle: bodyStyle ?? _value.bodyStyle, + background: background ?? _value.background, + key: key ?? _value.key, + ); +} + +mixin $$InformationCardMultiProxyCWMixin on Component { + $InformationCardComponentCWProxy get copyWith => + $$InformationCardMultiProxyCWProxyImpl( + this as $InformationCardMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.interface.g.dart new file mode 100644 index 00000000..e60a8705 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/information_card_component.interface.g.dart @@ -0,0 +1,116 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'information_card_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $InformationCardComponentCWProxy { + InformationCardComponent icons(List? icons); + InformationCardComponent title(TextWrapper? title); + InformationCardComponent subtitle(TextWrapper? subtitle); + InformationCardComponent body(TextWrapper? body); + InformationCardComponent axis(Axis? axis); + InformationCardComponent radius(BorderRadiusGeometry? radius); + InformationCardComponent padding(EdgeInsetsGeometry? padding); + InformationCardComponent borderColors(MultiColor? borderColors); + InformationCardComponent backgroundColors(MultiColor? backgroundColors); + InformationCardComponent stroke(double? stroke); + InformationCardComponent minSize(Size? minSize); + InformationCardComponent maxSize(Size? maxSize); + InformationCardComponent shadow(BoxShadow? shadow); + InformationCardComponent titleStyle(TextStyle? titleStyle); + InformationCardComponent subtitleStyle(TextStyle? subtitleStyle); + InformationCardComponent bodyStyle(TextStyle? bodyStyle); + InformationCardComponent background(Widget? background); + InformationCardComponent key(Key? key); + InformationCardComponent call({ + List? icons, + TextWrapper? title, + TextWrapper? subtitle, + TextWrapper? body, + Axis? axis, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $InformationCardMultiProxy extends InformationCardComponent + with $$InformationCardMultiProxyCWMixin { + final bool? freezed; + final InformationCardComponent Function(BuildContext context) select; + $InformationCardMultiProxy( + this.select, { + this.freezed, + super.icons, + super.title, + super.subtitle, + super.body, + super.axis, + super.radius, + super.padding, + super.borderColors, + super.backgroundColors, + super.stroke, + super.minSize, + super.maxSize, + super.shadow, + super.titleStyle, + super.subtitleStyle, + super.bodyStyle, + super.background, + super.key, + }); + factory $InformationCardMultiProxy.multi( + InformationCardComponent Function(BuildContext context) test, + {bool freezed = true}) => + $InformationCardMultiProxy( + test, + freezed: freezed, + ); + InformationCardComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + icons: icons, + title: title, + subtitle: subtitle, + body: body, + axis: axis, + radius: radius, + padding: padding, + borderColors: borderColors, + backgroundColors: backgroundColors, + stroke: stroke, + minSize: minSize, + maxSize: maxSize, + shadow: shadow, + titleStyle: titleStyle, + subtitleStyle: subtitleStyle, + bodyStyle: bodyStyle, + background: background, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.dart index 43076736..de367013 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'portfolio_card_component.g.dart'; +part 'portfolio_card_component.interface.g.dart'; +part 'portfolio_card_component.impl.g.dart'; @ComponentProxyExtension() abstract class PortfolioCardComponent extends CardComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.impl.g.dart new file mode 100644 index 00000000..5c300b34 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.impl.g.dart @@ -0,0 +1,129 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'portfolio_card_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$PortfolioCardMultiProxyCWProxyImpl + implements $PortfolioCardComponentCWProxy { + const $$PortfolioCardMultiProxyCWProxyImpl(this._value); + final $PortfolioCardMultiProxy _value; + @override + $PortfolioCardMultiProxy showAssetsOnTop(bool? showAssetsOnTop) => + this(showAssetsOnTop: showAssetsOnTop); + @override + $PortfolioCardMultiProxy keywords(List? keywords) => + this(keywords: keywords); + @override + $PortfolioCardMultiProxy keywordsBackgroundColors( + MultiColor? keywordsBackgroundColors) => + this(keywordsBackgroundColors: keywordsBackgroundColors); + @override + $PortfolioCardMultiProxy description(TextWrapper? description) => + this(description: description); + @override + $PortfolioCardMultiProxy logo(Widget? logo) => this(logo: logo); + @override + $PortfolioCardMultiProxy projectName(TextWrapper? projectName) => + this(projectName: projectName); + @override + $PortfolioCardMultiProxy subtitle(TextWrapper? subtitle) => + this(subtitle: subtitle); + @override + $PortfolioCardMultiProxy ctas(List? ctas) => this(ctas: ctas); + @override + $PortfolioCardMultiProxy assets(List? assets) => this(assets: assets); + @override + $PortfolioCardMultiProxy radius(BorderRadiusGeometry? radius) => + this(radius: radius); + @override + $PortfolioCardMultiProxy padding(EdgeInsetsGeometry? padding) => + this(padding: padding); + @override + $PortfolioCardMultiProxy borderColors(MultiColor? borderColors) => + this(borderColors: borderColors); + @override + $PortfolioCardMultiProxy backgroundColors(MultiColor? backgroundColors) => + this(backgroundColors: backgroundColors); + @override + $PortfolioCardMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $PortfolioCardMultiProxy minSize(Size? minSize) => this(minSize: minSize); + @override + $PortfolioCardMultiProxy maxSize(Size? maxSize) => this(maxSize: maxSize); + @override + $PortfolioCardMultiProxy shadow(BoxShadow? shadow) => this(shadow: shadow); + @override + $PortfolioCardMultiProxy titleStyle(TextStyle? titleStyle) => + this(titleStyle: titleStyle); + @override + $PortfolioCardMultiProxy subtitleStyle(TextStyle? subtitleStyle) => + this(subtitleStyle: subtitleStyle); + @override + $PortfolioCardMultiProxy bodyStyle(TextStyle? bodyStyle) => + this(bodyStyle: bodyStyle); + @override + $PortfolioCardMultiProxy background(Widget? background) => + this(background: background); + @override + $PortfolioCardMultiProxy key(Key? key) => this(key: key); + @override + $PortfolioCardMultiProxy call({ + bool? showAssetsOnTop, + List? keywords, + MultiColor? keywordsBackgroundColors, + TextWrapper? description, + Widget? logo, + TextWrapper? projectName, + TextWrapper? subtitle, + List? ctas, + List? assets, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }) => + $PortfolioCardMultiProxy( + _value.select, + freezed: _value.freezed, + showAssetsOnTop: showAssetsOnTop ?? _value.showAssetsOnTop, + keywords: keywords ?? _value.keywords, + keywordsBackgroundColors: + keywordsBackgroundColors ?? _value.keywordsBackgroundColors, + description: description ?? _value.description, + logo: logo ?? _value.logo, + projectName: projectName ?? _value.projectName, + subtitle: subtitle ?? _value.subtitle, + ctas: ctas ?? _value.ctas, + assets: assets ?? _value.assets, + radius: radius ?? _value.radius, + padding: padding ?? _value.padding, + borderColors: borderColors ?? _value.borderColors, + backgroundColors: backgroundColors ?? _value.backgroundColors, + stroke: stroke ?? _value.stroke, + minSize: minSize ?? _value.minSize, + maxSize: maxSize ?? _value.maxSize, + shadow: shadow ?? _value.shadow, + titleStyle: titleStyle ?? _value.titleStyle, + subtitleStyle: subtitleStyle ?? _value.subtitleStyle, + bodyStyle: bodyStyle ?? _value.bodyStyle, + background: background ?? _value.background, + key: key ?? _value.key, + ); +} + +mixin $$PortfolioCardMultiProxyCWMixin on Component { + $PortfolioCardComponentCWProxy get copyWith => + $$PortfolioCardMultiProxyCWProxyImpl(this as $PortfolioCardMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.interface.g.dart similarity index 51% rename from packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.interface.g.dart index 9f790092..40e7fb60 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/portfolio_card_component.interface.g.dart @@ -55,3 +55,79 @@ abstract class $PortfolioCardComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $PortfolioCardMultiProxy extends PortfolioCardComponent + with $$PortfolioCardMultiProxyCWMixin { + final bool? freezed; + final PortfolioCardComponent Function(BuildContext context) select; + $PortfolioCardMultiProxy( + this.select, { + this.freezed, + super.showAssetsOnTop, + super.keywords, + super.keywordsBackgroundColors, + super.description, + super.logo, + super.projectName, + super.subtitle, + super.ctas, + super.assets, + super.radius, + super.padding, + super.borderColors, + super.backgroundColors, + super.stroke, + super.minSize, + super.maxSize, + super.shadow, + super.titleStyle, + super.subtitleStyle, + super.bodyStyle, + super.background, + super.key, + }); + factory $PortfolioCardMultiProxy.multi( + PortfolioCardComponent Function(BuildContext context) test, + {bool freezed = true}) => + $PortfolioCardMultiProxy( + test, + freezed: freezed, + ); + PortfolioCardComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + showAssetsOnTop: showAssetsOnTop, + keywords: keywords, + keywordsBackgroundColors: keywordsBackgroundColors, + description: description, + logo: logo, + projectName: projectName, + subtitle: subtitle, + ctas: ctas, + assets: assets, + radius: radius, + padding: padding, + borderColors: borderColors, + backgroundColors: backgroundColors, + stroke: stroke, + minSize: minSize, + maxSize: maxSize, + shadow: shadow, + titleStyle: titleStyle, + subtitleStyle: subtitleStyle, + bodyStyle: bodyStyle, + background: background, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.dart index 15961dd0..30cf52cd 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'pricing_card_component.g.dart'; +part 'pricing_card_component.interface.g.dart'; +part 'pricing_card_component.impl.g.dart'; class PricingLine { const PricingLine({ diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.g.dart deleted file mode 100644 index 3f39a445..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.g.dart +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'pricing_card_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $PricingCardComponentCWProxy { - PricingCardComponent axis(Axis? axis); - PricingCardComponent title(PricingLine? title); - PricingCardComponent pricing(Pricing? pricing); - PricingCardComponent description(TextWrapper? description); - PricingCardComponent features(List? features); - PricingCardComponent cta(Widget? cta); - PricingCardComponent radius(BorderRadiusGeometry? radius); - PricingCardComponent padding(EdgeInsetsGeometry? padding); - PricingCardComponent borderColors(MultiColor? borderColors); - PricingCardComponent backgroundColors(MultiColor? backgroundColors); - PricingCardComponent stroke(double? stroke); - PricingCardComponent minSize(Size? minSize); - PricingCardComponent maxSize(Size? maxSize); - PricingCardComponent shadow(BoxShadow? shadow); - PricingCardComponent titleStyle(TextStyle? titleStyle); - PricingCardComponent subtitleStyle(TextStyle? subtitleStyle); - PricingCardComponent bodyStyle(TextStyle? bodyStyle); - PricingCardComponent background(Widget? background); - PricingCardComponent key(Key? key); - PricingCardComponent call({ - Axis? axis, - PricingLine? title, - Pricing? pricing, - TextWrapper? description, - List? features, - Widget? cta, - BorderRadiusGeometry? radius, - EdgeInsetsGeometry? padding, - MultiColor? borderColors, - MultiColor? backgroundColors, - double? stroke, - Size? minSize, - Size? maxSize, - BoxShadow? shadow, - TextStyle? titleStyle, - TextStyle? subtitleStyle, - TextStyle? bodyStyle, - Widget? background, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.impl.g.dart new file mode 100644 index 00000000..5ad19df2 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.impl.g.dart @@ -0,0 +1,111 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pricing_card_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$PricingCardMultiProxyCWProxyImpl + implements $PricingCardComponentCWProxy { + const $$PricingCardMultiProxyCWProxyImpl(this._value); + final $PricingCardMultiProxy _value; + @override + $PricingCardMultiProxy axis(Axis? axis) => this(axis: axis); + @override + $PricingCardMultiProxy title(PricingLine? title) => this(title: title); + @override + $PricingCardMultiProxy pricing(Pricing? pricing) => this(pricing: pricing); + @override + $PricingCardMultiProxy description(TextWrapper? description) => + this(description: description); + @override + $PricingCardMultiProxy features(List? features) => + this(features: features); + @override + $PricingCardMultiProxy cta(Widget? cta) => this(cta: cta); + @override + $PricingCardMultiProxy radius(BorderRadiusGeometry? radius) => + this(radius: radius); + @override + $PricingCardMultiProxy padding(EdgeInsetsGeometry? padding) => + this(padding: padding); + @override + $PricingCardMultiProxy borderColors(MultiColor? borderColors) => + this(borderColors: borderColors); + @override + $PricingCardMultiProxy backgroundColors(MultiColor? backgroundColors) => + this(backgroundColors: backgroundColors); + @override + $PricingCardMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $PricingCardMultiProxy minSize(Size? minSize) => this(minSize: minSize); + @override + $PricingCardMultiProxy maxSize(Size? maxSize) => this(maxSize: maxSize); + @override + $PricingCardMultiProxy shadow(BoxShadow? shadow) => this(shadow: shadow); + @override + $PricingCardMultiProxy titleStyle(TextStyle? titleStyle) => + this(titleStyle: titleStyle); + @override + $PricingCardMultiProxy subtitleStyle(TextStyle? subtitleStyle) => + this(subtitleStyle: subtitleStyle); + @override + $PricingCardMultiProxy bodyStyle(TextStyle? bodyStyle) => + this(bodyStyle: bodyStyle); + @override + $PricingCardMultiProxy background(Widget? background) => + this(background: background); + @override + $PricingCardMultiProxy key(Key? key) => this(key: key); + @override + $PricingCardMultiProxy call({ + Axis? axis, + PricingLine? title, + Pricing? pricing, + TextWrapper? description, + List? features, + Widget? cta, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }) => + $PricingCardMultiProxy( + _value.select, + freezed: _value.freezed, + axis: axis ?? _value.axis, + title: title ?? _value.title, + pricing: pricing ?? _value.pricing, + description: description ?? _value.description, + features: features ?? _value.features, + cta: cta ?? _value.cta, + radius: radius ?? _value.radius, + padding: padding ?? _value.padding, + borderColors: borderColors ?? _value.borderColors, + backgroundColors: backgroundColors ?? _value.backgroundColors, + stroke: stroke ?? _value.stroke, + minSize: minSize ?? _value.minSize, + maxSize: maxSize ?? _value.maxSize, + shadow: shadow ?? _value.shadow, + titleStyle: titleStyle ?? _value.titleStyle, + subtitleStyle: subtitleStyle ?? _value.subtitleStyle, + bodyStyle: bodyStyle ?? _value.bodyStyle, + background: background ?? _value.background, + key: key ?? _value.key, + ); +} + +mixin $$PricingCardMultiProxyCWMixin on Component { + $PricingCardComponentCWProxy get copyWith => + $$PricingCardMultiProxyCWProxyImpl(this as $PricingCardMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.interface.g.dart new file mode 100644 index 00000000..f609df48 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/pricing_card_component.interface.g.dart @@ -0,0 +1,120 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pricing_card_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $PricingCardComponentCWProxy { + PricingCardComponent axis(Axis? axis); + PricingCardComponent title(PricingLine? title); + PricingCardComponent pricing(Pricing? pricing); + PricingCardComponent description(TextWrapper? description); + PricingCardComponent features(List? features); + PricingCardComponent cta(Widget? cta); + PricingCardComponent radius(BorderRadiusGeometry? radius); + PricingCardComponent padding(EdgeInsetsGeometry? padding); + PricingCardComponent borderColors(MultiColor? borderColors); + PricingCardComponent backgroundColors(MultiColor? backgroundColors); + PricingCardComponent stroke(double? stroke); + PricingCardComponent minSize(Size? minSize); + PricingCardComponent maxSize(Size? maxSize); + PricingCardComponent shadow(BoxShadow? shadow); + PricingCardComponent titleStyle(TextStyle? titleStyle); + PricingCardComponent subtitleStyle(TextStyle? subtitleStyle); + PricingCardComponent bodyStyle(TextStyle? bodyStyle); + PricingCardComponent background(Widget? background); + PricingCardComponent key(Key? key); + PricingCardComponent call({ + Axis? axis, + PricingLine? title, + Pricing? pricing, + TextWrapper? description, + List? features, + Widget? cta, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $PricingCardMultiProxy extends PricingCardComponent + with $$PricingCardMultiProxyCWMixin { + final bool? freezed; + final PricingCardComponent Function(BuildContext context) select; + $PricingCardMultiProxy( + this.select, { + this.freezed, + super.axis, + super.title, + super.pricing, + super.description, + super.features, + super.cta, + super.radius, + super.padding, + super.borderColors, + super.backgroundColors, + super.stroke, + super.minSize, + super.maxSize, + super.shadow, + super.titleStyle, + super.subtitleStyle, + super.bodyStyle, + super.background, + super.key, + }); + factory $PricingCardMultiProxy.multi( + PricingCardComponent Function(BuildContext context) test, + {bool freezed = true}) => + $PricingCardMultiProxy( + test, + freezed: freezed, + ); + PricingCardComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + axis: axis, + title: title, + pricing: pricing, + description: description, + features: features, + cta: cta, + radius: radius, + padding: padding, + borderColors: borderColors, + backgroundColors: backgroundColors, + stroke: stroke, + minSize: minSize, + maxSize: maxSize, + shadow: shadow, + titleStyle: titleStyle, + subtitleStyle: subtitleStyle, + bodyStyle: bodyStyle, + background: background, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.dart index f52ff648..d4242389 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'quote_card_component.g.dart'; +part 'quote_card_component.interface.g.dart'; +part 'quote_card_component.impl.g.dart'; @ComponentProxyExtension() abstract class QuoteCardComponent extends CardComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.g.dart deleted file mode 100644 index dd9fe607..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.g.dart +++ /dev/null @@ -1,50 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'quote_card_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $QuoteCardComponentCWProxy { - QuoteCardComponent avatar(Widget? avatar); - QuoteCardComponent name(TextWrapper? name); - QuoteCardComponent subtitle(TextWrapper? subtitle); - QuoteCardComponent quote(TextWrapper? quote); - QuoteCardComponent leftQuote(Widget? leftQuote); - QuoteCardComponent rightQuote(Widget? rightQuote); - QuoteCardComponent radius(BorderRadiusGeometry? radius); - QuoteCardComponent padding(EdgeInsetsGeometry? padding); - QuoteCardComponent borderColors(MultiColor? borderColors); - QuoteCardComponent backgroundColors(MultiColor? backgroundColors); - QuoteCardComponent stroke(double? stroke); - QuoteCardComponent minSize(Size? minSize); - QuoteCardComponent maxSize(Size? maxSize); - QuoteCardComponent shadow(BoxShadow? shadow); - QuoteCardComponent titleStyle(TextStyle? titleStyle); - QuoteCardComponent subtitleStyle(TextStyle? subtitleStyle); - QuoteCardComponent bodyStyle(TextStyle? bodyStyle); - QuoteCardComponent background(Widget? background); - QuoteCardComponent key(Key? key); - QuoteCardComponent call({ - Widget? avatar, - TextWrapper? name, - TextWrapper? subtitle, - TextWrapper? quote, - Widget? leftQuote, - Widget? rightQuote, - BorderRadiusGeometry? radius, - EdgeInsetsGeometry? padding, - MultiColor? borderColors, - MultiColor? backgroundColors, - double? stroke, - Size? minSize, - Size? maxSize, - BoxShadow? shadow, - TextStyle? titleStyle, - TextStyle? subtitleStyle, - TextStyle? bodyStyle, - Widget? background, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.impl.g.dart new file mode 100644 index 00000000..4aa0db56 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.impl.g.dart @@ -0,0 +1,111 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'quote_card_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$QuoteCardMultiProxyCWProxyImpl implements $QuoteCardComponentCWProxy { + const $$QuoteCardMultiProxyCWProxyImpl(this._value); + final $QuoteCardMultiProxy _value; + @override + $QuoteCardMultiProxy avatar(Widget? avatar) => this(avatar: avatar); + @override + $QuoteCardMultiProxy name(TextWrapper? name) => this(name: name); + @override + $QuoteCardMultiProxy subtitle(TextWrapper? subtitle) => + this(subtitle: subtitle); + @override + $QuoteCardMultiProxy quote(TextWrapper? quote) => this(quote: quote); + @override + $QuoteCardMultiProxy leftQuote(Widget? leftQuote) => + this(leftQuote: leftQuote); + @override + $QuoteCardMultiProxy rightQuote(Widget? rightQuote) => + this(rightQuote: rightQuote); + @override + $QuoteCardMultiProxy radius(BorderRadiusGeometry? radius) => + this(radius: radius); + @override + $QuoteCardMultiProxy padding(EdgeInsetsGeometry? padding) => + this(padding: padding); + @override + $QuoteCardMultiProxy borderColors(MultiColor? borderColors) => + this(borderColors: borderColors); + @override + $QuoteCardMultiProxy backgroundColors(MultiColor? backgroundColors) => + this(backgroundColors: backgroundColors); + @override + $QuoteCardMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $QuoteCardMultiProxy minSize(Size? minSize) => this(minSize: minSize); + @override + $QuoteCardMultiProxy maxSize(Size? maxSize) => this(maxSize: maxSize); + @override + $QuoteCardMultiProxy shadow(BoxShadow? shadow) => this(shadow: shadow); + @override + $QuoteCardMultiProxy titleStyle(TextStyle? titleStyle) => + this(titleStyle: titleStyle); + @override + $QuoteCardMultiProxy subtitleStyle(TextStyle? subtitleStyle) => + this(subtitleStyle: subtitleStyle); + @override + $QuoteCardMultiProxy bodyStyle(TextStyle? bodyStyle) => + this(bodyStyle: bodyStyle); + @override + $QuoteCardMultiProxy background(Widget? background) => + this(background: background); + @override + $QuoteCardMultiProxy key(Key? key) => this(key: key); + @override + $QuoteCardMultiProxy call({ + Widget? avatar, + TextWrapper? name, + TextWrapper? subtitle, + TextWrapper? quote, + Widget? leftQuote, + Widget? rightQuote, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }) => + $QuoteCardMultiProxy( + _value.select, + freezed: _value.freezed, + avatar: avatar ?? _value.avatar, + name: name ?? _value.name, + subtitle: subtitle ?? _value.subtitle, + quote: quote ?? _value.quote, + leftQuote: leftQuote ?? _value.leftQuote, + rightQuote: rightQuote ?? _value.rightQuote, + radius: radius ?? _value.radius, + padding: padding ?? _value.padding, + borderColors: borderColors ?? _value.borderColors, + backgroundColors: backgroundColors ?? _value.backgroundColors, + stroke: stroke ?? _value.stroke, + minSize: minSize ?? _value.minSize, + maxSize: maxSize ?? _value.maxSize, + shadow: shadow ?? _value.shadow, + titleStyle: titleStyle ?? _value.titleStyle, + subtitleStyle: subtitleStyle ?? _value.subtitleStyle, + bodyStyle: bodyStyle ?? _value.bodyStyle, + background: background ?? _value.background, + key: key ?? _value.key, + ); +} + +mixin $$QuoteCardMultiProxyCWMixin on Component { + $QuoteCardComponentCWProxy get copyWith => + $$QuoteCardMultiProxyCWProxyImpl(this as $QuoteCardMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.interface.g.dart new file mode 100644 index 00000000..90f9fc4e --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/quote_card_component.interface.g.dart @@ -0,0 +1,120 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'quote_card_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $QuoteCardComponentCWProxy { + QuoteCardComponent avatar(Widget? avatar); + QuoteCardComponent name(TextWrapper? name); + QuoteCardComponent subtitle(TextWrapper? subtitle); + QuoteCardComponent quote(TextWrapper? quote); + QuoteCardComponent leftQuote(Widget? leftQuote); + QuoteCardComponent rightQuote(Widget? rightQuote); + QuoteCardComponent radius(BorderRadiusGeometry? radius); + QuoteCardComponent padding(EdgeInsetsGeometry? padding); + QuoteCardComponent borderColors(MultiColor? borderColors); + QuoteCardComponent backgroundColors(MultiColor? backgroundColors); + QuoteCardComponent stroke(double? stroke); + QuoteCardComponent minSize(Size? minSize); + QuoteCardComponent maxSize(Size? maxSize); + QuoteCardComponent shadow(BoxShadow? shadow); + QuoteCardComponent titleStyle(TextStyle? titleStyle); + QuoteCardComponent subtitleStyle(TextStyle? subtitleStyle); + QuoteCardComponent bodyStyle(TextStyle? bodyStyle); + QuoteCardComponent background(Widget? background); + QuoteCardComponent key(Key? key); + QuoteCardComponent call({ + Widget? avatar, + TextWrapper? name, + TextWrapper? subtitle, + TextWrapper? quote, + Widget? leftQuote, + Widget? rightQuote, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $QuoteCardMultiProxy extends QuoteCardComponent + with $$QuoteCardMultiProxyCWMixin { + final bool? freezed; + final QuoteCardComponent Function(BuildContext context) select; + $QuoteCardMultiProxy( + this.select, { + this.freezed, + super.avatar, + super.name, + super.subtitle, + super.quote, + super.leftQuote, + super.rightQuote, + super.radius, + super.padding, + super.borderColors, + super.backgroundColors, + super.stroke, + super.minSize, + super.maxSize, + super.shadow, + super.titleStyle, + super.subtitleStyle, + super.bodyStyle, + super.background, + super.key, + }); + factory $QuoteCardMultiProxy.multi( + QuoteCardComponent Function(BuildContext context) test, + {bool freezed = true}) => + $QuoteCardMultiProxy( + test, + freezed: freezed, + ); + QuoteCardComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + avatar: avatar, + name: name, + subtitle: subtitle, + quote: quote, + leftQuote: leftQuote, + rightQuote: rightQuote, + radius: radius, + padding: padding, + borderColors: borderColors, + backgroundColors: backgroundColors, + stroke: stroke, + minSize: minSize, + maxSize: maxSize, + shadow: shadow, + titleStyle: titleStyle, + subtitleStyle: subtitleStyle, + bodyStyle: bodyStyle, + background: background, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.dart index 69ee4ffa..44154c28 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'skill_card_component.g.dart'; +part 'skill_card_component.interface.g.dart'; +part 'skill_card_component.impl.g.dart'; @ComponentProxyExtension() abstract class SkillCardComponent extends CardComponent diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.impl.g.dart new file mode 100644 index 00000000..f48550da --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.impl.g.dart @@ -0,0 +1,121 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'skill_card_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$SkillCardMultiProxyCWProxyImpl implements $SkillCardComponentCWProxy { + const $$SkillCardMultiProxyCWProxyImpl(this._value); + final $SkillCardMultiProxy _value; + @override + $SkillCardMultiProxy axis(Axis? axis) => this(axis: axis); + @override + $SkillCardMultiProxy icons(List? icons) => this(icons: icons); + @override + $SkillCardMultiProxy title(TextWrapper? title) => this(title: title); + @override + $SkillCardMultiProxy subtitle(TextWrapper? subtitle) => + this(subtitle: subtitle); + @override + $SkillCardMultiProxy description(TextWrapper? description) => + this(description: description); + @override + $SkillCardMultiProxy skills(List? skills) => + this(skills: skills); + @override + $SkillCardMultiProxy bulletColors(MultiColor? bulletColors) => + this(bulletColors: bulletColors); + @override + $SkillCardMultiProxy bulletIcon(Widget? bulletIcon) => + this(bulletIcon: bulletIcon); + @override + $SkillCardMultiProxy radius(BorderRadiusGeometry? radius) => + this(radius: radius); + @override + $SkillCardMultiProxy padding(EdgeInsetsGeometry? padding) => + this(padding: padding); + @override + $SkillCardMultiProxy borderColors(MultiColor? borderColors) => + this(borderColors: borderColors); + @override + $SkillCardMultiProxy backgroundColors(MultiColor? backgroundColors) => + this(backgroundColors: backgroundColors); + @override + $SkillCardMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $SkillCardMultiProxy minSize(Size? minSize) => this(minSize: minSize); + @override + $SkillCardMultiProxy maxSize(Size? maxSize) => this(maxSize: maxSize); + @override + $SkillCardMultiProxy shadow(BoxShadow? shadow) => this(shadow: shadow); + @override + $SkillCardMultiProxy titleStyle(TextStyle? titleStyle) => + this(titleStyle: titleStyle); + @override + $SkillCardMultiProxy subtitleStyle(TextStyle? subtitleStyle) => + this(subtitleStyle: subtitleStyle); + @override + $SkillCardMultiProxy bodyStyle(TextStyle? bodyStyle) => + this(bodyStyle: bodyStyle); + @override + $SkillCardMultiProxy background(Widget? background) => + this(background: background); + @override + $SkillCardMultiProxy key(Key? key) => this(key: key); + @override + $SkillCardMultiProxy call({ + Axis? axis, + List? icons, + TextWrapper? title, + TextWrapper? subtitle, + TextWrapper? description, + List? skills, + MultiColor? bulletColors, + Widget? bulletIcon, + BorderRadiusGeometry? radius, + EdgeInsetsGeometry? padding, + MultiColor? borderColors, + MultiColor? backgroundColors, + double? stroke, + Size? minSize, + Size? maxSize, + BoxShadow? shadow, + TextStyle? titleStyle, + TextStyle? subtitleStyle, + TextStyle? bodyStyle, + Widget? background, + Key? key, + }) => + $SkillCardMultiProxy( + _value.select, + freezed: _value.freezed, + axis: axis ?? _value.axis, + icons: icons ?? _value.icons, + title: title ?? _value.title, + subtitle: subtitle ?? _value.subtitle, + description: description ?? _value.description, + skills: skills ?? _value.skills, + bulletColors: bulletColors ?? _value.bulletColors, + bulletIcon: bulletIcon ?? _value.bulletIcon, + radius: radius ?? _value.radius, + padding: padding ?? _value.padding, + borderColors: borderColors ?? _value.borderColors, + backgroundColors: backgroundColors ?? _value.backgroundColors, + stroke: stroke ?? _value.stroke, + minSize: minSize ?? _value.minSize, + maxSize: maxSize ?? _value.maxSize, + shadow: shadow ?? _value.shadow, + titleStyle: titleStyle ?? _value.titleStyle, + subtitleStyle: subtitleStyle ?? _value.subtitleStyle, + bodyStyle: bodyStyle ?? _value.bodyStyle, + background: background ?? _value.background, + key: key ?? _value.key, + ); +} + +mixin $$SkillCardMultiProxyCWMixin on Component { + $SkillCardComponentCWProxy get copyWith => + $$SkillCardMultiProxyCWProxyImpl(this as $SkillCardMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.interface.g.dart similarity index 50% rename from packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.interface.g.dart index 84b6c417..3c0c96df 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/cards/skill_card_component.interface.g.dart @@ -52,3 +52,77 @@ abstract class $SkillCardComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $SkillCardMultiProxy extends SkillCardComponent + with $$SkillCardMultiProxyCWMixin { + final bool? freezed; + final SkillCardComponent Function(BuildContext context) select; + $SkillCardMultiProxy( + this.select, { + this.freezed, + super.axis, + super.icons, + super.title, + super.subtitle, + super.description, + super.skills, + super.bulletColors, + super.bulletIcon, + super.radius, + super.padding, + super.borderColors, + super.backgroundColors, + super.stroke, + super.minSize, + super.maxSize, + super.shadow, + super.titleStyle, + super.subtitleStyle, + super.bodyStyle, + super.background, + super.key, + }); + factory $SkillCardMultiProxy.multi( + SkillCardComponent Function(BuildContext context) test, + {bool freezed = true}) => + $SkillCardMultiProxy( + test, + freezed: freezed, + ); + SkillCardComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + axis: axis, + icons: icons, + title: title, + subtitle: subtitle, + description: description, + skills: skills, + bulletColors: bulletColors, + bulletIcon: bulletIcon, + radius: radius, + padding: padding, + borderColors: borderColors, + backgroundColors: backgroundColors, + stroke: stroke, + minSize: minSize, + maxSize: maxSize, + shadow: shadow, + titleStyle: titleStyle, + subtitleStyle: subtitleStyle, + bodyStyle: bodyStyle, + background: background, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.dart index fae4f9f4..8768b319 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'error_component.g.dart'; +part 'error_component.interface.g.dart'; +part 'error_component.impl.g.dart'; @ComponentProxyExtension() abstract class ErrorComponent extends Component diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.g.dart deleted file mode 100644 index 843f4ee4..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.g.dart +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'error_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $ErrorComponentCWProxy { - ErrorComponent colors(MultiColor? colors); - ErrorComponent message(TextWrapper? message); - ErrorComponent details(TextWrapper? details); - ErrorComponent themeResolver( - ThemeResolver? themeResolver); - ErrorComponent key(Key? key); - ErrorComponent call({ - MultiColor? colors, - TextWrapper? message, - TextWrapper? details, - ThemeResolver? themeResolver, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.impl.g.dart new file mode 100644 index 00000000..fb9651c3 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.impl.g.dart @@ -0,0 +1,46 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'error_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$ErrorMultiProxyCWProxyImpl implements $ErrorComponentCWProxy { + const $$ErrorMultiProxyCWProxyImpl(this._value); + final $ErrorMultiProxy _value; + @override + $ErrorMultiProxy colors(MultiColor? colors) => this(colors: colors); + @override + $ErrorMultiProxy message(TextWrapper? message) => this(message: message); + @override + $ErrorMultiProxy details(TextWrapper? details) => this(details: details); + @override + $ErrorMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $ErrorMultiProxy key(Key? key) => this(key: key); + @override + $ErrorMultiProxy call({ + MultiColor? colors, + TextWrapper? message, + TextWrapper? details, + ThemeResolver? themeResolver, + Key? key, + }) => + $ErrorMultiProxy( + _value.select, + freezed: _value.freezed, + colors: colors ?? _value.colors, + message: message ?? _value.message, + details: details ?? _value.details, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$ErrorMultiProxyCWMixin on Component { + $ErrorComponentCWProxy get copyWith => + $$ErrorMultiProxyCWProxyImpl(this as $ErrorMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.interface.g.dart new file mode 100644 index 00000000..3cbe1e11 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/error/error_component.interface.g.dart @@ -0,0 +1,64 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'error_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $ErrorComponentCWProxy { + ErrorComponent colors(MultiColor? colors); + ErrorComponent message(TextWrapper? message); + ErrorComponent details(TextWrapper? details); + ErrorComponent themeResolver( + ThemeResolver? themeResolver); + ErrorComponent key(Key? key); + ErrorComponent call({ + MultiColor? colors, + TextWrapper? message, + TextWrapper? details, + ThemeResolver? themeResolver, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $ErrorMultiProxy extends ErrorComponent with $$ErrorMultiProxyCWMixin { + final bool? freezed; + final ErrorComponent Function(BuildContext context) select; + $ErrorMultiProxy( + this.select, { + this.freezed, + super.colors, + super.message, + super.details, + super.themeResolver, + super.key, + }); + factory $ErrorMultiProxy.multi( + ErrorComponent Function(BuildContext context) test, + {bool freezed = true}) => + $ErrorMultiProxy( + test, + freezed: freezed, + ); + ErrorComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + colors: colors, + message: message, + details: details, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.dart index dc7ea461..a3d7aaae 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/material.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'floating_action_button_component.g.dart'; +part 'floating_action_button_component.interface.g.dart'; +part 'floating_action_button_component.impl.g.dart'; @ComponentProxyExtension() abstract class FloatingActionButtonComponent extends Component diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.impl.g.dart new file mode 100644 index 00000000..99754ab1 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.impl.g.dart @@ -0,0 +1,166 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'floating_action_button_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$FloatingActionButtonMultiProxyCWProxyImpl + implements $FloatingActionButtonComponentCWProxy { + const $$FloatingActionButtonMultiProxyCWProxyImpl(this._value); + final $FloatingActionButtonMultiProxy _value; + @override + $FloatingActionButtonMultiProxy child(Widget? child) => this(child: child); + @override + $FloatingActionButtonMultiProxy tooltip(String? tooltip) => + this(tooltip: tooltip); + @override + $FloatingActionButtonMultiProxy foregroundColor(Color? foregroundColor) => + this(foregroundColor: foregroundColor); + @override + $FloatingActionButtonMultiProxy backgroundColor(Color? backgroundColor) => + this(backgroundColor: backgroundColor); + @override + $FloatingActionButtonMultiProxy focusColor(Color? focusColor) => + this(focusColor: focusColor); + @override + $FloatingActionButtonMultiProxy hoverColor(Color? hoverColor) => + this(hoverColor: hoverColor); + @override + $FloatingActionButtonMultiProxy splashColor(Color? splashColor) => + this(splashColor: splashColor); + @override + $FloatingActionButtonMultiProxy heroTag(Object? heroTag) => + this(heroTag: heroTag); + @override + $FloatingActionButtonMultiProxy onPressed(void Function()? onPressed) => + this(onPressed: onPressed); + @override + $FloatingActionButtonMultiProxy mouseCursor(MouseCursor? mouseCursor) => + this(mouseCursor: mouseCursor); + @override + $FloatingActionButtonMultiProxy elevation(double? elevation) => + this(elevation: elevation); + @override + $FloatingActionButtonMultiProxy focusElevation(double? focusElevation) => + this(focusElevation: focusElevation); + @override + $FloatingActionButtonMultiProxy hoverElevation(double? hoverElevation) => + this(hoverElevation: hoverElevation); + @override + $FloatingActionButtonMultiProxy highlightElevation( + double? highlightElevation) => + this(highlightElevation: highlightElevation); + @override + $FloatingActionButtonMultiProxy disabledElevation( + double? disabledElevation) => + this(disabledElevation: disabledElevation); + @override + $FloatingActionButtonMultiProxy mini(bool? mini) => this(mini: mini); + @override + $FloatingActionButtonMultiProxy shape(ShapeBorder? shape) => + this(shape: shape); + @override + $FloatingActionButtonMultiProxy clipBehavior(Clip? clipBehavior) => + this(clipBehavior: clipBehavior); + @override + $FloatingActionButtonMultiProxy isExtended(bool? isExtended) => + this(isExtended: isExtended); + @override + $FloatingActionButtonMultiProxy focusNode(FocusNode? focusNode) => + this(focusNode: focusNode); + @override + $FloatingActionButtonMultiProxy autofocus(bool? autofocus) => + this(autofocus: autofocus); + @override + $FloatingActionButtonMultiProxy materialTapTargetSize( + MaterialTapTargetSize? materialTapTargetSize) => + this(materialTapTargetSize: materialTapTargetSize); + @override + $FloatingActionButtonMultiProxy enableFeedback(bool? enableFeedback) => + this(enableFeedback: enableFeedback); + @override + $FloatingActionButtonMultiProxy extendedIconLabelSpacing( + double? extendedIconLabelSpacing) => + this(extendedIconLabelSpacing: extendedIconLabelSpacing); + @override + $FloatingActionButtonMultiProxy extendedPadding( + EdgeInsetsGeometry? extendedPadding) => + this(extendedPadding: extendedPadding); + @override + $FloatingActionButtonMultiProxy extendedTextStyle( + TextStyle? extendedTextStyle) => + this(extendedTextStyle: extendedTextStyle); + @override + $FloatingActionButtonMultiProxy key(Key? key) => this(key: key); + @override + $FloatingActionButtonMultiProxy call({ + Widget? child, + String? tooltip, + Color? foregroundColor, + Color? backgroundColor, + Color? focusColor, + Color? hoverColor, + Color? splashColor, + Object? heroTag, + void Function()? onPressed, + MouseCursor? mouseCursor, + double? elevation, + double? focusElevation, + double? hoverElevation, + double? highlightElevation, + double? disabledElevation, + bool? mini, + ShapeBorder? shape, + Clip? clipBehavior, + bool? isExtended, + FocusNode? focusNode, + bool? autofocus, + MaterialTapTargetSize? materialTapTargetSize, + bool? enableFeedback, + double? extendedIconLabelSpacing, + EdgeInsetsGeometry? extendedPadding, + TextStyle? extendedTextStyle, + Key? key, + }) => + $FloatingActionButtonMultiProxy( + _value.select, + freezed: _value.freezed, + child: child ?? _value.child, + tooltip: tooltip ?? _value.tooltip, + foregroundColor: foregroundColor ?? _value.foregroundColor, + backgroundColor: backgroundColor ?? _value.backgroundColor, + focusColor: focusColor ?? _value.focusColor, + hoverColor: hoverColor ?? _value.hoverColor, + splashColor: splashColor ?? _value.splashColor, + heroTag: heroTag ?? _value.heroTag, + onPressed: onPressed ?? _value.onPressed, + mouseCursor: mouseCursor ?? _value.mouseCursor, + elevation: elevation ?? _value.elevation, + focusElevation: focusElevation ?? _value.focusElevation, + hoverElevation: hoverElevation ?? _value.hoverElevation, + highlightElevation: highlightElevation ?? _value.highlightElevation, + disabledElevation: disabledElevation ?? _value.disabledElevation, + mini: mini ?? _value.mini, + shape: shape ?? _value.shape, + clipBehavior: clipBehavior ?? _value.clipBehavior, + isExtended: isExtended ?? _value.isExtended, + focusNode: focusNode ?? _value.focusNode, + autofocus: autofocus ?? _value.autofocus, + materialTapTargetSize: + materialTapTargetSize ?? _value.materialTapTargetSize, + enableFeedback: enableFeedback ?? _value.enableFeedback, + extendedIconLabelSpacing: + extendedIconLabelSpacing ?? _value.extendedIconLabelSpacing, + extendedPadding: extendedPadding ?? _value.extendedPadding, + extendedTextStyle: extendedTextStyle ?? _value.extendedTextStyle, + key: key ?? _value.key, + ); +} + +mixin $$FloatingActionButtonMultiProxyCWMixin on Component { + $FloatingActionButtonComponentCWProxy get copyWith => + $$FloatingActionButtonMultiProxyCWProxyImpl( + this as $FloatingActionButtonMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.interface.g.dart similarity index 52% rename from packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.interface.g.dart index 2982049f..7208ac0b 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/floating_buttons/floating_action_button_component.interface.g.dart @@ -67,3 +67,89 @@ abstract class $FloatingActionButtonComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $FloatingActionButtonMultiProxy extends FloatingActionButtonComponent + with $$FloatingActionButtonMultiProxyCWMixin { + final bool? freezed; + final FloatingActionButtonComponent Function(BuildContext context) select; + $FloatingActionButtonMultiProxy( + this.select, { + this.freezed, + super.child, + super.tooltip, + super.foregroundColor, + super.backgroundColor, + super.focusColor, + super.hoverColor, + super.splashColor, + super.heroTag, + super.onPressed, + super.mouseCursor, + super.elevation, + super.focusElevation, + super.hoverElevation, + super.highlightElevation, + super.disabledElevation, + super.mini, + super.shape, + super.clipBehavior, + super.isExtended, + super.focusNode, + super.autofocus, + super.materialTapTargetSize, + super.enableFeedback, + super.extendedIconLabelSpacing, + super.extendedPadding, + super.extendedTextStyle, + super.key, + }); + factory $FloatingActionButtonMultiProxy.multi( + FloatingActionButtonComponent Function(BuildContext context) test, + {bool freezed = true}) => + $FloatingActionButtonMultiProxy( + test, + freezed: freezed, + ); + FloatingActionButtonComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + child: child, + tooltip: tooltip, + foregroundColor: foregroundColor, + backgroundColor: backgroundColor, + focusColor: focusColor, + hoverColor: hoverColor, + splashColor: splashColor, + heroTag: heroTag, + onPressed: onPressed, + mouseCursor: mouseCursor, + elevation: elevation, + focusElevation: focusElevation, + hoverElevation: hoverElevation, + highlightElevation: highlightElevation, + disabledElevation: disabledElevation, + mini: mini, + shape: shape, + clipBehavior: clipBehavior, + isExtended: isExtended, + focusNode: focusNode, + autofocus: autofocus, + materialTapTargetSize: materialTapTargetSize, + enableFeedback: enableFeedback, + extendedIconLabelSpacing: extendedIconLabelSpacing, + extendedPadding: extendedPadding, + extendedTextStyle: extendedTextStyle, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_component.dart index aa39fea9..42d8f149 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_component.dart @@ -27,5 +27,5 @@ abstract class GradientComponent extends Component { const GradientComponent({super.key}); /// Returns colors for the gradient. - MultiColor get gradientColors; + MultiColor? get gradientColors; } diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.dart index 8518b08d..6300cd68 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.dart @@ -18,15 +18,16 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'gradient_icon_component.g.dart'; +part 'gradient_icon_component.interface.g.dart'; +part 'gradient_icon_component.impl.g.dart'; @ComponentProxyExtension() abstract class GradientIconComponent extends Icon with CopyWithMixin<$GradientIconComponentCWProxy> implements GradientComponent { GradientIconComponent({ - required IconData? icon, - required this.gradientColors, + IconData? icon, + this.gradientColors, super.key, super.size, super.fill, @@ -40,7 +41,7 @@ abstract class GradientIconComponent extends Icon }) : super(icon); @override - final MultiColor gradientColors; + final MultiColor? gradientColors; @override ThemeResolver? get themeResolver => null; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.g.dart deleted file mode 100644 index 0cf0f8c4..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.g.dart +++ /dev/null @@ -1,36 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'gradient_icon_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $GradientIconComponentCWProxy { - GradientIconComponent icon(IconData? icon); - GradientIconComponent gradientColors(MultiColor? gradientColors); - GradientIconComponent key(Key? key); - GradientIconComponent size(double? size); - GradientIconComponent fill(double? fill); - GradientIconComponent weight(double? weight); - GradientIconComponent grade(double? grade); - GradientIconComponent opticalSize(double? opticalSize); - GradientIconComponent color(Color? color); - GradientIconComponent shadows(List? shadows); - GradientIconComponent semanticLabel(String? semanticLabel); - GradientIconComponent textDirection(TextDirection? textDirection); - GradientIconComponent call({ - IconData? icon, - MultiColor? gradientColors, - Key? key, - double? size, - double? fill, - double? weight, - double? grade, - double? opticalSize, - Color? color, - List? shadows, - String? semanticLabel, - TextDirection? textDirection, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.impl.g.dart new file mode 100644 index 00000000..97a50fe1 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.impl.g.dart @@ -0,0 +1,78 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'gradient_icon_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$GradientIconMultiProxyCWProxyImpl + implements $GradientIconComponentCWProxy { + const $$GradientIconMultiProxyCWProxyImpl(this._value); + final $GradientIconMultiProxy _value; + @override + $GradientIconMultiProxy icon(IconData? icon) => this(icon: icon); + @override + $GradientIconMultiProxy gradientColors(MultiColor? gradientColors) => + this(gradientColors: gradientColors); + @override + $GradientIconMultiProxy key(Key? key) => this(key: key); + @override + $GradientIconMultiProxy size(double? size) => this(size: size); + @override + $GradientIconMultiProxy fill(double? fill) => this(fill: fill); + @override + $GradientIconMultiProxy weight(double? weight) => this(weight: weight); + @override + $GradientIconMultiProxy grade(double? grade) => this(grade: grade); + @override + $GradientIconMultiProxy opticalSize(double? opticalSize) => + this(opticalSize: opticalSize); + @override + $GradientIconMultiProxy color(Color? color) => this(color: color); + @override + $GradientIconMultiProxy shadows(List? shadows) => + this(shadows: shadows); + @override + $GradientIconMultiProxy semanticLabel(String? semanticLabel) => + this(semanticLabel: semanticLabel); + @override + $GradientIconMultiProxy textDirection(TextDirection? textDirection) => + this(textDirection: textDirection); + @override + $GradientIconMultiProxy call({ + IconData? icon, + MultiColor? gradientColors, + Key? key, + double? size, + double? fill, + double? weight, + double? grade, + double? opticalSize, + Color? color, + List? shadows, + String? semanticLabel, + TextDirection? textDirection, + }) => + $GradientIconMultiProxy( + _value.select, + freezed: _value.freezed, + icon: icon ?? _value.icon, + gradientColors: gradientColors ?? _value.gradientColors, + key: key ?? _value.key, + size: size ?? _value.size, + fill: fill ?? _value.fill, + weight: weight ?? _value.weight, + grade: grade ?? _value.grade, + opticalSize: opticalSize ?? _value.opticalSize, + color: color ?? _value.color, + shadows: shadows ?? _value.shadows, + semanticLabel: semanticLabel ?? _value.semanticLabel, + textDirection: textDirection ?? _value.textDirection, + ); +} + +mixin $$GradientIconMultiProxyCWMixin on Component { + $GradientIconComponentCWProxy get copyWith => + $$GradientIconMultiProxyCWProxyImpl(this as $GradientIconMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.interface.g.dart new file mode 100644 index 00000000..1e84b6b2 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_icon_component.interface.g.dart @@ -0,0 +1,92 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'gradient_icon_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $GradientIconComponentCWProxy { + GradientIconComponent icon(IconData? icon); + GradientIconComponent gradientColors(MultiColor? gradientColors); + GradientIconComponent key(Key? key); + GradientIconComponent size(double? size); + GradientIconComponent fill(double? fill); + GradientIconComponent weight(double? weight); + GradientIconComponent grade(double? grade); + GradientIconComponent opticalSize(double? opticalSize); + GradientIconComponent color(Color? color); + GradientIconComponent shadows(List? shadows); + GradientIconComponent semanticLabel(String? semanticLabel); + GradientIconComponent textDirection(TextDirection? textDirection); + GradientIconComponent call({ + IconData? icon, + MultiColor? gradientColors, + Key? key, + double? size, + double? fill, + double? weight, + double? grade, + double? opticalSize, + Color? color, + List? shadows, + String? semanticLabel, + TextDirection? textDirection, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $GradientIconMultiProxy extends GradientIconComponent + with $$GradientIconMultiProxyCWMixin { + final bool? freezed; + final GradientIconComponent Function(BuildContext context) select; + $GradientIconMultiProxy( + this.select, { + this.freezed, + super.icon, + super.gradientColors, + super.key, + super.size, + super.fill, + super.weight, + super.grade, + super.opticalSize, + super.color, + super.shadows, + super.semanticLabel, + super.textDirection, + }); + factory $GradientIconMultiProxy.multi( + GradientIconComponent Function(BuildContext context) test, + {bool freezed = true}) => + $GradientIconMultiProxy( + test, + freezed: freezed, + ); + GradientIconComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + icon: icon, + gradientColors: gradientColors, + key: key, + size: size, + fill: fill, + weight: weight, + grade: grade, + opticalSize: opticalSize, + color: color, + shadows: shadows, + semanticLabel: semanticLabel, + textDirection: textDirection, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.dart index 20ab0762..aa4f82d0 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.dart @@ -16,20 +16,18 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; -import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart'; -import 'package:wyatt_ui_components/src/core/utils/multi_color.dart'; -import 'package:wyatt_ui_components/src/core/utils/theme_resolver.dart'; -import 'package:wyatt_ui_components/src/domain/entities/gradients/gradients.dart'; +import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'gradient_text_component.g.dart'; +part 'gradient_text_component.interface.g.dart'; +part 'gradient_text_component.impl.g.dart'; @ComponentProxyExtension() abstract class GradientTextComponent extends Text with CopyWithMixin<$GradientTextComponentCWProxy> implements GradientComponent { const GradientTextComponent({ - required String? data, - required this.gradientColors, + String? data, + this.gradientColors, super.style, super.key, super.strutStyle, @@ -47,7 +45,7 @@ abstract class GradientTextComponent extends Text }) : super(data ?? ''); @override - final MultiColor gradientColors; + final MultiColor? gradientColors; @override ThemeResolver? get themeResolver => null; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.g.dart deleted file mode 100644 index df657ea2..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.g.dart +++ /dev/null @@ -1,45 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'gradient_text_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $GradientTextComponentCWProxy { - GradientTextComponent data(String? data); - GradientTextComponent gradientColors(MultiColor? gradientColors); - GradientTextComponent style(TextStyle? style); - GradientTextComponent key(Key? key); - GradientTextComponent strutStyle(StrutStyle? strutStyle); - GradientTextComponent textAlign(TextAlign? textAlign); - GradientTextComponent textDirection(TextDirection? textDirection); - GradientTextComponent locale(Locale? locale); - GradientTextComponent softWrap(bool? softWrap); - GradientTextComponent overflow(TextOverflow? overflow); - GradientTextComponent textScaleFactor(double? textScaleFactor); - GradientTextComponent maxLines(int? maxLines); - GradientTextComponent semanticsLabel(String? semanticsLabel); - GradientTextComponent textWidthBasis(TextWidthBasis? textWidthBasis); - GradientTextComponent textHeightBehavior( - TextHeightBehavior? textHeightBehavior); - GradientTextComponent selectionColor(Color? selectionColor); - GradientTextComponent call({ - String? data, - MultiColor? gradientColors, - TextStyle? style, - Key? key, - StrutStyle? strutStyle, - TextAlign? textAlign, - TextDirection? textDirection, - Locale? locale, - bool? softWrap, - TextOverflow? overflow, - double? textScaleFactor, - int? maxLines, - String? semanticsLabel, - TextWidthBasis? textWidthBasis, - TextHeightBehavior? textHeightBehavior, - Color? selectionColor, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.impl.g.dart new file mode 100644 index 00000000..bfa451ca --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.impl.g.dart @@ -0,0 +1,100 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'gradient_text_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$GradientTextMultiProxyCWProxyImpl + implements $GradientTextComponentCWProxy { + const $$GradientTextMultiProxyCWProxyImpl(this._value); + final $GradientTextMultiProxy _value; + @override + $GradientTextMultiProxy data(String? data) => this(data: data); + @override + $GradientTextMultiProxy gradientColors(MultiColor? gradientColors) => + this(gradientColors: gradientColors); + @override + $GradientTextMultiProxy style(TextStyle? style) => this(style: style); + @override + $GradientTextMultiProxy key(Key? key) => this(key: key); + @override + $GradientTextMultiProxy strutStyle(StrutStyle? strutStyle) => + this(strutStyle: strutStyle); + @override + $GradientTextMultiProxy textAlign(TextAlign? textAlign) => + this(textAlign: textAlign); + @override + $GradientTextMultiProxy textDirection(TextDirection? textDirection) => + this(textDirection: textDirection); + @override + $GradientTextMultiProxy locale(Locale? locale) => this(locale: locale); + @override + $GradientTextMultiProxy softWrap(bool? softWrap) => this(softWrap: softWrap); + @override + $GradientTextMultiProxy overflow(TextOverflow? overflow) => + this(overflow: overflow); + @override + $GradientTextMultiProxy textScaleFactor(double? textScaleFactor) => + this(textScaleFactor: textScaleFactor); + @override + $GradientTextMultiProxy maxLines(int? maxLines) => this(maxLines: maxLines); + @override + $GradientTextMultiProxy semanticsLabel(String? semanticsLabel) => + this(semanticsLabel: semanticsLabel); + @override + $GradientTextMultiProxy textWidthBasis(TextWidthBasis? textWidthBasis) => + this(textWidthBasis: textWidthBasis); + @override + $GradientTextMultiProxy textHeightBehavior( + TextHeightBehavior? textHeightBehavior) => + this(textHeightBehavior: textHeightBehavior); + @override + $GradientTextMultiProxy selectionColor(Color? selectionColor) => + this(selectionColor: selectionColor); + @override + $GradientTextMultiProxy call({ + String? data, + MultiColor? gradientColors, + TextStyle? style, + Key? key, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextDirection? textDirection, + Locale? locale, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + TextHeightBehavior? textHeightBehavior, + Color? selectionColor, + }) => + $GradientTextMultiProxy( + _value.select, + freezed: _value.freezed, + data: data ?? _value.data, + gradientColors: gradientColors ?? _value.gradientColors, + style: style ?? _value.style, + key: key ?? _value.key, + strutStyle: strutStyle ?? _value.strutStyle, + textAlign: textAlign ?? _value.textAlign, + textDirection: textDirection ?? _value.textDirection, + locale: locale ?? _value.locale, + softWrap: softWrap ?? _value.softWrap, + overflow: overflow ?? _value.overflow, + textScaleFactor: textScaleFactor ?? _value.textScaleFactor, + maxLines: maxLines ?? _value.maxLines, + semanticsLabel: semanticsLabel ?? _value.semanticsLabel, + textWidthBasis: textWidthBasis ?? _value.textWidthBasis, + textHeightBehavior: textHeightBehavior ?? _value.textHeightBehavior, + selectionColor: selectionColor ?? _value.selectionColor, + ); +} + +mixin $$GradientTextMultiProxyCWMixin on Component { + $GradientTextComponentCWProxy get copyWith => + $$GradientTextMultiProxyCWProxyImpl(this as $GradientTextMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.interface.g.dart new file mode 100644 index 00000000..015c743b --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/gradients/gradient_text_component.interface.g.dart @@ -0,0 +1,109 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'gradient_text_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $GradientTextComponentCWProxy { + GradientTextComponent data(String? data); + GradientTextComponent gradientColors(MultiColor? gradientColors); + GradientTextComponent style(TextStyle? style); + GradientTextComponent key(Key? key); + GradientTextComponent strutStyle(StrutStyle? strutStyle); + GradientTextComponent textAlign(TextAlign? textAlign); + GradientTextComponent textDirection(TextDirection? textDirection); + GradientTextComponent locale(Locale? locale); + GradientTextComponent softWrap(bool? softWrap); + GradientTextComponent overflow(TextOverflow? overflow); + GradientTextComponent textScaleFactor(double? textScaleFactor); + GradientTextComponent maxLines(int? maxLines); + GradientTextComponent semanticsLabel(String? semanticsLabel); + GradientTextComponent textWidthBasis(TextWidthBasis? textWidthBasis); + GradientTextComponent textHeightBehavior( + TextHeightBehavior? textHeightBehavior); + GradientTextComponent selectionColor(Color? selectionColor); + GradientTextComponent call({ + String? data, + MultiColor? gradientColors, + TextStyle? style, + Key? key, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextDirection? textDirection, + Locale? locale, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + TextHeightBehavior? textHeightBehavior, + Color? selectionColor, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $GradientTextMultiProxy extends GradientTextComponent + with $$GradientTextMultiProxyCWMixin { + final bool? freezed; + final GradientTextComponent Function(BuildContext context) select; + $GradientTextMultiProxy( + this.select, { + this.freezed, + super.data, + super.gradientColors, + super.style, + super.key, + super.strutStyle, + super.textAlign, + super.textDirection, + super.locale, + super.softWrap, + super.overflow, + super.textScaleFactor, + super.maxLines, + super.semanticsLabel, + super.textWidthBasis, + super.textHeightBehavior, + super.selectionColor, + }); + factory $GradientTextMultiProxy.multi( + GradientTextComponent Function(BuildContext context) test, + {bool freezed = true}) => + $GradientTextMultiProxy( + test, + freezed: freezed, + ); + GradientTextComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + data: data, + gradientColors: gradientColors, + style: style, + key: key, + strutStyle: strutStyle, + textAlign: textAlign, + textDirection: textDirection, + locale: locale, + softWrap: softWrap, + overflow: overflow, + textScaleFactor: textScaleFactor, + maxLines: maxLines, + semanticsLabel: semanticsLabel, + textWidthBasis: textWidthBasis, + textHeightBehavior: textHeightBehavior, + selectionColor: selectionColor, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.dart index 65f9da6e..c85cc955 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'loader_component.g.dart'; +part 'loader_component.interface.g.dart'; +part 'loader_component.impl.g.dart'; @ComponentProxyExtension() abstract class LoaderComponent extends Component diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.g.dart deleted file mode 100644 index 61b302b2..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.g.dart +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'loader_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $LoaderComponentCWProxy { - LoaderComponent colors(MultiColor? colors); - LoaderComponent radius(double? radius); - LoaderComponent stroke(double? stroke); - LoaderComponent duration(Duration? duration); - LoaderComponent flip(bool? flip); - LoaderComponent themeResolver( - ThemeResolver? themeResolver); - LoaderComponent key(Key? key); - LoaderComponent call({ - MultiColor? colors, - double? radius, - double? stroke, - Duration? duration, - bool? flip, - ThemeResolver? themeResolver, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.impl.g.dart new file mode 100644 index 00000000..70b888ad --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.impl.g.dart @@ -0,0 +1,54 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'loader_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$LoaderMultiProxyCWProxyImpl implements $LoaderComponentCWProxy { + const $$LoaderMultiProxyCWProxyImpl(this._value); + final $LoaderMultiProxy _value; + @override + $LoaderMultiProxy colors(MultiColor? colors) => this(colors: colors); + @override + $LoaderMultiProxy radius(double? radius) => this(radius: radius); + @override + $LoaderMultiProxy stroke(double? stroke) => this(stroke: stroke); + @override + $LoaderMultiProxy duration(Duration? duration) => this(duration: duration); + @override + $LoaderMultiProxy flip(bool? flip) => this(flip: flip); + @override + $LoaderMultiProxy themeResolver( + ThemeResolver? themeResolver) => + this(themeResolver: themeResolver); + @override + $LoaderMultiProxy key(Key? key) => this(key: key); + @override + $LoaderMultiProxy call({ + MultiColor? colors, + double? radius, + double? stroke, + Duration? duration, + bool? flip, + ThemeResolver? themeResolver, + Key? key, + }) => + $LoaderMultiProxy( + _value.select, + freezed: _value.freezed, + colors: colors ?? _value.colors, + radius: radius ?? _value.radius, + stroke: stroke ?? _value.stroke, + duration: duration ?? _value.duration, + flip: flip ?? _value.flip, + themeResolver: themeResolver ?? _value.themeResolver, + key: key ?? _value.key, + ); +} + +mixin $$LoaderMultiProxyCWMixin on Component { + $LoaderComponentCWProxy get copyWith => + $$LoaderMultiProxyCWProxyImpl(this as $LoaderMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.interface.g.dart new file mode 100644 index 00000000..7e843c3c --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/loader/loader_component.interface.g.dart @@ -0,0 +1,72 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'loader_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $LoaderComponentCWProxy { + LoaderComponent colors(MultiColor? colors); + LoaderComponent radius(double? radius); + LoaderComponent stroke(double? stroke); + LoaderComponent duration(Duration? duration); + LoaderComponent flip(bool? flip); + LoaderComponent themeResolver( + ThemeResolver? themeResolver); + LoaderComponent key(Key? key); + LoaderComponent call({ + MultiColor? colors, + double? radius, + double? stroke, + Duration? duration, + bool? flip, + ThemeResolver? themeResolver, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $LoaderMultiProxy extends LoaderComponent with $$LoaderMultiProxyCWMixin { + final bool? freezed; + final LoaderComponent Function(BuildContext context) select; + $LoaderMultiProxy( + this.select, { + this.freezed, + super.colors, + super.radius, + super.stroke, + super.duration, + super.flip, + super.themeResolver, + super.key, + }); + factory $LoaderMultiProxy.multi( + LoaderComponent Function(BuildContext context) test, + {bool freezed = true}) => + $LoaderMultiProxy( + test, + freezed: freezed, + ); + LoaderComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + colors: colors, + radius: radius, + stroke: stroke, + duration: duration, + flip: flip, + themeResolver: themeResolver, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.dart index 00c57200..cae9da43 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.dart @@ -18,7 +18,8 @@ import 'package:flutter/widgets.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'rich_text_builder_component.g.dart'; +part 'rich_text_builder_component.interface.g.dart'; +part 'rich_text_builder_component.impl.g.dart'; @ComponentProxyExtension() abstract class RichTextBuilderComponent extends Component diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.g.dart deleted file mode 100644 index ad2a85f4..00000000 --- a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.g.dart +++ /dev/null @@ -1,44 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'rich_text_builder_component.dart'; - -// ************************************************************************** -// ComponentProxyGenerator -// ************************************************************************** - -abstract class $RichTextBuilderComponentCWProxy { - RichTextBuilderComponent text(String? text); - RichTextBuilderComponent parser(RichTextParser? parser); - RichTextBuilderComponent defaultStyle(TextStyle? defaultStyle); - RichTextBuilderComponent styles(Map? styles); - RichTextBuilderComponent strutStyle(StrutStyle? strutStyle); - RichTextBuilderComponent textAlign(TextAlign? textAlign); - RichTextBuilderComponent textDirection(TextDirection? textDirection); - RichTextBuilderComponent locale(Locale? locale); - RichTextBuilderComponent softWrap(bool? softWrap); - RichTextBuilderComponent overflow(TextOverflow? overflow); - RichTextBuilderComponent textScaleFactor(double? textScaleFactor); - RichTextBuilderComponent maxLines(int? maxLines); - RichTextBuilderComponent semanticsLabel(String? semanticsLabel); - RichTextBuilderComponent textWidthBasis(TextWidthBasis? textWidthBasis); - RichTextBuilderComponent selectionColor(Color? selectionColor); - RichTextBuilderComponent key(Key? key); - RichTextBuilderComponent call({ - String? text, - RichTextParser? parser, - TextStyle? defaultStyle, - Map? styles, - StrutStyle? strutStyle, - TextAlign? textAlign, - TextDirection? textDirection, - Locale? locale, - bool? softWrap, - TextOverflow? overflow, - double? textScaleFactor, - int? maxLines, - String? semanticsLabel, - TextWidthBasis? textWidthBasis, - Color? selectionColor, - Key? key, - }); -} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.impl.g.dart new file mode 100644 index 00000000..0bd15840 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.impl.g.dart @@ -0,0 +1,103 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'rich_text_builder_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$RichTextBuilderMultiProxyCWProxyImpl + implements $RichTextBuilderComponentCWProxy { + const $$RichTextBuilderMultiProxyCWProxyImpl(this._value); + final $RichTextBuilderMultiProxy _value; + @override + $RichTextBuilderMultiProxy text(String? text) => this(text: text); + @override + $RichTextBuilderMultiProxy parser(RichTextParser? parser) => + this(parser: parser); + @override + $RichTextBuilderMultiProxy defaultStyle(TextStyle? defaultStyle) => + this(defaultStyle: defaultStyle); + @override + $RichTextBuilderMultiProxy styles(Map? styles) => + this(styles: styles); + @override + $RichTextBuilderMultiProxy strutStyle(StrutStyle? strutStyle) => + this(strutStyle: strutStyle); + @override + $RichTextBuilderMultiProxy textAlign(TextAlign? textAlign) => + this(textAlign: textAlign); + @override + $RichTextBuilderMultiProxy textDirection(TextDirection? textDirection) => + this(textDirection: textDirection); + @override + $RichTextBuilderMultiProxy locale(Locale? locale) => this(locale: locale); + @override + $RichTextBuilderMultiProxy softWrap(bool? softWrap) => + this(softWrap: softWrap); + @override + $RichTextBuilderMultiProxy overflow(TextOverflow? overflow) => + this(overflow: overflow); + @override + $RichTextBuilderMultiProxy textScaleFactor(double? textScaleFactor) => + this(textScaleFactor: textScaleFactor); + @override + $RichTextBuilderMultiProxy maxLines(int? maxLines) => + this(maxLines: maxLines); + @override + $RichTextBuilderMultiProxy semanticsLabel(String? semanticsLabel) => + this(semanticsLabel: semanticsLabel); + @override + $RichTextBuilderMultiProxy textWidthBasis(TextWidthBasis? textWidthBasis) => + this(textWidthBasis: textWidthBasis); + @override + $RichTextBuilderMultiProxy selectionColor(Color? selectionColor) => + this(selectionColor: selectionColor); + @override + $RichTextBuilderMultiProxy key(Key? key) => this(key: key); + @override + $RichTextBuilderMultiProxy call({ + String? text, + RichTextParser? parser, + TextStyle? defaultStyle, + Map? styles, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextDirection? textDirection, + Locale? locale, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + Color? selectionColor, + Key? key, + }) => + $RichTextBuilderMultiProxy( + _value.select, + freezed: _value.freezed, + text: text ?? _value.text, + parser: parser ?? _value.parser, + defaultStyle: defaultStyle ?? _value.defaultStyle, + styles: styles ?? _value.styles, + strutStyle: strutStyle ?? _value.strutStyle, + textAlign: textAlign ?? _value.textAlign, + textDirection: textDirection ?? _value.textDirection, + locale: locale ?? _value.locale, + softWrap: softWrap ?? _value.softWrap, + overflow: overflow ?? _value.overflow, + textScaleFactor: textScaleFactor ?? _value.textScaleFactor, + maxLines: maxLines ?? _value.maxLines, + semanticsLabel: semanticsLabel ?? _value.semanticsLabel, + textWidthBasis: textWidthBasis ?? _value.textWidthBasis, + selectionColor: selectionColor ?? _value.selectionColor, + key: key ?? _value.key, + ); +} + +mixin $$RichTextBuilderMultiProxyCWMixin on Component { + $RichTextBuilderComponentCWProxy get copyWith => + $$RichTextBuilderMultiProxyCWProxyImpl( + this as $RichTextBuilderMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.interface.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.interface.g.dart new file mode 100644 index 00000000..f4756028 --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/rich_text_builder/rich_text_builder_component.interface.g.dart @@ -0,0 +1,108 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'rich_text_builder_component.dart'; + +// ************************************************************************** +// ComponentProxyGenerator +// ************************************************************************** + +abstract class $RichTextBuilderComponentCWProxy { + RichTextBuilderComponent text(String? text); + RichTextBuilderComponent parser(RichTextParser? parser); + RichTextBuilderComponent defaultStyle(TextStyle? defaultStyle); + RichTextBuilderComponent styles(Map? styles); + RichTextBuilderComponent strutStyle(StrutStyle? strutStyle); + RichTextBuilderComponent textAlign(TextAlign? textAlign); + RichTextBuilderComponent textDirection(TextDirection? textDirection); + RichTextBuilderComponent locale(Locale? locale); + RichTextBuilderComponent softWrap(bool? softWrap); + RichTextBuilderComponent overflow(TextOverflow? overflow); + RichTextBuilderComponent textScaleFactor(double? textScaleFactor); + RichTextBuilderComponent maxLines(int? maxLines); + RichTextBuilderComponent semanticsLabel(String? semanticsLabel); + RichTextBuilderComponent textWidthBasis(TextWidthBasis? textWidthBasis); + RichTextBuilderComponent selectionColor(Color? selectionColor); + RichTextBuilderComponent key(Key? key); + RichTextBuilderComponent call({ + String? text, + RichTextParser? parser, + TextStyle? defaultStyle, + Map? styles, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextDirection? textDirection, + Locale? locale, + bool? softWrap, + TextOverflow? overflow, + double? textScaleFactor, + int? maxLines, + String? semanticsLabel, + TextWidthBasis? textWidthBasis, + Color? selectionColor, + Key? key, + }); +} + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $RichTextBuilderMultiProxy extends RichTextBuilderComponent + with $$RichTextBuilderMultiProxyCWMixin { + final bool? freezed; + final RichTextBuilderComponent Function(BuildContext context) select; + $RichTextBuilderMultiProxy( + this.select, { + this.freezed, + super.text, + super.parser, + super.defaultStyle, + super.styles, + super.strutStyle, + super.textAlign, + super.textDirection, + super.locale, + super.softWrap, + super.overflow, + super.textScaleFactor, + super.maxLines, + super.semanticsLabel, + super.textWidthBasis, + super.selectionColor, + super.key, + }); + factory $RichTextBuilderMultiProxy.multi( + RichTextBuilderComponent Function(BuildContext context) test, + {bool freezed = true}) => + $RichTextBuilderMultiProxy( + test, + freezed: freezed, + ); + RichTextBuilderComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + text: text, + parser: parser, + defaultStyle: defaultStyle, + styles: styles, + strutStyle: strutStyle, + textAlign: textAlign, + textDirection: textDirection, + locale: locale, + softWrap: softWrap, + overflow: overflow, + textScaleFactor: textScaleFactor, + maxLines: maxLines, + semanticsLabel: semanticsLabel, + textWidthBasis: textWidthBasis, + selectionColor: selectionColor, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.dart b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.dart index 607bb5e1..8409b7a3 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.dart @@ -22,7 +22,8 @@ import 'package:flutter/services.dart'; import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart'; import 'package:wyatt_ui_components/wyatt_ui_components.dart'; -part 'text_input_component.g.dart'; +part 'text_input_component.interface.g.dart'; +part 'text_input_component.impl.g.dart'; @ComponentProxyExtension() abstract class TextInputComponent extends Component @@ -154,7 +155,7 @@ abstract class TextInputComponent extends Component final SpellCheckConfiguration? spellCheckConfiguration; final bool Function(String)? validator; - final String? Function(String)? onError; + final String Function(String)? onError; // Styles final TextInputStyle? normalStyle; diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.impl.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.impl.g.dart new file mode 100644 index 00000000..398f7dbb --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.impl.g.dart @@ -0,0 +1,374 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'text_input_component.dart'; + +// ************************************************************************** +// ComponentCopyWithGenerator +// ************************************************************************** + +class $$TextInputMultiProxyCWProxyImpl implements $TextInputComponentCWProxy { + const $$TextInputMultiProxyCWProxyImpl(this._value); + final $TextInputMultiProxy _value; + @override + $TextInputMultiProxy expand(bool? expand) => this(expand: expand); + @override + $TextInputMultiProxy onError(String Function(String)? onError) => + this(onError: onError); + @override + $TextInputMultiProxy validator(bool Function(String)? validator) => + this(validator: validator); + @override + $TextInputMultiProxy suffixText(TextWrapper? suffixText) => + this(suffixText: suffixText); + @override + $TextInputMultiProxy prefixText(TextWrapper? prefixText) => + this(prefixText: prefixText); + @override + $TextInputMultiProxy prefixIcon(Icon? prefixIcon) => + this(prefixIcon: prefixIcon); + @override + $TextInputMultiProxy suffixIcon(Icon? suffixIcon) => + this(suffixIcon: suffixIcon); + @override + $TextInputMultiProxy label(TextWrapper? label) => this(label: label); + @override + $TextInputMultiProxy hint(TextWrapper? hint) => this(hint: hint); + @override + $TextInputMultiProxy normalStyle(TextInputStyle? normalStyle) => + this(normalStyle: normalStyle); + @override + $TextInputMultiProxy focusedStyle(TextInputStyle? focusedStyle) => + this(focusedStyle: focusedStyle); + @override + $TextInputMultiProxy invalidStyle(TextInputStyle? invalidStyle) => + this(invalidStyle: invalidStyle); + @override + $TextInputMultiProxy disabledStyle(TextInputStyle? disabledStyle) => + this(disabledStyle: disabledStyle); + @override + $TextInputMultiProxy controller(TextEditingController? controller) => + this(controller: controller); + @override + $TextInputMultiProxy focusNode(FocusNode? focusNode) => + this(focusNode: focusNode); + @override + $TextInputMultiProxy keyboardType(TextInputType? keyboardType) => + this(keyboardType: keyboardType); + @override + $TextInputMultiProxy smartDashesType(SmartDashesType? smartDashesType) => + this(smartDashesType: smartDashesType); + @override + $TextInputMultiProxy smartQuotesType(SmartQuotesType? smartQuotesType) => + this(smartQuotesType: smartQuotesType); + @override + $TextInputMultiProxy enableInteractiveSelection( + bool? enableInteractiveSelection) => + this(enableInteractiveSelection: enableInteractiveSelection); + @override + $TextInputMultiProxy textInputAction(TextInputAction? textInputAction) => + this(textInputAction: textInputAction); + @override + $TextInputMultiProxy textCapitalization( + TextCapitalization? textCapitalization) => + this(textCapitalization: textCapitalization); + @override + $TextInputMultiProxy style(TextStyle? style) => this(style: style); + @override + $TextInputMultiProxy strutStyle(StrutStyle? strutStyle) => + this(strutStyle: strutStyle); + @override + $TextInputMultiProxy textAlign(TextAlign? textAlign) => + this(textAlign: textAlign); + @override + $TextInputMultiProxy textAlignVertical( + TextAlignVertical? textAlignVertical) => + this(textAlignVertical: textAlignVertical); + @override + $TextInputMultiProxy textDirection(TextDirection? textDirection) => + this(textDirection: textDirection); + @override + $TextInputMultiProxy readOnly(bool? readOnly) => this(readOnly: readOnly); + @override + $TextInputMultiProxy showCursor(bool? showCursor) => + this(showCursor: showCursor); + @override + $TextInputMultiProxy autofocus(bool? autofocus) => this(autofocus: autofocus); + @override + $TextInputMultiProxy obscuringCharacter(String? obscuringCharacter) => + this(obscuringCharacter: obscuringCharacter); + @override + $TextInputMultiProxy obscureText(bool? obscureText) => + this(obscureText: obscureText); + @override + $TextInputMultiProxy autocorrect(bool? autocorrect) => + this(autocorrect: autocorrect); + @override + $TextInputMultiProxy enableSuggestions(bool? enableSuggestions) => + this(enableSuggestions: enableSuggestions); + @override + $TextInputMultiProxy maxLines(int? maxLines) => this(maxLines: maxLines); + @override + $TextInputMultiProxy minLines(int? minLines) => this(minLines: minLines); + @override + $TextInputMultiProxy expands(bool? expands) => this(expands: expands); + @override + $TextInputMultiProxy maxLength(int? maxLength) => this(maxLength: maxLength); + @override + $TextInputMultiProxy maxLengthEnforcement( + MaxLengthEnforcement? maxLengthEnforcement) => + this(maxLengthEnforcement: maxLengthEnforcement); + @override + $TextInputMultiProxy onChanged(void Function(String)? onChanged) => + this(onChanged: onChanged); + @override + $TextInputMultiProxy onEditingComplete(void Function()? onEditingComplete) => + this(onEditingComplete: onEditingComplete); + @override + $TextInputMultiProxy onSubmitted(void Function(String)? onSubmitted) => + this(onSubmitted: onSubmitted); + @override + $TextInputMultiProxy onAppPrivateCommand( + void Function(String, Map)? onAppPrivateCommand) => + this(onAppPrivateCommand: onAppPrivateCommand); + @override + $TextInputMultiProxy inputFormatters( + List? inputFormatters) => + this(inputFormatters: inputFormatters); + @override + $TextInputMultiProxy enabled(ValueNotifier? enabled) => + this(enabled: enabled); + @override + $TextInputMultiProxy cursorWidth(double? cursorWidth) => + this(cursorWidth: cursorWidth); + @override + $TextInputMultiProxy cursorHeight(double? cursorHeight) => + this(cursorHeight: cursorHeight); + @override + $TextInputMultiProxy cursorRadius(Radius? cursorRadius) => + this(cursorRadius: cursorRadius); + @override + $TextInputMultiProxy cursorColor(Color? cursorColor) => + this(cursorColor: cursorColor); + @override + $TextInputMultiProxy selectionHeightStyle( + BoxHeightStyle? selectionHeightStyle) => + this(selectionHeightStyle: selectionHeightStyle); + @override + $TextInputMultiProxy selectionWidthStyle( + BoxWidthStyle? selectionWidthStyle) => + this(selectionWidthStyle: selectionWidthStyle); + @override + $TextInputMultiProxy keyboardAppearance(Brightness? keyboardAppearance) => + this(keyboardAppearance: keyboardAppearance); + @override + $TextInputMultiProxy scrollPadding(EdgeInsets? scrollPadding) => + this(scrollPadding: scrollPadding); + @override + $TextInputMultiProxy dragStartBehavior( + DragStartBehavior? dragStartBehavior) => + this(dragStartBehavior: dragStartBehavior); + @override + $TextInputMultiProxy selectionControls( + TextSelectionControls? selectionControls) => + this(selectionControls: selectionControls); + @override + $TextInputMultiProxy onTap(void Function()? onTap) => this(onTap: onTap); + @override + $TextInputMultiProxy onTapOutside( + void Function(PointerDownEvent)? onTapOutside) => + this(onTapOutside: onTapOutside); + @override + $TextInputMultiProxy mouseCursor(MouseCursor? mouseCursor) => + this(mouseCursor: mouseCursor); + @override + $TextInputMultiProxy scrollController(ScrollController? scrollController) => + this(scrollController: scrollController); + @override + $TextInputMultiProxy scrollPhysics(ScrollPhysics? scrollPhysics) => + this(scrollPhysics: scrollPhysics); + @override + $TextInputMultiProxy autofillHints(Iterable? autofillHints) => + this(autofillHints: autofillHints); + @override + $TextInputMultiProxy clipBehavior(Clip? clipBehavior) => + this(clipBehavior: clipBehavior); + @override + $TextInputMultiProxy restorationId(String? restorationId) => + this(restorationId: restorationId); + @override + $TextInputMultiProxy scribbleEnabled(bool? scribbleEnabled) => + this(scribbleEnabled: scribbleEnabled); + @override + $TextInputMultiProxy enableIMEPersonalizedLearning( + bool? enableIMEPersonalizedLearning) => + this(enableIMEPersonalizedLearning: enableIMEPersonalizedLearning); + @override + $TextInputMultiProxy contextMenuBuilder( + Widget Function(BuildContext, EditableTextState)? + contextMenuBuilder) => + this(contextMenuBuilder: contextMenuBuilder); + @override + $TextInputMultiProxy spellCheckConfiguration( + SpellCheckConfiguration? spellCheckConfiguration) => + this(spellCheckConfiguration: spellCheckConfiguration); + @override + $TextInputMultiProxy magnifierConfiguration( + TextMagnifierConfiguration? magnifierConfiguration) => + this(magnifierConfiguration: magnifierConfiguration); + @override + $TextInputMultiProxy key(Key? key) => this(key: key); + @override + $TextInputMultiProxy call({ + bool? expand, + String Function(String)? onError, + bool Function(String)? validator, + TextWrapper? suffixText, + TextWrapper? prefixText, + Icon? prefixIcon, + Icon? suffixIcon, + TextWrapper? label, + TextWrapper? hint, + TextInputStyle? normalStyle, + TextInputStyle? focusedStyle, + TextInputStyle? invalidStyle, + TextInputStyle? disabledStyle, + TextEditingController? controller, + FocusNode? focusNode, + TextInputType? keyboardType, + SmartDashesType? smartDashesType, + SmartQuotesType? smartQuotesType, + bool? enableInteractiveSelection, + TextInputAction? textInputAction, + TextCapitalization? textCapitalization, + TextStyle? style, + StrutStyle? strutStyle, + TextAlign? textAlign, + TextAlignVertical? textAlignVertical, + TextDirection? textDirection, + bool? readOnly, + bool? showCursor, + bool? autofocus, + String? obscuringCharacter, + bool? obscureText, + bool? autocorrect, + bool? enableSuggestions, + int? maxLines, + int? minLines, + bool? expands, + int? maxLength, + MaxLengthEnforcement? maxLengthEnforcement, + void Function(String)? onChanged, + void Function()? onEditingComplete, + void Function(String)? onSubmitted, + void Function(String, Map)? onAppPrivateCommand, + List? inputFormatters, + ValueNotifier? enabled, + double? cursorWidth, + double? cursorHeight, + Radius? cursorRadius, + Color? cursorColor, + BoxHeightStyle? selectionHeightStyle, + BoxWidthStyle? selectionWidthStyle, + Brightness? keyboardAppearance, + EdgeInsets? scrollPadding, + DragStartBehavior? dragStartBehavior, + TextSelectionControls? selectionControls, + void Function()? onTap, + void Function(PointerDownEvent)? onTapOutside, + MouseCursor? mouseCursor, + ScrollController? scrollController, + ScrollPhysics? scrollPhysics, + Iterable? autofillHints, + Clip? clipBehavior, + String? restorationId, + bool? scribbleEnabled, + bool? enableIMEPersonalizedLearning, + Widget Function(BuildContext, EditableTextState)? contextMenuBuilder, + SpellCheckConfiguration? spellCheckConfiguration, + TextMagnifierConfiguration? magnifierConfiguration, + Key? key, + }) => + $TextInputMultiProxy( + _value.select, + freezed: _value.freezed, + expand: expand ?? _value.expand, + onError: onError ?? _value.onError, + validator: validator ?? _value.validator, + suffixText: suffixText ?? _value.suffixText, + prefixText: prefixText ?? _value.prefixText, + prefixIcon: prefixIcon ?? _value.prefixIcon, + suffixIcon: suffixIcon ?? _value.suffixIcon, + label: label ?? _value.label, + hint: hint ?? _value.hint, + normalStyle: normalStyle ?? _value.normalStyle, + focusedStyle: focusedStyle ?? _value.focusedStyle, + invalidStyle: invalidStyle ?? _value.invalidStyle, + disabledStyle: disabledStyle ?? _value.disabledStyle, + controller: controller ?? _value.controller, + focusNode: focusNode ?? _value.focusNode, + keyboardType: keyboardType ?? _value.keyboardType, + smartDashesType: smartDashesType ?? _value.smartDashesType, + smartQuotesType: smartQuotesType ?? _value.smartQuotesType, + enableInteractiveSelection: + enableInteractiveSelection ?? _value.enableInteractiveSelection, + textInputAction: textInputAction ?? _value.textInputAction, + textCapitalization: textCapitalization ?? _value.textCapitalization, + style: style ?? _value.style, + strutStyle: strutStyle ?? _value.strutStyle, + textAlign: textAlign ?? _value.textAlign, + textAlignVertical: textAlignVertical ?? _value.textAlignVertical, + textDirection: textDirection ?? _value.textDirection, + readOnly: readOnly ?? _value.readOnly, + showCursor: showCursor ?? _value.showCursor, + autofocus: autofocus ?? _value.autofocus, + obscuringCharacter: obscuringCharacter ?? _value.obscuringCharacter, + obscureText: obscureText ?? _value.obscureText, + autocorrect: autocorrect ?? _value.autocorrect, + enableSuggestions: enableSuggestions ?? _value.enableSuggestions, + maxLines: maxLines ?? _value.maxLines, + minLines: minLines ?? _value.minLines, + expands: expands ?? _value.expands, + maxLength: maxLength ?? _value.maxLength, + maxLengthEnforcement: + maxLengthEnforcement ?? _value.maxLengthEnforcement, + onChanged: onChanged ?? _value.onChanged, + onEditingComplete: onEditingComplete ?? _value.onEditingComplete, + onSubmitted: onSubmitted ?? _value.onSubmitted, + onAppPrivateCommand: onAppPrivateCommand ?? _value.onAppPrivateCommand, + inputFormatters: inputFormatters ?? _value.inputFormatters, + enabled: enabled ?? _value.enabled, + cursorWidth: cursorWidth ?? _value.cursorWidth, + cursorHeight: cursorHeight ?? _value.cursorHeight, + cursorRadius: cursorRadius ?? _value.cursorRadius, + cursorColor: cursorColor ?? _value.cursorColor, + selectionHeightStyle: + selectionHeightStyle ?? _value.selectionHeightStyle, + selectionWidthStyle: selectionWidthStyle ?? _value.selectionWidthStyle, + keyboardAppearance: keyboardAppearance ?? _value.keyboardAppearance, + scrollPadding: scrollPadding ?? _value.scrollPadding, + dragStartBehavior: dragStartBehavior ?? _value.dragStartBehavior, + selectionControls: selectionControls ?? _value.selectionControls, + onTap: onTap ?? _value.onTap, + onTapOutside: onTapOutside ?? _value.onTapOutside, + mouseCursor: mouseCursor ?? _value.mouseCursor, + scrollController: scrollController ?? _value.scrollController, + scrollPhysics: scrollPhysics ?? _value.scrollPhysics, + autofillHints: autofillHints ?? _value.autofillHints, + clipBehavior: clipBehavior ?? _value.clipBehavior, + restorationId: restorationId ?? _value.restorationId, + scribbleEnabled: scribbleEnabled ?? _value.scribbleEnabled, + enableIMEPersonalizedLearning: enableIMEPersonalizedLearning ?? + _value.enableIMEPersonalizedLearning, + contextMenuBuilder: contextMenuBuilder ?? _value.contextMenuBuilder, + spellCheckConfiguration: + spellCheckConfiguration ?? _value.spellCheckConfiguration, + magnifierConfiguration: + magnifierConfiguration ?? _value.magnifierConfiguration, + key: key ?? _value.key, + ); +} + +mixin $$TextInputMultiProxyCWMixin on Component { + $TextInputComponentCWProxy get copyWith => + $$TextInputMultiProxyCWProxyImpl(this as $TextInputMultiProxy); +} diff --git a/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.g.dart b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.interface.g.dart similarity index 57% rename from packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.g.dart rename to packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.interface.g.dart index 80213015..bfa9dbc1 100644 --- a/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.g.dart +++ b/packages/wyatt_ui_components/lib/src/domain/entities/text_inputs/text_input_component.interface.g.dart @@ -155,3 +155,171 @@ abstract class $TextInputComponentCWProxy { Key? key, }); } + +// ************************************************************************** +// ComponentMultiProxyGenerator +// ************************************************************************** + +@ComponentCopyWithExtension() +class $TextInputMultiProxy extends TextInputComponent + with $$TextInputMultiProxyCWMixin { + final bool? freezed; + final TextInputComponent Function(BuildContext context) select; + $TextInputMultiProxy( + this.select, { + this.freezed, + super.expand, + super.onError, + super.validator, + super.suffixText, + super.prefixText, + super.prefixIcon, + super.suffixIcon, + super.label, + super.hint, + super.normalStyle, + super.focusedStyle, + super.invalidStyle, + super.disabledStyle, + super.controller, + super.focusNode, + super.keyboardType, + super.smartDashesType, + super.smartQuotesType, + super.enableInteractiveSelection, + super.textInputAction, + super.textCapitalization, + super.style, + super.strutStyle, + super.textAlign, + super.textAlignVertical, + super.textDirection, + super.readOnly, + super.showCursor, + super.autofocus, + super.obscuringCharacter, + super.obscureText, + super.autocorrect, + super.enableSuggestions, + super.maxLines, + super.minLines, + super.expands, + super.maxLength, + super.maxLengthEnforcement, + super.onChanged, + super.onEditingComplete, + super.onSubmitted, + super.onAppPrivateCommand, + super.inputFormatters, + super.enabled, + super.cursorWidth, + super.cursorHeight, + super.cursorRadius, + super.cursorColor, + super.selectionHeightStyle, + super.selectionWidthStyle, + super.keyboardAppearance, + super.scrollPadding, + super.dragStartBehavior, + super.selectionControls, + super.onTap, + super.onTapOutside, + super.mouseCursor, + super.scrollController, + super.scrollPhysics, + super.autofillHints, + super.clipBehavior, + super.restorationId, + super.scribbleEnabled, + super.enableIMEPersonalizedLearning, + super.contextMenuBuilder, + super.spellCheckConfiguration, + super.magnifierConfiguration, + super.key, + }); + factory $TextInputMultiProxy.multi( + TextInputComponent Function(BuildContext context) test, + {bool freezed = true}) => + $TextInputMultiProxy( + test, + freezed: freezed, + ); + TextInputComponent? compo; + @override + Widget build(BuildContext context) { + final component = (compo ??= select(context)).copyWith.call( + expand: expand, + onError: onError, + validator: validator, + suffixText: suffixText, + prefixText: prefixText, + prefixIcon: prefixIcon, + suffixIcon: suffixIcon, + label: label, + hint: hint, + normalStyle: normalStyle, + focusedStyle: focusedStyle, + invalidStyle: invalidStyle, + disabledStyle: disabledStyle, + controller: controller, + focusNode: focusNode, + keyboardType: keyboardType, + smartDashesType: smartDashesType, + smartQuotesType: smartQuotesType, + enableInteractiveSelection: enableInteractiveSelection, + textInputAction: textInputAction, + textCapitalization: textCapitalization, + style: style, + strutStyle: strutStyle, + textAlign: textAlign, + textAlignVertical: textAlignVertical, + textDirection: textDirection, + readOnly: readOnly, + showCursor: showCursor, + autofocus: autofocus, + obscuringCharacter: obscuringCharacter, + obscureText: obscureText, + autocorrect: autocorrect, + enableSuggestions: enableSuggestions, + maxLines: maxLines, + minLines: minLines, + expands: expands, + maxLength: maxLength, + maxLengthEnforcement: maxLengthEnforcement, + onChanged: onChanged, + onEditingComplete: onEditingComplete, + onSubmitted: onSubmitted, + onAppPrivateCommand: onAppPrivateCommand, + inputFormatters: inputFormatters, + enabled: enabled, + cursorWidth: cursorWidth, + cursorHeight: cursorHeight, + cursorRadius: cursorRadius, + cursorColor: cursorColor, + selectionHeightStyle: selectionHeightStyle, + selectionWidthStyle: selectionWidthStyle, + keyboardAppearance: keyboardAppearance, + scrollPadding: scrollPadding, + dragStartBehavior: dragStartBehavior, + selectionControls: selectionControls, + onTap: onTap, + onTapOutside: onTapOutside, + mouseCursor: mouseCursor, + scrollController: scrollController, + scrollPhysics: scrollPhysics, + autofillHints: autofillHints, + clipBehavior: clipBehavior, + restorationId: restorationId, + scribbleEnabled: scribbleEnabled, + enableIMEPersonalizedLearning: enableIMEPersonalizedLearning, + contextMenuBuilder: contextMenuBuilder, + spellCheckConfiguration: spellCheckConfiguration, + magnifierConfiguration: magnifierConfiguration, + key: key, + ); + if (!(freezed ?? true)) { + compo = null; + } + return component; + } +} diff --git a/packages/wyatt_ui_components/pubspec.yaml b/packages/wyatt_ui_components/pubspec.yaml index 064fb384..65a59451 100644 --- a/packages/wyatt_ui_components/pubspec.yaml +++ b/packages/wyatt_ui_components/pubspec.yaml @@ -6,7 +6,7 @@ version: 0.2.1 publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub environment: - sdk: ">=2.19.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: { sdk: flutter } -- 2.47.2