Compare commits
	
		
			No commits in common. "2692c607432076eb32f3da034d8d69795c57138e" and "0ca4c41a27443f776d3c115c344f3b9a5ff94ab1" have entirely different histories.
		
	
	
		
			2692c60743
			...
			0ca4c41a27
		
	
		
@ -1 +1 @@
 | 
				
			|||||||
2.4.3
 | 
					2.4.1
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This package provides lint rules for Dart and Flutter which are used at  [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.4.3.yaml**.
 | 
					This package provides lint rules for Dart and Flutter which are used at  [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.4.1.yaml**.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints).
 | 
					**Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -29,7 +29,7 @@ This package provides lint rules for Dart and Flutter which are used at  [Wyatt
 | 
				
			|||||||
Using CLI:
 | 
					Using CLI:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
dart pub add wyatt_analysis:2.4.3 --dev --hosted-url=https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
 | 
					dart pub add wyatt_analysis:2.4.1 --dev --hosted-url=https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Usage
 | 
					## Usage
 | 
				
			||||||
@ -39,7 +39,7 @@ To use the lints, add a dependency in your `pubspec.yaml` :
 | 
				
			|||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
wyatt_analysis:
 | 
					wyatt_analysis:
 | 
				
			||||||
    hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
 | 
					    hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
 | 
				
			||||||
    version: 2.4.3
 | 
					    version: 2.4.1
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Then, add an include in `analysis_options.yaml` :
 | 
					Then, add an include in `analysis_options.yaml` :
 | 
				
			||||||
@ -57,13 +57,13 @@ include: package:wyatt_analysis/analysis_options.flutter.yaml
 | 
				
			|||||||
If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead:
 | 
					If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.flutter.2.4.3.yaml
 | 
					include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If you just want **Dart** version:
 | 
					If you just want **Dart** version:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.2.4.3.yaml
 | 
					include: package:wyatt_analysis/analysis_options.2.4.1.yaml
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Suppressing Lints
 | 
					## Suppressing Lints
 | 
				
			||||||
 | 
				
			|||||||
@ -1,217 +0,0 @@
 | 
				
			|||||||
# 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
analyzer:
 | 
					 | 
				
			||||||
  language:
 | 
					 | 
				
			||||||
    strict-casts: true
 | 
					 | 
				
			||||||
    strict-inference: true
 | 
					 | 
				
			||||||
    strict-raw-types: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  errors:
 | 
					 | 
				
			||||||
    todo: ignore
 | 
					 | 
				
			||||||
    close_sinks: ignore
 | 
					 | 
				
			||||||
    missing_required_param: error
 | 
					 | 
				
			||||||
    missing_return: error
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  exclude:
 | 
					 | 
				
			||||||
    - lib/l10n/**
 | 
					 | 
				
			||||||
    - lib/generated/**
 | 
					 | 
				
			||||||
    - lib/gen/**
 | 
					 | 
				
			||||||
    - lib/generated_plugin_registrant.dart
 | 
					 | 
				
			||||||
    - test/.test_coverage.dart
 | 
					 | 
				
			||||||
    - "**/*.g.dart"
 | 
					 | 
				
			||||||
    - "**/*.freezed.dart"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
linter:
 | 
					 | 
				
			||||||
  rules:
 | 
					 | 
				
			||||||
    - always_declare_return_types
 | 
					 | 
				
			||||||
    - always_put_control_body_on_new_line
 | 
					 | 
				
			||||||
    - always_put_required_named_parameters_first
 | 
					 | 
				
			||||||
    - always_require_non_null_named_parameters
 | 
					 | 
				
			||||||
    - always_use_package_imports
 | 
					 | 
				
			||||||
    - annotate_overrides
 | 
					 | 
				
			||||||
    - avoid_bool_literals_in_conditional_expressions
 | 
					 | 
				
			||||||
    - avoid_catching_errors
 | 
					 | 
				
			||||||
    - avoid_double_and_int_checks
 | 
					 | 
				
			||||||
    - avoid_dynamic_calls
 | 
					 | 
				
			||||||
    - avoid_empty_else
 | 
					 | 
				
			||||||
    - avoid_equals_and_hash_code_on_mutable_classes
 | 
					 | 
				
			||||||
    - avoid_escaping_inner_quotes
 | 
					 | 
				
			||||||
    - avoid_field_initializers_in_const_classes
 | 
					 | 
				
			||||||
    - avoid_final_parameters
 | 
					 | 
				
			||||||
    - avoid_function_literals_in_foreach_calls
 | 
					 | 
				
			||||||
    - avoid_init_to_null
 | 
					 | 
				
			||||||
    - avoid_js_rounded_ints
 | 
					 | 
				
			||||||
    - avoid_multiple_declarations_per_line
 | 
					 | 
				
			||||||
    - avoid_null_checks_in_equality_operators
 | 
					 | 
				
			||||||
    - avoid_positional_boolean_parameters
 | 
					 | 
				
			||||||
    - avoid_private_typedef_functions
 | 
					 | 
				
			||||||
    - avoid_redundant_argument_values
 | 
					 | 
				
			||||||
    - avoid_relative_lib_imports
 | 
					 | 
				
			||||||
    - avoid_renaming_method_parameters
 | 
					 | 
				
			||||||
    - avoid_return_types_on_setters
 | 
					 | 
				
			||||||
    - avoid_returning_null
 | 
					 | 
				
			||||||
    - avoid_returning_null_for_future
 | 
					 | 
				
			||||||
    - avoid_returning_null_for_void
 | 
					 | 
				
			||||||
    - avoid_returning_this
 | 
					 | 
				
			||||||
    - avoid_setters_without_getters
 | 
					 | 
				
			||||||
    - avoid_shadowing_type_parameters
 | 
					 | 
				
			||||||
    - avoid_single_cascade_in_expression_statements
 | 
					 | 
				
			||||||
    - avoid_slow_async_io
 | 
					 | 
				
			||||||
    - avoid_type_to_string
 | 
					 | 
				
			||||||
    - avoid_types_as_parameter_names
 | 
					 | 
				
			||||||
    - avoid_types_on_closure_parameters
 | 
					 | 
				
			||||||
    - avoid_unused_constructor_parameters
 | 
					 | 
				
			||||||
    - avoid_void_async
 | 
					 | 
				
			||||||
    - await_only_futures
 | 
					 | 
				
			||||||
    - camel_case_extensions
 | 
					 | 
				
			||||||
    - camel_case_types
 | 
					 | 
				
			||||||
    - cancel_subscriptions
 | 
					 | 
				
			||||||
    - cascade_invocations
 | 
					 | 
				
			||||||
    - cast_nullable_to_non_nullable
 | 
					 | 
				
			||||||
    - collection_methods_unrelated_type
 | 
					 | 
				
			||||||
    - combinators_ordering
 | 
					 | 
				
			||||||
    - comment_references
 | 
					 | 
				
			||||||
    - conditional_uri_does_not_exist
 | 
					 | 
				
			||||||
    - constant_identifier_names
 | 
					 | 
				
			||||||
    - control_flow_in_finally
 | 
					 | 
				
			||||||
    - curly_braces_in_flow_control_structures
 | 
					 | 
				
			||||||
    - depend_on_referenced_packages
 | 
					 | 
				
			||||||
    - deprecated_consistency
 | 
					 | 
				
			||||||
    - directives_ordering
 | 
					 | 
				
			||||||
    - empty_catches
 | 
					 | 
				
			||||||
    - empty_constructor_bodies
 | 
					 | 
				
			||||||
    - empty_statements
 | 
					 | 
				
			||||||
    - eol_at_end_of_file
 | 
					 | 
				
			||||||
    - exhaustive_cases
 | 
					 | 
				
			||||||
    - file_names
 | 
					 | 
				
			||||||
    - flutter_style_todos
 | 
					 | 
				
			||||||
    - hash_and_equals
 | 
					 | 
				
			||||||
    - implementation_imports
 | 
					 | 
				
			||||||
    - implicit_call_tearoffs
 | 
					 | 
				
			||||||
    - iterable_contains_unrelated_type
 | 
					 | 
				
			||||||
    - join_return_with_assignment
 | 
					 | 
				
			||||||
    - leading_newlines_in_multiline_strings
 | 
					 | 
				
			||||||
    - library_names
 | 
					 | 
				
			||||||
    - library_prefixes
 | 
					 | 
				
			||||||
    - library_private_types_in_public_api
 | 
					 | 
				
			||||||
    - lines_longer_than_80_chars
 | 
					 | 
				
			||||||
    - list_remove_unrelated_type
 | 
					 | 
				
			||||||
    - literal_only_boolean_expressions
 | 
					 | 
				
			||||||
    - missing_whitespace_between_adjacent_strings
 | 
					 | 
				
			||||||
    - no_adjacent_strings_in_list
 | 
					 | 
				
			||||||
    - no_default_cases
 | 
					 | 
				
			||||||
    - no_duplicate_case_values
 | 
					 | 
				
			||||||
    - no_leading_underscores_for_library_prefixes
 | 
					 | 
				
			||||||
    - no_leading_underscores_for_local_identifiers
 | 
					 | 
				
			||||||
    - no_runtimeType_toString
 | 
					 | 
				
			||||||
    - non_constant_identifier_names
 | 
					 | 
				
			||||||
    - noop_primitive_operations
 | 
					 | 
				
			||||||
    - null_check_on_nullable_type_parameter
 | 
					 | 
				
			||||||
    - null_closures
 | 
					 | 
				
			||||||
    - one_member_abstracts
 | 
					 | 
				
			||||||
    - only_throw_errors
 | 
					 | 
				
			||||||
    - overridden_fields
 | 
					 | 
				
			||||||
    - package_api_docs
 | 
					 | 
				
			||||||
    - package_names
 | 
					 | 
				
			||||||
    - package_prefixed_library_names
 | 
					 | 
				
			||||||
    - parameter_assignments
 | 
					 | 
				
			||||||
    - prefer_adjacent_string_concatenation
 | 
					 | 
				
			||||||
    - prefer_asserts_in_initializer_lists
 | 
					 | 
				
			||||||
    - prefer_asserts_with_message
 | 
					 | 
				
			||||||
    - prefer_collection_literals
 | 
					 | 
				
			||||||
    - prefer_conditional_assignment
 | 
					 | 
				
			||||||
    - prefer_const_constructors
 | 
					 | 
				
			||||||
    - prefer_const_constructors_in_immutables
 | 
					 | 
				
			||||||
    - prefer_const_declarations
 | 
					 | 
				
			||||||
    - prefer_const_literals_to_create_immutables
 | 
					 | 
				
			||||||
    - prefer_constructors_over_static_methods
 | 
					 | 
				
			||||||
    - prefer_contains
 | 
					 | 
				
			||||||
    - prefer_equal_for_default_values
 | 
					 | 
				
			||||||
    - prefer_expression_function_bodies
 | 
					 | 
				
			||||||
    - prefer_final_fields
 | 
					 | 
				
			||||||
    - prefer_final_in_for_each
 | 
					 | 
				
			||||||
    - prefer_final_locals
 | 
					 | 
				
			||||||
    - prefer_for_elements_to_map_fromIterable
 | 
					 | 
				
			||||||
    - prefer_function_declarations_over_variables
 | 
					 | 
				
			||||||
    - prefer_generic_function_type_aliases
 | 
					 | 
				
			||||||
    - prefer_if_elements_to_conditional_expressions
 | 
					 | 
				
			||||||
    - prefer_if_null_operators
 | 
					 | 
				
			||||||
    - prefer_initializing_formals
 | 
					 | 
				
			||||||
    - prefer_inlined_adds
 | 
					 | 
				
			||||||
    - prefer_int_literals
 | 
					 | 
				
			||||||
    - prefer_interpolation_to_compose_strings
 | 
					 | 
				
			||||||
    - prefer_is_empty
 | 
					 | 
				
			||||||
    - prefer_is_not_empty
 | 
					 | 
				
			||||||
    - prefer_is_not_operator
 | 
					 | 
				
			||||||
    - prefer_iterable_whereType
 | 
					 | 
				
			||||||
    - prefer_mixin
 | 
					 | 
				
			||||||
    - prefer_null_aware_method_calls
 | 
					 | 
				
			||||||
    - prefer_null_aware_operators
 | 
					 | 
				
			||||||
    - prefer_single_quotes
 | 
					 | 
				
			||||||
    - prefer_spread_collections
 | 
					 | 
				
			||||||
    - prefer_typing_uninitialized_variables
 | 
					 | 
				
			||||||
    - prefer_void_to_null
 | 
					 | 
				
			||||||
    - provide_deprecation_message
 | 
					 | 
				
			||||||
    - recursive_getters
 | 
					 | 
				
			||||||
    - require_trailing_commas
 | 
					 | 
				
			||||||
    - slash_for_doc_comments
 | 
					 | 
				
			||||||
    - sort_constructors_first
 | 
					 | 
				
			||||||
    - sort_unnamed_constructors_first
 | 
					 | 
				
			||||||
    - test_types_in_equals
 | 
					 | 
				
			||||||
    - throw_in_finally
 | 
					 | 
				
			||||||
    - tighten_type_of_initializing_formals
 | 
					 | 
				
			||||||
    - type_annotate_public_apis
 | 
					 | 
				
			||||||
    - type_init_formals
 | 
					 | 
				
			||||||
    - unawaited_futures
 | 
					 | 
				
			||||||
    - unnecessary_await_in_return
 | 
					 | 
				
			||||||
    - unnecessary_brace_in_string_interps
 | 
					 | 
				
			||||||
    - unnecessary_const
 | 
					 | 
				
			||||||
    - unnecessary_constructor_name
 | 
					 | 
				
			||||||
    - unnecessary_getters_setters
 | 
					 | 
				
			||||||
    - unnecessary_lambdas
 | 
					 | 
				
			||||||
    - unnecessary_late
 | 
					 | 
				
			||||||
    - unnecessary_new
 | 
					 | 
				
			||||||
    - unnecessary_null_aware_assignments
 | 
					 | 
				
			||||||
    - unnecessary_null_checks
 | 
					 | 
				
			||||||
    - unnecessary_null_in_if_null_operators
 | 
					 | 
				
			||||||
    - unnecessary_nullable_for_final_variable_declarations
 | 
					 | 
				
			||||||
    - unnecessary_overrides
 | 
					 | 
				
			||||||
    - unnecessary_parenthesis
 | 
					 | 
				
			||||||
    - unnecessary_raw_strings
 | 
					 | 
				
			||||||
    - unnecessary_statements
 | 
					 | 
				
			||||||
    - unnecessary_string_escapes
 | 
					 | 
				
			||||||
    - unnecessary_string_interpolations
 | 
					 | 
				
			||||||
    - unnecessary_this
 | 
					 | 
				
			||||||
    - unnecessary_to_list_in_spreads
 | 
					 | 
				
			||||||
    - unrelated_type_equality_checks
 | 
					 | 
				
			||||||
    - unsafe_html
 | 
					 | 
				
			||||||
    - use_enums
 | 
					 | 
				
			||||||
    - use_function_type_syntax_for_parameters
 | 
					 | 
				
			||||||
    - use_if_null_to_convert_nulls_to_bools
 | 
					 | 
				
			||||||
    - use_is_even_rather_than_modulo
 | 
					 | 
				
			||||||
    - use_late_for_private_fields_and_variables
 | 
					 | 
				
			||||||
    - use_named_constants
 | 
					 | 
				
			||||||
    - use_raw_strings
 | 
					 | 
				
			||||||
    - use_rethrow_when_possible
 | 
					 | 
				
			||||||
    - use_setters_to_change_properties
 | 
					 | 
				
			||||||
    - use_string_buffers
 | 
					 | 
				
			||||||
    - use_string_in_part_of_directives
 | 
					 | 
				
			||||||
    - use_super_parameters
 | 
					 | 
				
			||||||
    - use_test_throws_matchers
 | 
					 | 
				
			||||||
    - use_to_and_as_if_applicable
 | 
					 | 
				
			||||||
    - valid_regexps
 | 
					 | 
				
			||||||
    - void_checks
 | 
					 | 
				
			||||||
@ -1,219 +0,0 @@
 | 
				
			|||||||
# 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
analyzer:
 | 
					 | 
				
			||||||
  language:
 | 
					 | 
				
			||||||
    strict-casts: true
 | 
					 | 
				
			||||||
    strict-inference: true
 | 
					 | 
				
			||||||
    strict-raw-types: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  errors:
 | 
					 | 
				
			||||||
    todo: ignore
 | 
					 | 
				
			||||||
    close_sinks: ignore
 | 
					 | 
				
			||||||
    missing_required_param: error
 | 
					 | 
				
			||||||
    missing_return: error
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  exclude:
 | 
					 | 
				
			||||||
    - lib/l10n/**
 | 
					 | 
				
			||||||
    - lib/generated/**
 | 
					 | 
				
			||||||
    - lib/gen/**
 | 
					 | 
				
			||||||
    - lib/generated_plugin_registrant.dart
 | 
					 | 
				
			||||||
    - test/.test_coverage.dart
 | 
					 | 
				
			||||||
    - "**/*.g.dart"
 | 
					 | 
				
			||||||
    - "**/*.freezed.dart"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
linter:
 | 
					 | 
				
			||||||
  rules:
 | 
					 | 
				
			||||||
    - always_declare_return_types
 | 
					 | 
				
			||||||
    - always_put_control_body_on_new_line
 | 
					 | 
				
			||||||
    - always_put_required_named_parameters_first
 | 
					 | 
				
			||||||
    - always_require_non_null_named_parameters
 | 
					 | 
				
			||||||
    - always_use_package_imports
 | 
					 | 
				
			||||||
    - annotate_overrides
 | 
					 | 
				
			||||||
    - avoid_bool_literals_in_conditional_expressions
 | 
					 | 
				
			||||||
    - avoid_catching_errors
 | 
					 | 
				
			||||||
    - avoid_double_and_int_checks
 | 
					 | 
				
			||||||
    - avoid_dynamic_calls
 | 
					 | 
				
			||||||
    - avoid_empty_else
 | 
					 | 
				
			||||||
    - avoid_equals_and_hash_code_on_mutable_classes
 | 
					 | 
				
			||||||
    - avoid_escaping_inner_quotes
 | 
					 | 
				
			||||||
    - avoid_field_initializers_in_const_classes
 | 
					 | 
				
			||||||
    - avoid_final_parameters
 | 
					 | 
				
			||||||
    - avoid_function_literals_in_foreach_calls
 | 
					 | 
				
			||||||
    - avoid_init_to_null
 | 
					 | 
				
			||||||
    - avoid_js_rounded_ints
 | 
					 | 
				
			||||||
    - avoid_multiple_declarations_per_line
 | 
					 | 
				
			||||||
    - avoid_null_checks_in_equality_operators
 | 
					 | 
				
			||||||
    - avoid_positional_boolean_parameters
 | 
					 | 
				
			||||||
    - avoid_private_typedef_functions
 | 
					 | 
				
			||||||
    - avoid_redundant_argument_values
 | 
					 | 
				
			||||||
    - avoid_relative_lib_imports
 | 
					 | 
				
			||||||
    - avoid_renaming_method_parameters
 | 
					 | 
				
			||||||
    - avoid_return_types_on_setters
 | 
					 | 
				
			||||||
    - avoid_returning_null
 | 
					 | 
				
			||||||
    - avoid_returning_null_for_future
 | 
					 | 
				
			||||||
    - avoid_returning_null_for_void
 | 
					 | 
				
			||||||
    - avoid_returning_this
 | 
					 | 
				
			||||||
    - avoid_setters_without_getters
 | 
					 | 
				
			||||||
    - avoid_shadowing_type_parameters
 | 
					 | 
				
			||||||
    - avoid_single_cascade_in_expression_statements
 | 
					 | 
				
			||||||
    - avoid_slow_async_io
 | 
					 | 
				
			||||||
    - avoid_type_to_string
 | 
					 | 
				
			||||||
    - avoid_types_as_parameter_names
 | 
					 | 
				
			||||||
    - avoid_types_on_closure_parameters
 | 
					 | 
				
			||||||
    - avoid_unused_constructor_parameters
 | 
					 | 
				
			||||||
    - avoid_void_async
 | 
					 | 
				
			||||||
    - await_only_futures
 | 
					 | 
				
			||||||
    - camel_case_extensions
 | 
					 | 
				
			||||||
    - camel_case_types
 | 
					 | 
				
			||||||
    - cancel_subscriptions
 | 
					 | 
				
			||||||
    - cascade_invocations
 | 
					 | 
				
			||||||
    - cast_nullable_to_non_nullable
 | 
					 | 
				
			||||||
    - collection_methods_unrelated_type
 | 
					 | 
				
			||||||
    - combinators_ordering
 | 
					 | 
				
			||||||
    - comment_references
 | 
					 | 
				
			||||||
    - conditional_uri_does_not_exist
 | 
					 | 
				
			||||||
    - constant_identifier_names
 | 
					 | 
				
			||||||
    - control_flow_in_finally
 | 
					 | 
				
			||||||
    - curly_braces_in_flow_control_structures
 | 
					 | 
				
			||||||
    - dangling_library_doc_comments
 | 
					 | 
				
			||||||
    - depend_on_referenced_packages
 | 
					 | 
				
			||||||
    - deprecated_consistency
 | 
					 | 
				
			||||||
    - directives_ordering
 | 
					 | 
				
			||||||
    - empty_catches
 | 
					 | 
				
			||||||
    - empty_constructor_bodies
 | 
					 | 
				
			||||||
    - empty_statements
 | 
					 | 
				
			||||||
    - eol_at_end_of_file
 | 
					 | 
				
			||||||
    - exhaustive_cases
 | 
					 | 
				
			||||||
    - file_names
 | 
					 | 
				
			||||||
    - flutter_style_todos
 | 
					 | 
				
			||||||
    - hash_and_equals
 | 
					 | 
				
			||||||
    - implementation_imports
 | 
					 | 
				
			||||||
    - implicit_call_tearoffs
 | 
					 | 
				
			||||||
    - iterable_contains_unrelated_type
 | 
					 | 
				
			||||||
    - join_return_with_assignment
 | 
					 | 
				
			||||||
    - leading_newlines_in_multiline_strings
 | 
					 | 
				
			||||||
    - library_names
 | 
					 | 
				
			||||||
    - library_prefixes
 | 
					 | 
				
			||||||
    - library_private_types_in_public_api
 | 
					 | 
				
			||||||
    - lines_longer_than_80_chars
 | 
					 | 
				
			||||||
    - list_remove_unrelated_type
 | 
					 | 
				
			||||||
    - literal_only_boolean_expressions
 | 
					 | 
				
			||||||
    - missing_whitespace_between_adjacent_strings
 | 
					 | 
				
			||||||
    - no_adjacent_strings_in_list
 | 
					 | 
				
			||||||
    - no_default_cases
 | 
					 | 
				
			||||||
    - no_duplicate_case_values
 | 
					 | 
				
			||||||
    - no_leading_underscores_for_library_prefixes
 | 
					 | 
				
			||||||
    - no_leading_underscores_for_local_identifiers
 | 
					 | 
				
			||||||
    - no_runtimeType_toString
 | 
					 | 
				
			||||||
    - non_constant_identifier_names
 | 
					 | 
				
			||||||
    - noop_primitive_operations
 | 
					 | 
				
			||||||
    - null_check_on_nullable_type_parameter
 | 
					 | 
				
			||||||
    - null_closures
 | 
					 | 
				
			||||||
    - one_member_abstracts
 | 
					 | 
				
			||||||
    - only_throw_errors
 | 
					 | 
				
			||||||
    - overridden_fields
 | 
					 | 
				
			||||||
    - package_api_docs
 | 
					 | 
				
			||||||
    - package_names
 | 
					 | 
				
			||||||
    - package_prefixed_library_names
 | 
					 | 
				
			||||||
    - parameter_assignments
 | 
					 | 
				
			||||||
    - prefer_adjacent_string_concatenation
 | 
					 | 
				
			||||||
    - prefer_asserts_in_initializer_lists
 | 
					 | 
				
			||||||
    - prefer_asserts_with_message
 | 
					 | 
				
			||||||
    - prefer_collection_literals
 | 
					 | 
				
			||||||
    - prefer_conditional_assignment
 | 
					 | 
				
			||||||
    - prefer_const_constructors
 | 
					 | 
				
			||||||
    - prefer_const_constructors_in_immutables
 | 
					 | 
				
			||||||
    - prefer_const_declarations
 | 
					 | 
				
			||||||
    - prefer_const_literals_to_create_immutables
 | 
					 | 
				
			||||||
    - prefer_constructors_over_static_methods
 | 
					 | 
				
			||||||
    - prefer_contains
 | 
					 | 
				
			||||||
    - prefer_equal_for_default_values
 | 
					 | 
				
			||||||
    - prefer_expression_function_bodies
 | 
					 | 
				
			||||||
    - prefer_final_fields
 | 
					 | 
				
			||||||
    - prefer_final_in_for_each
 | 
					 | 
				
			||||||
    - prefer_final_locals
 | 
					 | 
				
			||||||
    - prefer_for_elements_to_map_fromIterable
 | 
					 | 
				
			||||||
    - prefer_function_declarations_over_variables
 | 
					 | 
				
			||||||
    - prefer_generic_function_type_aliases
 | 
					 | 
				
			||||||
    - prefer_if_elements_to_conditional_expressions
 | 
					 | 
				
			||||||
    - prefer_if_null_operators
 | 
					 | 
				
			||||||
    - prefer_initializing_formals
 | 
					 | 
				
			||||||
    - prefer_inlined_adds
 | 
					 | 
				
			||||||
    - prefer_int_literals
 | 
					 | 
				
			||||||
    - prefer_interpolation_to_compose_strings
 | 
					 | 
				
			||||||
    - prefer_is_empty
 | 
					 | 
				
			||||||
    - prefer_is_not_empty
 | 
					 | 
				
			||||||
    - prefer_is_not_operator
 | 
					 | 
				
			||||||
    - prefer_iterable_whereType
 | 
					 | 
				
			||||||
    - prefer_mixin
 | 
					 | 
				
			||||||
    - prefer_null_aware_method_calls
 | 
					 | 
				
			||||||
    - prefer_null_aware_operators
 | 
					 | 
				
			||||||
    - prefer_single_quotes
 | 
					 | 
				
			||||||
    - prefer_spread_collections
 | 
					 | 
				
			||||||
    - prefer_typing_uninitialized_variables
 | 
					 | 
				
			||||||
    - prefer_void_to_null
 | 
					 | 
				
			||||||
    - provide_deprecation_message
 | 
					 | 
				
			||||||
    - recursive_getters
 | 
					 | 
				
			||||||
    - require_trailing_commas
 | 
					 | 
				
			||||||
    - slash_for_doc_comments
 | 
					 | 
				
			||||||
    - sort_constructors_first
 | 
					 | 
				
			||||||
    - sort_pub_dependencies
 | 
					 | 
				
			||||||
    - sort_unnamed_constructors_first
 | 
					 | 
				
			||||||
    - test_types_in_equals
 | 
					 | 
				
			||||||
    - throw_in_finally
 | 
					 | 
				
			||||||
    - tighten_type_of_initializing_formals
 | 
					 | 
				
			||||||
    - type_annotate_public_apis
 | 
					 | 
				
			||||||
    - type_init_formals
 | 
					 | 
				
			||||||
    - unawaited_futures
 | 
					 | 
				
			||||||
    - unnecessary_await_in_return
 | 
					 | 
				
			||||||
    - unnecessary_brace_in_string_interps
 | 
					 | 
				
			||||||
    - unnecessary_const
 | 
					 | 
				
			||||||
    - unnecessary_constructor_name
 | 
					 | 
				
			||||||
    - unnecessary_getters_setters
 | 
					 | 
				
			||||||
    - unnecessary_lambdas
 | 
					 | 
				
			||||||
    - unnecessary_late
 | 
					 | 
				
			||||||
    - unnecessary_new
 | 
					 | 
				
			||||||
    - unnecessary_null_aware_assignments
 | 
					 | 
				
			||||||
    - unnecessary_null_checks
 | 
					 | 
				
			||||||
    - unnecessary_null_in_if_null_operators
 | 
					 | 
				
			||||||
    - unnecessary_nullable_for_final_variable_declarations
 | 
					 | 
				
			||||||
    - unnecessary_overrides
 | 
					 | 
				
			||||||
    - unnecessary_parenthesis
 | 
					 | 
				
			||||||
    - unnecessary_raw_strings
 | 
					 | 
				
			||||||
    - unnecessary_statements
 | 
					 | 
				
			||||||
    - unnecessary_string_escapes
 | 
					 | 
				
			||||||
    - unnecessary_string_interpolations
 | 
					 | 
				
			||||||
    - unnecessary_this
 | 
					 | 
				
			||||||
    - unnecessary_to_list_in_spreads
 | 
					 | 
				
			||||||
    - unrelated_type_equality_checks
 | 
					 | 
				
			||||||
    - unsafe_html
 | 
					 | 
				
			||||||
    - use_enums
 | 
					 | 
				
			||||||
    - use_function_type_syntax_for_parameters
 | 
					 | 
				
			||||||
    - use_if_null_to_convert_nulls_to_bools
 | 
					 | 
				
			||||||
    - use_is_even_rather_than_modulo
 | 
					 | 
				
			||||||
    - use_late_for_private_fields_and_variables
 | 
					 | 
				
			||||||
    - use_named_constants
 | 
					 | 
				
			||||||
    - use_raw_strings
 | 
					 | 
				
			||||||
    - use_rethrow_when_possible
 | 
					 | 
				
			||||||
    - use_setters_to_change_properties
 | 
					 | 
				
			||||||
    - use_string_buffers
 | 
					 | 
				
			||||||
    - use_string_in_part_of_directives
 | 
					 | 
				
			||||||
    - use_super_parameters
 | 
					 | 
				
			||||||
    - use_test_throws_matchers
 | 
					 | 
				
			||||||
    - use_to_and_as_if_applicable
 | 
					 | 
				
			||||||
    - valid_regexps
 | 
					 | 
				
			||||||
    - void_checks
 | 
					 | 
				
			||||||
@ -1,32 +0,0 @@
 | 
				
			|||||||
# 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.2.4.2.yaml
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
linter:
 | 
					 | 
				
			||||||
  rules:
 | 
					 | 
				
			||||||
    - avoid_print
 | 
					 | 
				
			||||||
    - avoid_unnecessary_containers
 | 
					 | 
				
			||||||
    - avoid_web_libraries_in_flutter
 | 
					 | 
				
			||||||
    - no_logic_in_create_state
 | 
					 | 
				
			||||||
    - sized_box_for_whitespace
 | 
					 | 
				
			||||||
    - sized_box_shrink_expand
 | 
					 | 
				
			||||||
    - sort_child_properties_last
 | 
					 | 
				
			||||||
    - use_build_context_synchronously
 | 
					 | 
				
			||||||
    - use_colored_box
 | 
					 | 
				
			||||||
    - use_decorated_box
 | 
					 | 
				
			||||||
    - use_full_hex_values_for_flutter_colors
 | 
					 | 
				
			||||||
    - use_key_in_widget_constructors
 | 
					 | 
				
			||||||
@ -1,32 +0,0 @@
 | 
				
			|||||||
# 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.2.4.3.yaml
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
linter:
 | 
					 | 
				
			||||||
  rules:
 | 
					 | 
				
			||||||
    - avoid_print
 | 
					 | 
				
			||||||
    - avoid_unnecessary_containers
 | 
					 | 
				
			||||||
    - avoid_web_libraries_in_flutter
 | 
					 | 
				
			||||||
    - no_logic_in_create_state
 | 
					 | 
				
			||||||
    - sized_box_for_whitespace
 | 
					 | 
				
			||||||
    - sized_box_shrink_expand
 | 
					 | 
				
			||||||
    - sort_child_properties_last
 | 
					 | 
				
			||||||
    - use_build_context_synchronously
 | 
					 | 
				
			||||||
    - use_colored_box
 | 
					 | 
				
			||||||
    - use_decorated_box
 | 
					 | 
				
			||||||
    - use_full_hex_values_for_flutter_colors
 | 
					 | 
				
			||||||
    - use_key_in_widget_constructors
 | 
					 | 
				
			||||||
@ -14,4 +14,4 @@
 | 
				
			|||||||
# You should have received a copy of the GNU General Public License
 | 
					# You should have received a copy of the GNU General Public License
 | 
				
			||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					# along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.flutter.2.4.3.yaml
 | 
					include: package:wyatt_analysis/analysis_options.flutter.2.4.1.yaml
 | 
				
			||||||
 | 
				
			|||||||
@ -14,4 +14,4 @@
 | 
				
			|||||||
# You should have received a copy of the GNU General Public License
 | 
					# You should have received a copy of the GNU General Public License
 | 
				
			||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					# along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
include: package:wyatt_analysis/analysis_options.2.4.3.yaml
 | 
					include: package:wyatt_analysis/analysis_options.2.4.1.yaml
 | 
				
			||||||
 | 
				
			|||||||
@ -18,4 +18,4 @@
 | 
				
			|||||||
/// used internally at [Wyatt Studio](https://wyatt-studio.fr).
 | 
					/// used internally at [Wyatt Studio](https://wyatt-studio.fr).
 | 
				
			||||||
library wyatt_analysis;
 | 
					library wyatt_analysis;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const String wyattAnalysisVersion = '2.4.3';
 | 
					const String wyattAnalysisVersion = '2.4.1';
 | 
				
			||||||
 | 
				
			|||||||
@ -88,7 +88,6 @@ class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
 | 
				
			|||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      CustomAppBar(
 | 
					      CustomAppBar(
 | 
				
			||||||
        key: key ?? _value.key,
 | 
					 | 
				
			||||||
        title: title ?? _value.title,
 | 
					        title: title ?? _value.title,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -24,9 +24,7 @@ class $CustomBottomBarCWProxyImpl
 | 
				
			|||||||
    int? currentIndex,
 | 
					    int? currentIndex,
 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      CustomBottomBar(
 | 
					      CustomBottomBar();
 | 
				
			||||||
        key: key ?? _value.key,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mixin $CustomBottomBarCWMixin on Component {
 | 
					mixin $CustomBottomBarCWMixin on Component {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,12 +5,13 @@ import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			|||||||
part 'custom_error_widget.g.dart';
 | 
					part 'custom_error_widget.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ComponentCopyWithExtension()
 | 
					@ComponentCopyWithExtension()
 | 
				
			||||||
class CustomErrorWidget extends ErrorComponent with $CustomErrorWidgetCWMixin {
 | 
					class CustomErrorWidget extends ErrorWidgetComponent
 | 
				
			||||||
  const CustomErrorWidget({super.key, super.details});
 | 
					    with $CustomErrorWidgetCWMixin {
 | 
				
			||||||
 | 
					  CustomErrorWidget({super.key, super.error});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => ColoredBox(
 | 
					  Widget build(BuildContext context) => ColoredBox(
 | 
				
			||||||
        color: Colors.red,
 | 
					        color: Colors.red,
 | 
				
			||||||
        child: Center(child: Text(details?.data ?? 'Error')),
 | 
					        child: Center(child: Text(error?.data ?? 'Error')),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -6,36 +6,24 @@ part of 'custom_error_widget.dart';
 | 
				
			|||||||
// ComponentCopyWithGenerator
 | 
					// ComponentCopyWithGenerator
 | 
				
			||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class $CustomErrorWidgetCWProxyImpl implements $ErrorComponentCWProxy {
 | 
					class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy {
 | 
				
			||||||
  const $CustomErrorWidgetCWProxyImpl(this._value);
 | 
					  const $CustomErrorWidgetCWProxyImpl(this._value);
 | 
				
			||||||
  final CustomErrorWidget _value;
 | 
					  final CustomErrorWidget _value;
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget colors(MultiColor? colors) => this(colors: colors);
 | 
					  CustomErrorWidget error(TextWrapper? error) => this(error: error);
 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget message(TextWrapper? message) => this(message: message);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget details(TextWrapper? details) => this(details: details);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget themeResolver(
 | 
					 | 
				
			||||||
          ThemeResolver<dynamic, dynamic, dynamic>? themeResolver) =>
 | 
					 | 
				
			||||||
      this(themeResolver: themeResolver);
 | 
					 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget key(Key? key) => this(key: key);
 | 
					  CustomErrorWidget key(Key? key) => this(key: key);
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget call({
 | 
					  CustomErrorWidget call({
 | 
				
			||||||
    MultiColor? colors,
 | 
					    TextWrapper? error,
 | 
				
			||||||
    TextWrapper? message,
 | 
					 | 
				
			||||||
    TextWrapper? details,
 | 
					 | 
				
			||||||
    ThemeResolver<dynamic, dynamic, dynamic>? themeResolver,
 | 
					 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      CustomErrorWidget(
 | 
					      CustomErrorWidget(
 | 
				
			||||||
        key: key ?? _value.key,
 | 
					        error: error ?? _value.error,
 | 
				
			||||||
        details: details ?? _value.details,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mixin $CustomErrorWidgetCWMixin on Component {
 | 
					mixin $CustomErrorWidgetCWMixin on Component {
 | 
				
			||||||
  $ErrorComponentCWProxy get copyWith =>
 | 
					  $ErrorWidgetComponentCWProxy get copyWith =>
 | 
				
			||||||
      $CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
 | 
					      $CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,14 +5,11 @@ import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			|||||||
part 'custom_loading_widget.g.dart';
 | 
					part 'custom_loading_widget.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ComponentCopyWithExtension()
 | 
					@ComponentCopyWithExtension()
 | 
				
			||||||
class CustomLoadingWidget extends LoaderComponent
 | 
					class CustomLoadingWidget extends LoadingWidgetComponent
 | 
				
			||||||
    with $CustomLoadingWidgetCWMixin {
 | 
					    with $CustomLoadingWidgetCWMixin {
 | 
				
			||||||
  const CustomLoadingWidget({super.key, super.colors});
 | 
					  CustomLoadingWidget({super.key, super.color});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => Center(
 | 
					  Widget build(BuildContext context) =>
 | 
				
			||||||
        child: CircularProgressIndicator(
 | 
					      Center(child: CircularProgressIndicator(color: color));
 | 
				
			||||||
          color: (colors?.isColor ?? false) ? colors!.color : Colors.blue,
 | 
					 | 
				
			||||||
        ),
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -6,42 +6,25 @@ part of 'custom_loading_widget.dart';
 | 
				
			|||||||
// ComponentCopyWithGenerator
 | 
					// ComponentCopyWithGenerator
 | 
				
			||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class $CustomLoadingWidgetCWProxyImpl implements $LoaderComponentCWProxy {
 | 
					class $CustomLoadingWidgetCWProxyImpl
 | 
				
			||||||
 | 
					    implements $LoadingWidgetComponentCWProxy {
 | 
				
			||||||
  const $CustomLoadingWidgetCWProxyImpl(this._value);
 | 
					  const $CustomLoadingWidgetCWProxyImpl(this._value);
 | 
				
			||||||
  final CustomLoadingWidget _value;
 | 
					  final CustomLoadingWidget _value;
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomLoadingWidget colors(MultiColor? colors) => this(colors: colors);
 | 
					  CustomLoadingWidget color(Color? color) => this(color: color);
 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoadingWidget radius(double? radius) => this(radius: radius);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoadingWidget stroke(double? stroke) => this(stroke: stroke);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoadingWidget duration(Duration? duration) => this(duration: duration);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoadingWidget flip(bool? flip) => this(flip: flip);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoadingWidget themeResolver(
 | 
					 | 
				
			||||||
          ThemeResolver<dynamic, dynamic, dynamic>? themeResolver) =>
 | 
					 | 
				
			||||||
      this(themeResolver: themeResolver);
 | 
					 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomLoadingWidget key(Key? key) => this(key: key);
 | 
					  CustomLoadingWidget key(Key? key) => this(key: key);
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomLoadingWidget call({
 | 
					  CustomLoadingWidget call({
 | 
				
			||||||
    MultiColor? colors,
 | 
					    Color? color,
 | 
				
			||||||
    double? radius,
 | 
					 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Duration? duration,
 | 
					 | 
				
			||||||
    bool? flip,
 | 
					 | 
				
			||||||
    ThemeResolver<dynamic, dynamic, dynamic>? themeResolver,
 | 
					 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      CustomLoadingWidget(
 | 
					      CustomLoadingWidget(
 | 
				
			||||||
        key: key ?? _value.key,
 | 
					        color: color ?? _value.color,
 | 
				
			||||||
        colors: colors ?? _value.colors,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mixin $CustomLoadingWidgetCWMixin on Component {
 | 
					mixin $CustomLoadingWidgetCWMixin on Component {
 | 
				
			||||||
  $LoaderComponentCWProxy get copyWith =>
 | 
					  $LoadingWidgetComponentCWProxy get copyWith =>
 | 
				
			||||||
      $CustomLoadingWidgetCWProxyImpl(this as CustomLoadingWidget);
 | 
					      $CustomLoadingWidgetCWProxyImpl(this as CustomLoadingWidget);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -4,11 +4,11 @@ import 'package:bloc_layout_example/components/custom_error_widget.dart';
 | 
				
			|||||||
import 'package:bloc_layout_example/components/custom_loading_widget.dart';
 | 
					import 'package:bloc_layout_example/components/custom_loading_widget.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class AppThemeComponent {
 | 
					class AppThemeComponent {
 | 
				
			||||||
  static const ComponentThemeData components = ComponentThemeData.raw(
 | 
					  static ComponentThemeData get components => ComponentThemeData.raw(
 | 
				
			||||||
    topAppBar: CustomAppBar(),
 | 
					        appBar: const CustomAppBar(),
 | 
				
			||||||
    bottomNavigationBar: CustomBottomBar(),
 | 
					        bottomNavigationBar: const CustomBottomBar(),
 | 
				
			||||||
    loader: CustomLoadingWidget(),
 | 
					        loadingWidget: CustomLoadingWidget(),
 | 
				
			||||||
    error: CustomErrorWidget(),
 | 
					        errorWidget: CustomErrorWidget(),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
 | 
				
			|||||||
  // This widget is the root of your application.
 | 
					  // This widget is the root of your application.
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => ComponentTheme(
 | 
					  Widget build(BuildContext context) => ComponentTheme(
 | 
				
			||||||
        data: AppThemeComponent.components,
 | 
					        componentThemeWidget: AppThemeComponent.components,
 | 
				
			||||||
        child: MaterialApp(
 | 
					        child: MaterialApp(
 | 
				
			||||||
          title: 'Bloc Layout Example',
 | 
					          title: 'Bloc Layout Example',
 | 
				
			||||||
          theme: ThemeData(
 | 
					          theme: ThemeData(
 | 
				
			||||||
@ -122,7 +122,7 @@ class ExampleFrameLayoutCrudConsumer
 | 
				
			|||||||
  ExampleFrameLayoutCrudConsumer({super.key})
 | 
					  ExampleFrameLayoutCrudConsumer({super.key})
 | 
				
			||||||
      : super(
 | 
					      : super(
 | 
				
			||||||
          customAppBar: (bar) => bar?.copyWith.title(
 | 
					          customAppBar: (bar) => bar?.copyWith.title(
 | 
				
			||||||
            const TextWrapper('Example Title'),
 | 
					            'Example Title'.wrap(),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -139,7 +139,7 @@ class ExampleFrameLayoutCrudListConsumer
 | 
				
			|||||||
  ExampleFrameLayoutCrudListConsumer({super.key})
 | 
					  ExampleFrameLayoutCrudListConsumer({super.key})
 | 
				
			||||||
      : super(
 | 
					      : super(
 | 
				
			||||||
          customAppBar: (bar) => bar?.copyWith.title(
 | 
					          customAppBar: (bar) => bar?.copyWith.title(
 | 
				
			||||||
            const TextWrapper('Example Title'),
 | 
					            'Example Title'.wrap(),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -23,12 +23,11 @@ import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			|||||||
mixin CrudMixin<Cubit extends bloc_base.Cubit<dynamic>,
 | 
					mixin CrudMixin<Cubit extends bloc_base.Cubit<dynamic>,
 | 
				
			||||||
    SuccessState extends CrudSuccess> {
 | 
					    SuccessState extends CrudSuccess> {
 | 
				
			||||||
  Widget errorBuilder(BuildContext context, CrudError state) =>
 | 
					  Widget errorBuilder(BuildContext context, CrudError state) =>
 | 
				
			||||||
      context.components.errorComponent.call(
 | 
					      context.components.errorWidget?.copyWith(error: state.message.wrap()) ??
 | 
				
			||||||
        message: (state.message != null) ? TextWrapper(state.message!) : null,
 | 
					      const SizedBox.shrink();
 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget loadingBuilder(BuildContext context, CrudLoading state) =>
 | 
					  Widget loadingBuilder(BuildContext context, CrudLoading state) =>
 | 
				
			||||||
      context.components.loader ?? const SizedBox.shrink();
 | 
					      context.components.loadingWidget ?? const SizedBox.shrink();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Widget initialBuilder(BuildContext context, CrudInitial state) =>
 | 
					  Widget initialBuilder(BuildContext context, CrudInitial state) =>
 | 
				
			||||||
      const SizedBox.shrink();
 | 
					      const SizedBox.shrink();
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,7 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Extension for component copy with feature
 | 
					/// Extension for component copy with feature
 | 
				
			||||||
library wyatt_component_copy_with_extension;
 | 
					library component_copy_with_extension;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export './src/domain/domain.dart';
 | 
					export './src/domain/domain.dart';
 | 
				
			||||||
export 'src/component_copy_with_extension.dart';
 | 
					export 'src/component_copy_with_extension.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
targets:
 | 
					targets:
 | 
				
			||||||
  $default:
 | 
					  $default:
 | 
				
			||||||
    builders:
 | 
					    builders:
 | 
				
			||||||
      wyatt_component_copy_with_gen:
 | 
					      component_copy_with_gen:
 | 
				
			||||||
        enabled: true
 | 
					        enabled: true
 | 
				
			||||||
        generate_for:
 | 
					        generate_for:
 | 
				
			||||||
          exclude:
 | 
					          exclude:
 | 
				
			||||||
@ -11,9 +11,9 @@ targets:
 | 
				
			|||||||
            - test/gen_*
 | 
					            - test/gen_*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
builders:
 | 
					builders:
 | 
				
			||||||
  wyatt_component_copy_with_gen:
 | 
					  component_copy_with_gen:
 | 
				
			||||||
    target: ":wyatt_component_copy_with_gen"
 | 
					    target: ":component_copy_with_gen"
 | 
				
			||||||
    import: "package:wyatt_component_copy_with_gen/wyatt_component_copy_with_gen.dart"
 | 
					    import: "package:wyatt_component_copy_with_gen/component_copy_with_gen.dart"
 | 
				
			||||||
    builder_factories: ["componentCopyWithReporter"]
 | 
					    builder_factories: ["componentCopyWithReporter"]
 | 
				
			||||||
    build_extensions: { ".dart": ["copy_with_extension_gen.g.part"] }
 | 
					    build_extensions: { ".dart": ["copy_with_extension_gen.g.part"] }
 | 
				
			||||||
    auto_apply: dependents
 | 
					    auto_apply: dependents
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,7 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Generator for copywith method for components
 | 
					/// Generator for copywith method for components
 | 
				
			||||||
library wyatt_component_copy_with_gen;
 | 
					library component_copy_with_gen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export 'src/builder.dart';
 | 
					export 'src/builder.dart';
 | 
				
			||||||
export 'src/generators/component_copy_with_generator.dart';
 | 
					export 'src/generators/component_copy_with_generator.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -99,12 +99,6 @@ If you need specific settings, or pass parameters to your component, call `copyW
 | 
				
			|||||||
  )
 | 
					  )
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Default implementation
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
To use this package, you have to create your own implementation of the components. You can check out [Wyatt UI Kit](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_ui_kit) package for an example.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
But default theme extensions (used in all implementations as fallback for styles) are available in `lib/src/domain/theme_extensions` folder.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Development
 | 
					## Development
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> Common to this, and Wyatt UI Kit packages.
 | 
					> Common to this, and Wyatt UI Kit packages.
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@ targets:
 | 
				
			|||||||
  $default:
 | 
					  $default:
 | 
				
			||||||
    builders:
 | 
					    builders:
 | 
				
			||||||
      # Typically the builder key is just the package name, run `pub run build_runner doctor` to check your config.
 | 
					      # Typically the builder key is just the package name, run `pub run build_runner doctor` to check your config.
 | 
				
			||||||
      wyatt_component_copy_with_gen:wyatt_component_copy_with_gen:
 | 
					      wyatt_component_copy_with_gen:component_copy_with_gen:
 | 
				
			||||||
        generate_for:
 | 
					        generate_for:
 | 
				
			||||||
          # Example glob for only the Dart files under `lib/models`
 | 
					          # Example glob for only the Dart files under `lib/models`
 | 
				
			||||||
          - lib/**/*.dart
 | 
					          - lib/**/*.dart
 | 
				
			||||||
 | 
				
			|||||||
@ -2,13 +2,13 @@ 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_app_bar.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components_example/components/custom_bottom_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_error_widget.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components_example/components/custom_loader_widget.dart';
 | 
					import 'package:wyatt_ui_components_example/components/custom_loading_widget.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AppThemeComponent {
 | 
					class AppThemeComponent {
 | 
				
			||||||
  static ComponentThemeData get components => const ComponentThemeData.raw(
 | 
					  static ComponentThemeData get components => const ComponentThemeData.raw(
 | 
				
			||||||
        topAppBar: CustomAppBar(),
 | 
					        appBar: CustomAppBar(),
 | 
				
			||||||
        bottomNavigationBar: CustomBottomNavigationBar(),
 | 
					        bottomNavigationBar: CustomBottomNavigationBar(),
 | 
				
			||||||
        error: CustomErrorWidget(),
 | 
					        errorWidget: CustomErrorWidget(),
 | 
				
			||||||
        loader: CustomLoaderWidget(),
 | 
					        loadingWidget: CustomLoadingWidget(),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,17 +5,13 @@ import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			|||||||
part 'custom_error_widget.g.dart';
 | 
					part 'custom_error_widget.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ComponentCopyWithExtension()
 | 
					@ComponentCopyWithExtension()
 | 
				
			||||||
class CustomErrorWidget extends ErrorComponent with $CustomErrorWidgetCWMixin {
 | 
					class CustomErrorWidget extends ErrorWidgetComponent
 | 
				
			||||||
  const CustomErrorWidget({
 | 
					    with $CustomErrorWidgetCWMixin {
 | 
				
			||||||
    super.colors,
 | 
					  const CustomErrorWidget({super.error, super.key});
 | 
				
			||||||
    super.message,
 | 
					 | 
				
			||||||
    super.details,
 | 
					 | 
				
			||||||
    super.key,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => ColoredBox(
 | 
					  Widget build(BuildContext context) => ColoredBox(
 | 
				
			||||||
        color: colors?.color ?? Colors.red,
 | 
					        color: Colors.red,
 | 
				
			||||||
        child: Center(child: Text(message?.data ?? 'Error')),
 | 
					        child: Center(child: Text(error?.data ?? 'Error')),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -6,38 +6,25 @@ part of 'custom_error_widget.dart';
 | 
				
			|||||||
// ComponentCopyWithGenerator
 | 
					// ComponentCopyWithGenerator
 | 
				
			||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class $CustomErrorWidgetCWProxyImpl implements $ErrorComponentCWProxy {
 | 
					class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy {
 | 
				
			||||||
  const $CustomErrorWidgetCWProxyImpl(this._value);
 | 
					  const $CustomErrorWidgetCWProxyImpl(this._value);
 | 
				
			||||||
  final CustomErrorWidget _value;
 | 
					  final CustomErrorWidget _value;
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget colors(MultiColor? colors) => this(colors: colors);
 | 
					  CustomErrorWidget error(TextWrapper? error) => this(error: error);
 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget message(TextWrapper? message) => this(message: message);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget details(TextWrapper? details) => this(details: details);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomErrorWidget themeResolver(
 | 
					 | 
				
			||||||
          ThemeResolver<dynamic, dynamic, dynamic>? themeResolver) =>
 | 
					 | 
				
			||||||
      this(themeResolver: themeResolver);
 | 
					 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget key(Key? key) => this(key: key);
 | 
					  CustomErrorWidget key(Key? key) => this(key: key);
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  CustomErrorWidget call({
 | 
					  CustomErrorWidget call({
 | 
				
			||||||
    MultiColor? colors,
 | 
					    TextWrapper? error,
 | 
				
			||||||
    TextWrapper? message,
 | 
					 | 
				
			||||||
    TextWrapper? details,
 | 
					 | 
				
			||||||
    ThemeResolver<dynamic, dynamic, dynamic>? themeResolver,
 | 
					 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      CustomErrorWidget(
 | 
					      CustomErrorWidget(
 | 
				
			||||||
        colors: colors ?? _value.colors,
 | 
					        error: error ?? _value.error,
 | 
				
			||||||
        message: message ?? _value.message,
 | 
					 | 
				
			||||||
        details: details ?? _value.details,
 | 
					 | 
				
			||||||
        key: key ?? _value.key,
 | 
					        key: key ?? _value.key,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mixin $CustomErrorWidgetCWMixin on Component {
 | 
					mixin $CustomErrorWidgetCWMixin on Component {
 | 
				
			||||||
  $ErrorComponentCWProxy get copyWith =>
 | 
					  $ErrorWidgetComponentCWProxy get copyWith =>
 | 
				
			||||||
      $CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
 | 
					      $CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,51 +0,0 @@
 | 
				
			|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
part of 'custom_loader_widget.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// **************************************************************************
 | 
					 | 
				
			||||||
// ComponentCopyWithGenerator
 | 
					 | 
				
			||||||
// **************************************************************************
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class $CustomLoaderWidgetCWProxyImpl implements $LoaderComponentCWProxy {
 | 
					 | 
				
			||||||
  const $CustomLoaderWidgetCWProxyImpl(this._value);
 | 
					 | 
				
			||||||
  final CustomLoaderWidget _value;
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget colors(MultiColor? colors) => this(colors: colors);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget radius(double? radius) => this(radius: radius);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget stroke(double? stroke) => this(stroke: stroke);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget duration(Duration? duration) => this(duration: duration);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget flip(bool? flip) => this(flip: flip);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget themeResolver(
 | 
					 | 
				
			||||||
          ThemeResolver<dynamic, dynamic, dynamic>? themeResolver) =>
 | 
					 | 
				
			||||||
      this(themeResolver: themeResolver);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget key(Key? key) => this(key: key);
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  CustomLoaderWidget call({
 | 
					 | 
				
			||||||
    MultiColor? colors,
 | 
					 | 
				
			||||||
    double? radius,
 | 
					 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Duration? duration,
 | 
					 | 
				
			||||||
    bool? flip,
 | 
					 | 
				
			||||||
    ThemeResolver<dynamic, dynamic, dynamic>? themeResolver,
 | 
					 | 
				
			||||||
    Key? key,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      CustomLoaderWidget(
 | 
					 | 
				
			||||||
        colors: colors ?? _value.colors,
 | 
					 | 
				
			||||||
        duration: duration ?? _value.duration,
 | 
					 | 
				
			||||||
        flip: flip ?? _value.flip,
 | 
					 | 
				
			||||||
        radius: radius ?? _value.radius,
 | 
					 | 
				
			||||||
        stroke: stroke ?? _value.stroke,
 | 
					 | 
				
			||||||
        key: key ?? _value.key,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
mixin $CustomLoaderWidgetCWMixin on Component {
 | 
					 | 
				
			||||||
  $LoaderComponentCWProxy get copyWith =>
 | 
					 | 
				
			||||||
      $CustomLoaderWidgetCWProxyImpl(this as CustomLoaderWidget);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -2,24 +2,17 @@ import 'package:flutter/material.dart';
 | 
				
			|||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'custom_loader_widget.g.dart';
 | 
					part 'custom_loading_widget.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ComponentCopyWithExtension()
 | 
					@ComponentCopyWithExtension()
 | 
				
			||||||
class CustomLoaderWidget extends LoaderComponent
 | 
					class CustomLoadingWidget extends LoadingWidgetComponent
 | 
				
			||||||
    with $CustomLoaderWidgetCWMixin {
 | 
					    with $CustomLoadingWidgetCWMixin {
 | 
				
			||||||
  const CustomLoaderWidget({
 | 
					  const CustomLoadingWidget({super.color, super.key});
 | 
				
			||||||
    super.colors,
 | 
					 | 
				
			||||||
    super.duration,
 | 
					 | 
				
			||||||
    super.flip,
 | 
					 | 
				
			||||||
    super.radius,
 | 
					 | 
				
			||||||
    super.stroke,
 | 
					 | 
				
			||||||
    super.key,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => Center(
 | 
					  Widget build(BuildContext context) => Center(
 | 
				
			||||||
        child: CircularProgressIndicator(
 | 
					        child: CircularProgressIndicator(
 | 
				
			||||||
          color: colors?.color ?? Colors.blue,
 | 
					          color: color,
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					// GENERATED CODE - DO NOT MODIFY BY HAND
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					part of 'custom_loading_widget.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					// ComponentCopyWithGenerator
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class $CustomLoadingWidgetCWProxyImpl
 | 
				
			||||||
 | 
					    implements $LoadingWidgetComponentCWProxy {
 | 
				
			||||||
 | 
					  const $CustomLoadingWidgetCWProxyImpl(this._value);
 | 
				
			||||||
 | 
					  final CustomLoadingWidget _value;
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  CustomLoadingWidget color(Color? color) => this(color: color);
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  CustomLoadingWidget key(Key? key) => this(key: key);
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  CustomLoadingWidget call({
 | 
				
			||||||
 | 
					    Color? color,
 | 
				
			||||||
 | 
					    Key? key,
 | 
				
			||||||
 | 
					  }) =>
 | 
				
			||||||
 | 
					      CustomLoadingWidget(
 | 
				
			||||||
 | 
					        color: color ?? _value.color,
 | 
				
			||||||
 | 
					        key: key ?? _value.key,
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mixin $CustomLoadingWidgetCWMixin on Component {
 | 
				
			||||||
 | 
					  $LoadingWidgetComponentCWProxy get copyWith =>
 | 
				
			||||||
 | 
					      $CustomLoadingWidgetCWProxyImpl(this as CustomLoadingWidget);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
 | 
				
			|||||||
  // This widget is the root of your application.
 | 
					  // This widget is the root of your application.
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => ComponentTheme(
 | 
					  Widget build(BuildContext context) => ComponentTheme(
 | 
				
			||||||
        data: AppThemeComponent.components,
 | 
					        componentThemeWidget: AppThemeComponent.components,
 | 
				
			||||||
        child: MaterialApp(
 | 
					        child: MaterialApp(
 | 
				
			||||||
          title: 'Wyatt Ui Components Example',
 | 
					          title: 'Wyatt Ui Components Example',
 | 
				
			||||||
          theme: ThemeData(
 | 
					          theme: ThemeData(
 | 
				
			||||||
@ -48,23 +48,24 @@ class Home extends StatelessWidget {
 | 
				
			|||||||
  Widget build(BuildContext context) => Scaffold(
 | 
					  Widget build(BuildContext context) => Scaffold(
 | 
				
			||||||
        appBar: PreferredSize(
 | 
					        appBar: PreferredSize(
 | 
				
			||||||
          preferredSize: const Size.fromHeight(60),
 | 
					          preferredSize: const Size.fromHeight(60),
 | 
				
			||||||
          child: context.components.topAppBarComponent
 | 
					          child: context.components.appBar?.copyWith
 | 
				
			||||||
              .title(const TextWrapper('Example title')),
 | 
					                  .title('Example title'.wrap()) ??
 | 
				
			||||||
 | 
					              const SizedBox.shrink(),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
        body: Column(
 | 
					        body: Column(
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            Expanded(
 | 
					            Expanded(
 | 
				
			||||||
              child: context.components.errorComponent.call(
 | 
					              child: context.components.errorWidget
 | 
				
			||||||
                message: const TextWrapper('Example error'),
 | 
					                      ?.copyWith(error: 'Example erreur'.wrap()) ??
 | 
				
			||||||
              ),
 | 
					                  const SizedBox.shrink(),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            const SizedBox(
 | 
					            const SizedBox(
 | 
				
			||||||
              height: 10,
 | 
					              height: 10,
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            Expanded(
 | 
					            Expanded(
 | 
				
			||||||
              child: context.components.loaderComponent.call(
 | 
					              child: context.components.loadingWidget
 | 
				
			||||||
                colors: const MultiColor.single(Colors.green),
 | 
					                      ?.copyWith(color: Colors.green) ??
 | 
				
			||||||
              ),
 | 
					                  const SizedBox.shrink(),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          ],
 | 
					          ],
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
 | 
				
			|||||||
@ -16,5 +16,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export 'enums/enums.dart';
 | 
					export 'enums/enums.dart';
 | 
				
			||||||
export 'extensions/build_context_extensions.dart';
 | 
					export 'extensions/build_context_extensions.dart';
 | 
				
			||||||
 | 
					export 'extensions/string_extension.dart';
 | 
				
			||||||
export 'mixins/copy_with_mixin.dart';
 | 
					export 'mixins/copy_with_mixin.dart';
 | 
				
			||||||
export 'utils/utils.dart';
 | 
					export 'utils/utils.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,12 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export 'file_selection_button_theme_extension_default.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
export 'flat_button_theme_extension_default.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
export 'simple_icon_button_theme_extension_default.dart';
 | 
					
 | 
				
			||||||
export 'symbol_button_theme_extension_default.dart';
 | 
					extension StringExtension on String? {
 | 
				
			||||||
 | 
					  TextWrapper? wrap({TextStyle? style, MultiColor? gradientColors}) =>
 | 
				
			||||||
 | 
					      this != null
 | 
				
			||||||
 | 
					          ? TextWrapper(this!, style: style, gradientColors: gradientColors)
 | 
				
			||||||
 | 
					          : null;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,38 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
abstract class GradientHelper {
 | 
					 | 
				
			||||||
  static LinearGradient? linearFromNullableColors(List<Color>? colors) =>
 | 
					 | 
				
			||||||
      colors != null ? LinearGradient(colors: colors) : null;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  static LinearGradient? linearFromMultiColor(MultiColor multiColor) =>
 | 
					 | 
				
			||||||
      multiColor.isGradient ? LinearGradient(colors: multiColor.colors) : null;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  static RadialGradient? radialFromNullableColors(List<Color>? colors) =>
 | 
					 | 
				
			||||||
      colors != null ? RadialGradient(colors: colors) : null;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  static RadialGradient? radialFromMultiColor(MultiColor multiColor) =>
 | 
					 | 
				
			||||||
      multiColor.isGradient ? RadialGradient(colors: multiColor.colors) : null;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  static SweepGradient? sweepFromNullableColors(List<Color>? colors) =>
 | 
					 | 
				
			||||||
      colors != null ? SweepGradient(colors: colors) : null;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  static SweepGradient? sweepFromMultiColor(MultiColor multiColor) =>
 | 
					 | 
				
			||||||
      multiColor.isGradient ? SweepGradient(colors: multiColor.colors) : null;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -36,28 +36,15 @@ class TextWrapper {
 | 
				
			|||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Creates a [TextWrapper] from a [Text] widget.
 | 
					  /// Creates a [TextWrapper] from a [Text] widget.
 | 
				
			||||||
  TextWrapper.text(Text text)
 | 
					  const TextWrapper.text(this.data)
 | 
				
			||||||
      : data = text.data!,
 | 
					      : style = null,
 | 
				
			||||||
        style = text.style,
 | 
					 | 
				
			||||||
        gradientColors = null,
 | 
					        gradientColors = null,
 | 
				
			||||||
        textAlign = text.textAlign,
 | 
					        textAlign = null,
 | 
				
			||||||
        textDirection = text.textDirection,
 | 
					        textDirection = null,
 | 
				
			||||||
        softWrap = text.softWrap,
 | 
					        softWrap = null,
 | 
				
			||||||
        overflow = text.overflow,
 | 
					        overflow = null,
 | 
				
			||||||
        maxLines = text.maxLines,
 | 
					        maxLines = null,
 | 
				
			||||||
        selectionColor = text.selectionColor;
 | 
					        selectionColor = null;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TextWrapper] from a [RichText] widget.
 | 
					 | 
				
			||||||
  TextWrapper.rich(RichText richText)
 | 
					 | 
				
			||||||
      : data = richText.text.toPlainText(),
 | 
					 | 
				
			||||||
        style = richText.text.style,
 | 
					 | 
				
			||||||
        gradientColors = null,
 | 
					 | 
				
			||||||
        textAlign = richText.textAlign,
 | 
					 | 
				
			||||||
        textDirection = richText.textDirection,
 | 
					 | 
				
			||||||
        softWrap = richText.softWrap,
 | 
					 | 
				
			||||||
        overflow = richText.overflow,
 | 
					 | 
				
			||||||
        maxLines = richText.maxLines,
 | 
					 | 
				
			||||||
        selectionColor = richText.selectionColor;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Text to be displayed
 | 
					  /// Text to be displayed
 | 
				
			||||||
  final String data;
 | 
					  final String data;
 | 
				
			||||||
@ -121,7 +108,4 @@ class TextWrapper {
 | 
				
			|||||||
  /// that, the selection color defaults to [DefaultSelectionStyle.defaultColor]
 | 
					  /// that, the selection color defaults to [DefaultSelectionStyle.defaultColor]
 | 
				
			||||||
  /// (semi-transparent grey).
 | 
					  /// (semi-transparent grey).
 | 
				
			||||||
  final Color? selectionColor;
 | 
					  final Color? selectionColor;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  String toString() => data;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -14,84 +14,35 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with super program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with super program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// A helper class for getting theme elements.
 | 
					/// A helper class for getting theme elements.
 | 
				
			||||||
abstract class ThemeHelper {
 | 
					abstract class ThemeHelper {
 | 
				
			||||||
  /// Gets a nullable theme element from a list of styles.
 | 
					  /// Gets a theme element from a list of styles.
 | 
				
			||||||
  /// {@template getElement}
 | 
					 | 
				
			||||||
  /// Styles are checked in order, and the first one that passes the
 | 
					  /// Styles are checked in order, and the first one that passes the
 | 
				
			||||||
  /// [valueValidator] is returned.
 | 
					  /// [valueValidator] is returned.
 | 
				
			||||||
  /// Style elements are transformed using the [transform] function.
 | 
					  /// Style elements are transformed using the [transform] function.
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// - [styles] : A list of styles that need to be checked.
 | 
					  /// [styles]: A list of styles that need to be checked.
 | 
				
			||||||
  ///
 | 
					  /// [transform]: A function that transforms each style element
 | 
				
			||||||
  /// - [transform] : An optional function that transforms each style element
 | 
					  /// to a [T] type.
 | 
				
			||||||
  /// to a [T] type after it passes the [valueValidator]. *(default: returns
 | 
					  /// [valueValidator]: An optional validation function that
 | 
				
			||||||
  /// element as is)*
 | 
					  /// determines if a style element is valid.
 | 
				
			||||||
  ///
 | 
					  /// [combine]: A function that combines two [P] type objects to create
 | 
				
			||||||
  /// - [valueValidator] : An optional validation function that
 | 
					  /// a new object.
 | 
				
			||||||
  /// determines if a style element is valid. *(default: checks if element
 | 
					  static T? getThemeElement<P, T>(
 | 
				
			||||||
  /// is not null)*
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// - [combine] : A function that combines two [P] type objects to create
 | 
					 | 
				
			||||||
  /// a new object. *(default: returns the first element)*
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// So, if you only pass a [styles] list, the first valid style element
 | 
					 | 
				
			||||||
  /// will be returned as is.
 | 
					 | 
				
			||||||
  /// If you pass a [transform] function, the first valid style element
 | 
					 | 
				
			||||||
  /// will be transformed to a [T] type.
 | 
					 | 
				
			||||||
  /// {@endtemplate}
 | 
					 | 
				
			||||||
  static T? maybeGetElement<P, T>(
 | 
					 | 
				
			||||||
    List<P?>? styles, {
 | 
					    List<P?>? styles, {
 | 
				
			||||||
    T? Function(P?)? transform,
 | 
					    required T? Function(P?)? transform,
 | 
				
			||||||
    bool? Function(P?)? valueValidator,
 | 
					    bool? Function(P?)? valueValidator,
 | 
				
			||||||
    P? Function(P?, P?)? combine,
 | 
					    P? Function(P?, P?)? combine,
 | 
				
			||||||
  }) {
 | 
					  }) {
 | 
				
			||||||
    // List of valid styles
 | 
					 | 
				
			||||||
    final Iterable<P?>? validStyles = styles?.where(
 | 
					    final Iterable<P?>? validStyles = styles?.where(
 | 
				
			||||||
      (element) => valueValidator?.call(element) ?? (element != null),
 | 
					      (element) => valueValidator?.call(element) ?? (element != null),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // tranformation function
 | 
					 | 
				
			||||||
    final transformation = transform ?? (element) => element as T?;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return (validStyles?.isNotEmpty ?? false)
 | 
					    return (validStyles?.isNotEmpty ?? false)
 | 
				
			||||||
        ? transformation.call(
 | 
					        ? transform?.call(
 | 
				
			||||||
            validStyles?.reduce(
 | 
					            validStyles?.reduce(
 | 
				
			||||||
              (value, element) => combine?.call(value, element) ?? value,
 | 
					              (value, element) => combine?.call(value, element) ?? value,
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
        : null;
 | 
					        : null;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Gets a theme element from a list of styles. Throws an exception if no
 | 
					 | 
				
			||||||
  /// valid style is found.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// See [maybeGetElement] for more details.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro getElement}
 | 
					 | 
				
			||||||
  static T getElement<P, T>(
 | 
					 | 
				
			||||||
    List<P?>? styles, {
 | 
					 | 
				
			||||||
    T? Function(P?)? transform,
 | 
					 | 
				
			||||||
    bool? Function(P?)? valueValidator,
 | 
					 | 
				
			||||||
    P? Function(P?, P?)? combine,
 | 
					 | 
				
			||||||
  }) {
 | 
					 | 
				
			||||||
    final result = maybeGetElement<P, T>(
 | 
					 | 
				
			||||||
      styles,
 | 
					 | 
				
			||||||
      transform: transform,
 | 
					 | 
				
			||||||
      valueValidator: valueValidator,
 | 
					 | 
				
			||||||
      combine: combine,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (result == null) {
 | 
					 | 
				
			||||||
      throw FlutterError(
 | 
					 | 
				
			||||||
        'No valid style found.\nPlease check your theme configuration.\n'
 | 
					 | 
				
			||||||
        'Searching for: $P in $styles (transform to $T)\n'
 | 
					 | 
				
			||||||
        'If this value can be null, use maybeGetElement instead.',
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -26,82 +26,47 @@ import 'package:wyatt_ui_components/src/domain/entities/theme_style.dart';
 | 
				
			|||||||
/// 1) Pass the "radius" into the constructor, `Component(radius: 12)`.
 | 
					/// 1) Pass the "radius" into the constructor, `Component(radius: 12)`.
 | 
				
			||||||
/// 2) Set up a theme extension `ComponentThemeExtension(radius: 15)`.
 | 
					/// 2) Set up a theme extension `ComponentThemeExtension(radius: 15)`.
 | 
				
			||||||
/// 3) Let `wyatt_ui_kit` "negotiate" and try to find a suitable style in the
 | 
					/// 3) Let `wyatt_ui_kit` "negotiate" and try to find a suitable style in the
 | 
				
			||||||
/// flutter theme, or use a hardcoded value.
 | 
					/// flutter theme.
 | 
				
			||||||
///
 | 
					///
 | 
				
			||||||
/// If a negotiation phase fails, it will fallback to the next one.
 | 
					/// If this negotiation phase fails, then:
 | 
				
			||||||
///
 | 
					/// - If the value is mandatory: a hardcoded value in "wyatt_ui_kit" is chosen.
 | 
				
			||||||
/// This resolver uses [ThemeHelper] to negotiate and merge styles.
 | 
					/// - If not, the style is simply not applied.
 | 
				
			||||||
/// {@endtemplate}
 | 
					/// {@endtemplate}
 | 
				
			||||||
abstract class ThemeResolver<Style extends ThemeStyle<Style>, Extension,
 | 
					abstract class ThemeResolver<S extends ThemeStyle<S>, T, E> {
 | 
				
			||||||
    Extra> {
 | 
					 | 
				
			||||||
  /// {@macro theme_resolver}
 | 
					  /// {@macro theme_resolver}
 | 
				
			||||||
  const ThemeResolver();
 | 
					  const ThemeResolver();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Compute extension value from a given extension.
 | 
					  S? Function(BuildContext context, {E? extra}) get customStyleFn;
 | 
				
			||||||
  Style? computeExtensionValueFn(
 | 
					 | 
				
			||||||
    BuildContext context,
 | 
					 | 
				
			||||||
    Extension? themeExtension, {
 | 
					 | 
				
			||||||
    Extra? extra,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Return the default extension containing Flutter's default values and
 | 
					 | 
				
			||||||
  /// hardcoded values.
 | 
					 | 
				
			||||||
  Extension? getDefaultExtension(BuildContext context);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Compute default value from Flutter Theme or with hardcoded values.
 | 
					  /// Compute default value from Flutter Theme or with hardcoded values.
 | 
				
			||||||
  ///
 | 
					  S computeDefaultValue(
 | 
				
			||||||
  /// If no default value is found, it will throw a [FlutterError].
 | 
					 | 
				
			||||||
  Style computeDefaultValue(
 | 
					 | 
				
			||||||
    BuildContext context, {
 | 
					    BuildContext context, {
 | 
				
			||||||
    Extra? extra,
 | 
					    E? extra,
 | 
				
			||||||
  }) {
 | 
					  });
 | 
				
			||||||
    final extension = getDefaultExtension(context);
 | 
					 | 
				
			||||||
    if (extension == null) {
 | 
					 | 
				
			||||||
      throw FlutterError('No default extension found for $Extension\n'
 | 
					 | 
				
			||||||
          'Please provide a default extension in your theme using '
 | 
					 | 
				
			||||||
          '`wyatt_ui_components` default extensions kit.');
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    final style = computeExtensionValueFn(context, extension, extra: extra);
 | 
					  /// Compute extension value from custom component extension.
 | 
				
			||||||
 | 
					  S? computeExtensionValueFn(
 | 
				
			||||||
    if (style == null) {
 | 
					    BuildContext context,
 | 
				
			||||||
      throw FlutterError(
 | 
					    T? themeExtension, {
 | 
				
			||||||
        'No default style found for $Style in '
 | 
					    E? extra,
 | 
				
			||||||
        '$Extension${extra != null ? ' with $extra' : ''}',
 | 
					  });
 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return style;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Compute custom style from context.
 | 
					 | 
				
			||||||
  Style? Function(BuildContext context, {Extra? extra}) get customStyleFn;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Choose most suitable style for a given context.
 | 
					  /// Choose most suitable style for a given context.
 | 
				
			||||||
  Style negotiate(BuildContext context, {Extra? extra}) {
 | 
					  S negotiate(BuildContext context, {E? extra}) {
 | 
				
			||||||
    // 1) Custom style passed in constructor (cannot be null)
 | 
					 | 
				
			||||||
    final style = computeDefaultValue(context, extra: extra);
 | 
					    final style = computeDefaultValue(context, extra: extra);
 | 
				
			||||||
    return ThemeHelper.getElement<Style, Style>(
 | 
					    return ThemeHelper.getThemeElement<S, S>(
 | 
				
			||||||
          [
 | 
					          [
 | 
				
			||||||
        // 3) Default
 | 
					 | 
				
			||||||
            style,
 | 
					            style,
 | 
				
			||||||
 | 
					 | 
				
			||||||
        // -> then, try to find better style, and merge it with the default
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 2) Theme extension
 | 
					 | 
				
			||||||
            computeExtensionValueFn(
 | 
					            computeExtensionValueFn(
 | 
				
			||||||
              context,
 | 
					              context,
 | 
				
			||||||
          Theme.of(context).extension<Extension>(),
 | 
					              Theme.of(context).extension<T>(),
 | 
				
			||||||
              extra: extra,
 | 
					              extra: extra,
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
 | 
					            customStyleFn(context, extra: extra)
 | 
				
			||||||
        // -> then, try to find better style, and merge it with the one above
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 1) Custom style passed in constructor
 | 
					 | 
				
			||||||
        customStyleFn(context, extra: extra),
 | 
					 | 
				
			||||||
          ],
 | 
					          ],
 | 
				
			||||||
          transform: (value) => value,
 | 
					          transform: (value) => value,
 | 
				
			||||||
          combine: (value, element) => value?.mergeWith(element),
 | 
					          combine: (value, element) => value?.mergeWith(element),
 | 
				
			||||||
    );
 | 
					        ) ??
 | 
				
			||||||
 | 
					        style;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,6 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export 'gradient_helper.dart';
 | 
					 | 
				
			||||||
export 'multi_color.dart';
 | 
					export 'multi_color.dart';
 | 
				
			||||||
export 'text_wrapper.dart';
 | 
					export 'text_wrapper.dart';
 | 
				
			||||||
export 'theme_helper.dart';
 | 
					export 'theme_helper.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -1,82 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
/// Default file selection button theme extension using Flutter's
 | 
					 | 
				
			||||||
/// default theme and opinionated defaults.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FileSelectionButtonThemeExtensionDefault
 | 
					 | 
				
			||||||
    extends FileSelectionButtonThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
  const FileSelectionButtonThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.disabledStyle,
 | 
					 | 
				
			||||||
    required super.focusedStyle,
 | 
					 | 
				
			||||||
    required super.hoveredStyle,
 | 
					 | 
				
			||||||
    required super.normalStyle,
 | 
					 | 
				
			||||||
    required super.tappedStyle,
 | 
					 | 
				
			||||||
    required super.selectedStyle,
 | 
					 | 
				
			||||||
    required super.invalidStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FileSelectionButtonThemeExtensionDefault] given a [ThemeData]
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
  factory FileSelectionButtonThemeExtensionDefault.from(ThemeData theme) {
 | 
					 | 
				
			||||||
    final style = FileSelectionButtonStyle(
 | 
					 | 
				
			||||||
      titleStyle: theme.textTheme.labelLarge,
 | 
					 | 
				
			||||||
      subtitleStyle: theme.textTheme.labelSmall,
 | 
					 | 
				
			||||||
      radius: (theme.buttonTheme.shape is RoundedRectangleBorder)
 | 
					 | 
				
			||||||
          ? (theme.buttonTheme.shape as RoundedRectangleBorder).borderRadius
 | 
					 | 
				
			||||||
          : null,
 | 
					 | 
				
			||||||
      padding: const EdgeInsets.symmetric(horizontal: 10),
 | 
					 | 
				
			||||||
      foregroundColors: MultiColor.single(theme.colorScheme.onPrimary),
 | 
					 | 
				
			||||||
      backgroundColors: MultiColor.single(theme.colorScheme.primary),
 | 
					 | 
				
			||||||
      animationDuration: Duration.zero,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return FileSelectionButtonThemeExtensionDefault(
 | 
					 | 
				
			||||||
      normalStyle: style,
 | 
					 | 
				
			||||||
      focusedStyle: style,
 | 
					 | 
				
			||||||
      hoveredStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.80)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      tappedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.75)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      selectedStyle: style,
 | 
					 | 
				
			||||||
      disabledStyle: style.copyWith(
 | 
					 | 
				
			||||||
        foregroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.12)),
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.38)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      invalidStyle: style,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FileSelectionButtonThemeExtensionDefault] from a dark theme
 | 
					 | 
				
			||||||
  factory FileSelectionButtonThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      FileSelectionButtonThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FileSelectionButtonThemeExtensionDefault] from a light theme
 | 
					 | 
				
			||||||
  factory FileSelectionButtonThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      FileSelectionButtonThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,79 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template flat_button_theme_extension_default}
 | 
					 | 
				
			||||||
/// Default flat button theme extension using Flutter's default values.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FlatButtonThemeExtensionDefault extends FlatButtonThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro flat_button_theme_extension_default}
 | 
					 | 
				
			||||||
  const FlatButtonThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.disabledStyle,
 | 
					 | 
				
			||||||
    required super.focusedStyle,
 | 
					 | 
				
			||||||
    required super.hoveredStyle,
 | 
					 | 
				
			||||||
    required super.normalStyle,
 | 
					 | 
				
			||||||
    required super.tappedStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FlatButtonThemeExtensionDefault] given a [ThemeData]
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro flat_button_theme_extension_default}
 | 
					 | 
				
			||||||
  factory FlatButtonThemeExtensionDefault.from(ThemeData theme) {
 | 
					 | 
				
			||||||
    final backgroundColor = MultiColor.single(theme.colorScheme.primary);
 | 
					 | 
				
			||||||
    final foregroundColor = MultiColor.single(theme.colorScheme.onPrimary);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final style = FlatButtonStyle(
 | 
					 | 
				
			||||||
      labelStyle:
 | 
					 | 
				
			||||||
          theme.textTheme.labelLarge?.copyWith(color: foregroundColor.color),
 | 
					 | 
				
			||||||
      radius: (theme.buttonTheme.shape is RoundedRectangleBorder)
 | 
					 | 
				
			||||||
          ? (theme.buttonTheme.shape as RoundedRectangleBorder).borderRadius
 | 
					 | 
				
			||||||
          : null,
 | 
					 | 
				
			||||||
      padding: theme.buttonTheme.padding,
 | 
					 | 
				
			||||||
      foregroundColors: foregroundColor,
 | 
					 | 
				
			||||||
      backgroundColors: backgroundColor,
 | 
					 | 
				
			||||||
      animationDuration: Duration.zero,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return FlatButtonThemeExtensionDefault(
 | 
					 | 
				
			||||||
      normalStyle: style,
 | 
					 | 
				
			||||||
      focusedStyle: style,
 | 
					 | 
				
			||||||
      hoveredStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.92)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      tappedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.92)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      disabledStyle: style.copyWith(
 | 
					 | 
				
			||||||
        foregroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.12)),
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.38)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FlatButtonThemeExtensionDefault] from a dark theme
 | 
					 | 
				
			||||||
  factory FlatButtonThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      FlatButtonThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [FlatButtonThemeExtensionDefault] from a light theme
 | 
					 | 
				
			||||||
  factory FlatButtonThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      FlatButtonThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,79 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template simple_icon_button_theme_extension}
 | 
					 | 
				
			||||||
/// Default simple icon button theme extension using Flutter's default values.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class SimpleIconButtonThemeExtensionDefault
 | 
					 | 
				
			||||||
    extends SimpleIconButtonThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro simple_icon_button_theme_extension}
 | 
					 | 
				
			||||||
  const SimpleIconButtonThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.disabledStyle,
 | 
					 | 
				
			||||||
    required super.focusedStyle,
 | 
					 | 
				
			||||||
    required super.hoveredStyle,
 | 
					 | 
				
			||||||
    required super.normalStyle,
 | 
					 | 
				
			||||||
    required super.tappedStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SimpleIconButtonThemeExtensionDefault] given a [ThemeData]
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
  factory SimpleIconButtonThemeExtensionDefault.from(ThemeData theme) {
 | 
					 | 
				
			||||||
    final backgroundColor = MultiColor.single(theme.colorScheme.primary);
 | 
					 | 
				
			||||||
    final foregroundColor = MultiColor.single(theme.colorScheme.onPrimary);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final style = SimpleIconButtonStyle(
 | 
					 | 
				
			||||||
      dimension: theme.buttonTheme.height,
 | 
					 | 
				
			||||||
      radius: (theme.buttonTheme.shape is RoundedRectangleBorder)
 | 
					 | 
				
			||||||
          ? (theme.buttonTheme.shape as RoundedRectangleBorder).borderRadius
 | 
					 | 
				
			||||||
          : null,
 | 
					 | 
				
			||||||
      padding: const EdgeInsets.all(5),
 | 
					 | 
				
			||||||
      foregroundColors: foregroundColor,
 | 
					 | 
				
			||||||
      backgroundColors: backgroundColor,
 | 
					 | 
				
			||||||
      animationDuration: Duration.zero,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return SimpleIconButtonThemeExtensionDefault(
 | 
					 | 
				
			||||||
      normalStyle: style,
 | 
					 | 
				
			||||||
      focusedStyle: style,
 | 
					 | 
				
			||||||
      hoveredStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.80)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      tappedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.75)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      disabledStyle: style.copyWith(
 | 
					 | 
				
			||||||
        foregroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.12)),
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.38)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SimpleIconButtonThemeExtensionDefault] from a dark theme
 | 
					 | 
				
			||||||
  factory SimpleIconButtonThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      SimpleIconButtonThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SimpleIconButtonThemeExtensionDefault] from a light theme
 | 
					 | 
				
			||||||
  factory SimpleIconButtonThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      SimpleIconButtonThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,87 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template symbol_button_theme_extension}
 | 
					 | 
				
			||||||
/// Default symbol button theme extension using Flutter's default values.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class SymbolButtonThemeExtensionDefault extends SymbolButtonThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro flat_button_theme_extension}
 | 
					 | 
				
			||||||
  const SymbolButtonThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.disabledStyle,
 | 
					 | 
				
			||||||
    required super.focusedStyle,
 | 
					 | 
				
			||||||
    required super.hoveredStyle,
 | 
					 | 
				
			||||||
    required super.normalStyle,
 | 
					 | 
				
			||||||
    required super.tappedStyle,
 | 
					 | 
				
			||||||
    required super.selectedStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SymbolButtonThemeExtensionDefault] given a [ThemeData]
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
  factory SymbolButtonThemeExtensionDefault.from(ThemeData theme) {
 | 
					 | 
				
			||||||
    final backgroundColor = MultiColor.single(theme.colorScheme.primary);
 | 
					 | 
				
			||||||
    final foregroundColor = MultiColor.single(theme.colorScheme.onPrimary);
 | 
					 | 
				
			||||||
    final textColor = MultiColor.single(theme.textTheme.bodyMedium?.color);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final style = SymbolButtonStyle(
 | 
					 | 
				
			||||||
      labelStyle: theme.textTheme.labelLarge?.copyWith(color: textColor.color),
 | 
					 | 
				
			||||||
      dimension: theme.buttonTheme.height * 1.5,
 | 
					 | 
				
			||||||
      radius: (theme.buttonTheme.shape is RoundedRectangleBorder)
 | 
					 | 
				
			||||||
          ? (theme.buttonTheme.shape as RoundedRectangleBorder).borderRadius
 | 
					 | 
				
			||||||
          : null,
 | 
					 | 
				
			||||||
      padding: theme.buttonTheme.padding,
 | 
					 | 
				
			||||||
      foregroundColors: foregroundColor,
 | 
					 | 
				
			||||||
      backgroundColors: backgroundColor,
 | 
					 | 
				
			||||||
      animationDuration: Duration.zero,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return SymbolButtonThemeExtensionDefault(
 | 
					 | 
				
			||||||
      normalStyle: style,
 | 
					 | 
				
			||||||
      focusedStyle: style,
 | 
					 | 
				
			||||||
      hoveredStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.80)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      tappedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.75)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      disabledStyle: style.copyWith(
 | 
					 | 
				
			||||||
        foregroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.12)),
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.onSurface.withOpacity(0.38)),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      selectedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        backgroundColors:
 | 
					 | 
				
			||||||
            MultiColor.single(theme.colorScheme.primary.withOpacity(0.92)),
 | 
					 | 
				
			||||||
        borderColors: textColor,
 | 
					 | 
				
			||||||
        stroke: 3,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SymbolButtonThemeExtensionDefault] from a dark theme
 | 
					 | 
				
			||||||
  factory SymbolButtonThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      SymbolButtonThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [SymbolButtonThemeExtensionDefault] from a light theme
 | 
					 | 
				
			||||||
  factory SymbolButtonThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      SymbolButtonThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,67 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/theme_extensions/theme_extensions.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template card_theme_extension_default}
 | 
					 | 
				
			||||||
/// Default card theme extension using Flutter's default card theme and
 | 
					 | 
				
			||||||
/// opinionated defaults.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class CardThemeExtensionDefault extends CardThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension_default}
 | 
					 | 
				
			||||||
  const CardThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.radius,
 | 
					 | 
				
			||||||
    required super.padding,
 | 
					 | 
				
			||||||
    required super.backgroundColors,
 | 
					 | 
				
			||||||
    required super.borderColors,
 | 
					 | 
				
			||||||
    required super.stroke,
 | 
					 | 
				
			||||||
    required super.shadow,
 | 
					 | 
				
			||||||
    required super.minSize,
 | 
					 | 
				
			||||||
    required super.maxSize,
 | 
					 | 
				
			||||||
    required super.titleStyle,
 | 
					 | 
				
			||||||
    required super.subtitleStyle,
 | 
					 | 
				
			||||||
    required super.bodyStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [CardThemeExtensionDefault] from a [ThemeData]
 | 
					 | 
				
			||||||
  /// and opinionated defaults.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension_default}
 | 
					 | 
				
			||||||
  factory CardThemeExtensionDefault.from(ThemeData theme) =>
 | 
					 | 
				
			||||||
      CardThemeExtensionDefault(
 | 
					 | 
				
			||||||
        radius: const BorderRadius.all(Radius.circular(12)),
 | 
					 | 
				
			||||||
        padding: theme.cardTheme.margin ?? const EdgeInsets.all(15),
 | 
					 | 
				
			||||||
        backgroundColors: MultiColor.single(theme.cardColor),
 | 
					 | 
				
			||||||
        borderColors: MultiColor.single(theme.canvasColor),
 | 
					 | 
				
			||||||
        minSize: const Size(330, 0),
 | 
					 | 
				
			||||||
        maxSize: const Size(390, double.infinity),
 | 
					 | 
				
			||||||
        titleStyle: theme.textTheme.titleLarge,
 | 
					 | 
				
			||||||
        subtitleStyle: theme.textTheme.titleMedium,
 | 
					 | 
				
			||||||
        bodyStyle: theme.textTheme.bodyMedium,
 | 
					 | 
				
			||||||
        stroke: 0,
 | 
					 | 
				
			||||||
        shadow: null,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [CardThemeExtensionDefault] from a dark [ThemeData]
 | 
					 | 
				
			||||||
  factory CardThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      CardThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [CardThemeExtensionDefault] from a light [ThemeData]
 | 
					 | 
				
			||||||
  factory CardThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      CardThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,50 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template loader_theme_extension_default}
 | 
					 | 
				
			||||||
/// The default [LoaderThemeExtension].
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class LoaderThemeExtensionDefault extends LoaderThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro loader_theme_extension_default}
 | 
					 | 
				
			||||||
  const LoaderThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.colors,
 | 
					 | 
				
			||||||
    required super.stroke,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [LoaderThemeExtensionDefault] from a [ThemeData]
 | 
					 | 
				
			||||||
  /// and opinionated defaults.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension_default}
 | 
					 | 
				
			||||||
  factory LoaderThemeExtensionDefault.from(ThemeData theme) =>
 | 
					 | 
				
			||||||
      LoaderThemeExtensionDefault(
 | 
					 | 
				
			||||||
        colors: MultiColor([
 | 
					 | 
				
			||||||
          theme.progressIndicatorTheme.color ?? theme.colorScheme.primary,
 | 
					 | 
				
			||||||
          Colors.transparent,
 | 
					 | 
				
			||||||
        ]),
 | 
					 | 
				
			||||||
        stroke: 4,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [LoaderThemeExtensionDefault] from a dark [ThemeData]
 | 
					 | 
				
			||||||
  factory LoaderThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      LoaderThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [LoaderThemeExtensionDefault] from a light [ThemeData]
 | 
					 | 
				
			||||||
  factory LoaderThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      LoaderThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,73 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/theme_extensions/rich_text_builder_theme_extension.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class RichTextBuilderThemeExtensionDefault
 | 
					 | 
				
			||||||
    extends RichTextBuilderThemeExtension {
 | 
					 | 
				
			||||||
  const RichTextBuilderThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.defaultStyle,
 | 
					 | 
				
			||||||
    required super.styles,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [RichTextBuilderThemeExtensionDefault] from a [ThemeData]
 | 
					 | 
				
			||||||
  /// and opinionated defaults.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension_default}
 | 
					 | 
				
			||||||
  factory RichTextBuilderThemeExtensionDefault.from(ThemeData theme) =>
 | 
					 | 
				
			||||||
      RichTextBuilderThemeExtensionDefault(
 | 
					 | 
				
			||||||
        defaultStyle: theme.textTheme.bodyMedium,
 | 
					 | 
				
			||||||
        styles: {
 | 
					 | 
				
			||||||
          'blue': theme.textTheme.bodyMedium?.copyWith(
 | 
					 | 
				
			||||||
                color: Colors.blue,
 | 
					 | 
				
			||||||
              ) ??
 | 
					 | 
				
			||||||
              const TextStyle(
 | 
					 | 
				
			||||||
                color: Colors.blue,
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
          'red': theme.textTheme.bodyMedium?.copyWith(
 | 
					 | 
				
			||||||
                color: Colors.red,
 | 
					 | 
				
			||||||
              ) ??
 | 
					 | 
				
			||||||
              const TextStyle(
 | 
					 | 
				
			||||||
                color: Colors.red,
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
          'green': theme.textTheme.bodyMedium?.copyWith(
 | 
					 | 
				
			||||||
                color: Colors.green,
 | 
					 | 
				
			||||||
              ) ??
 | 
					 | 
				
			||||||
              const TextStyle(
 | 
					 | 
				
			||||||
                color: Colors.green,
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
          'bold': theme.textTheme.bodyMedium?.copyWith(
 | 
					 | 
				
			||||||
                fontWeight: FontWeight.bold,
 | 
					 | 
				
			||||||
              ) ??
 | 
					 | 
				
			||||||
              const TextStyle(
 | 
					 | 
				
			||||||
                fontWeight: FontWeight.bold,
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
          'italic': theme.textTheme.bodyMedium?.copyWith(
 | 
					 | 
				
			||||||
                fontStyle: FontStyle.italic,
 | 
					 | 
				
			||||||
              ) ??
 | 
					 | 
				
			||||||
              const TextStyle(fontStyle: FontStyle.italic),
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [RichTextBuilderThemeExtensionDefault] from a dark [ThemeData]
 | 
					 | 
				
			||||||
  factory RichTextBuilderThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      RichTextBuilderThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [RichTextBuilderThemeExtensionDefault] from a light [ThemeData]
 | 
					 | 
				
			||||||
  factory RichTextBuilderThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      RichTextBuilderThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,97 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/text_inputs/text_input_style.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/theme_extensions/text_input_theme_extension.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template text_input_theme_extension_default}
 | 
					 | 
				
			||||||
/// The default implementation of [TextInputThemeExtension].
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class TextInputThemeExtensionDefault extends TextInputThemeExtension {
 | 
					 | 
				
			||||||
  /// {@macro text_input_theme_extension_default}
 | 
					 | 
				
			||||||
  const TextInputThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.normalStyle,
 | 
					 | 
				
			||||||
    required super.focusedStyle,
 | 
					 | 
				
			||||||
    required super.disabledStyle,
 | 
					 | 
				
			||||||
    required super.invalidStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TextInputThemeExtensionDefault] from a [ThemeData].
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro text_input_theme_extension_default}
 | 
					 | 
				
			||||||
  factory TextInputThemeExtensionDefault.from(ThemeData theme) {
 | 
					 | 
				
			||||||
    final labelStyle = theme.textTheme.labelLarge
 | 
					 | 
				
			||||||
        ?.copyWith(color: theme.unselectedWidgetColor);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final hintStyle = theme.textTheme.labelLarge;
 | 
					 | 
				
			||||||
    final prefixStyle = theme.textTheme.bodyMedium;
 | 
					 | 
				
			||||||
    final suffixStyle = theme.textTheme.bodyMedium;
 | 
					 | 
				
			||||||
    final inputStyle = theme.textTheme.bodyMedium;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final iconColor = theme.colorScheme.inversePrimary;
 | 
					 | 
				
			||||||
    final prefixIconColor = theme.unselectedWidgetColor;
 | 
					 | 
				
			||||||
    final suffixIconColor = theme.unselectedWidgetColor;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final borderColors = theme.unselectedWidgetColor;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    final style = TextInputStyle(
 | 
					 | 
				
			||||||
      labelStyle: labelStyle,
 | 
					 | 
				
			||||||
      hintStyle: hintStyle,
 | 
					 | 
				
			||||||
      iconColor: iconColor,
 | 
					 | 
				
			||||||
      prefixIconColor: prefixIconColor,
 | 
					 | 
				
			||||||
      prefixStyle: prefixStyle,
 | 
					 | 
				
			||||||
      suffixStyle: suffixStyle,
 | 
					 | 
				
			||||||
      suffixIconColor: suffixIconColor,
 | 
					 | 
				
			||||||
      borderColors: borderColors,
 | 
					 | 
				
			||||||
      inputStyle: inputStyle,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return TextInputThemeExtensionDefault(
 | 
					 | 
				
			||||||
      normalStyle: style,
 | 
					 | 
				
			||||||
      focusedStyle: style.copyWith(
 | 
					 | 
				
			||||||
        prefixIconColor: theme.colorScheme.primary,
 | 
					 | 
				
			||||||
        suffixIconColor: theme.colorScheme.primary,
 | 
					 | 
				
			||||||
        iconColor: theme.colorScheme.primary,
 | 
					 | 
				
			||||||
        borderColors: theme.colorScheme.primary,
 | 
					 | 
				
			||||||
        labelStyle: labelStyle?.copyWith(color: theme.colorScheme.primary),
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      disabledStyle: style.copyWith(
 | 
					 | 
				
			||||||
        labelStyle: labelStyle?.copyWith(color: theme.disabledColor),
 | 
					 | 
				
			||||||
        hintStyle: hintStyle?.copyWith(color: theme.disabledColor),
 | 
					 | 
				
			||||||
        prefixStyle: prefixStyle?.copyWith(color: theme.disabledColor),
 | 
					 | 
				
			||||||
        suffixStyle: suffixStyle?.copyWith(color: theme.disabledColor),
 | 
					 | 
				
			||||||
        inputStyle: inputStyle?.copyWith(color: theme.disabledColor),
 | 
					 | 
				
			||||||
        borderColors: theme.disabledColor,
 | 
					 | 
				
			||||||
        prefixIconColor: theme.disabledColor,
 | 
					 | 
				
			||||||
        suffixIconColor: theme.disabledColor,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      invalidStyle: style.copyWith(
 | 
					 | 
				
			||||||
        labelStyle: theme.textTheme.labelLarge
 | 
					 | 
				
			||||||
            ?.copyWith(color: theme.colorScheme.error),
 | 
					 | 
				
			||||||
        borderColors: theme.colorScheme.error,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TextInputThemeExtensionDefault] from a [ThemeData.light].
 | 
					 | 
				
			||||||
  factory TextInputThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      TextInputThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TextInputThemeExtensionDefault] from a [ThemeData.dark].
 | 
					 | 
				
			||||||
  factory TextInputThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      TextInputThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,54 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class TopBarThemeExtensionDefault extends TopBarThemeExtension {
 | 
					 | 
				
			||||||
  const TopBarThemeExtensionDefault({
 | 
					 | 
				
			||||||
    required super.iconTheme,
 | 
					 | 
				
			||||||
    required super.backgroundColors,
 | 
					 | 
				
			||||||
    required super.titleStyle,
 | 
					 | 
				
			||||||
    required super.subtitleStyle,
 | 
					 | 
				
			||||||
    required super.selectedIndicatorColors,
 | 
					 | 
				
			||||||
    required super.selectedIndicatorSize,
 | 
					 | 
				
			||||||
    required super.dividerColor,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TopBarThemeExtensionDefault] from a [ThemeData]
 | 
					 | 
				
			||||||
  /// and opinionated defaults.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension_default}
 | 
					 | 
				
			||||||
  factory TopBarThemeExtensionDefault.from(ThemeData theme) =>
 | 
					 | 
				
			||||||
      TopBarThemeExtensionDefault(
 | 
					 | 
				
			||||||
        backgroundColors: MultiColor.single(theme.appBarTheme.backgroundColor),
 | 
					 | 
				
			||||||
        titleStyle:
 | 
					 | 
				
			||||||
            theme.appBarTheme.titleTextStyle ?? theme.textTheme.titleMedium,
 | 
					 | 
				
			||||||
        subtitleStyle: theme.textTheme.bodyMedium,
 | 
					 | 
				
			||||||
        selectedIndicatorColors: MultiColor.single(theme.colorScheme.primary),
 | 
					 | 
				
			||||||
        selectedIndicatorSize: const Size(70, 5),
 | 
					 | 
				
			||||||
        iconTheme: theme.iconTheme,
 | 
					 | 
				
			||||||
        dividerColor: theme.colorScheme.onSurface.withOpacity(0.12),
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TopBarThemeExtensionDefault] from a dark [ThemeData]
 | 
					 | 
				
			||||||
  factory TopBarThemeExtensionDefault.dark() =>
 | 
					 | 
				
			||||||
      TopBarThemeExtensionDefault.from(ThemeData.dark());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Creates a [TopBarThemeExtensionDefault] from a light [ThemeData]
 | 
					 | 
				
			||||||
  factory TopBarThemeExtensionDefault.light() =>
 | 
					 | 
				
			||||||
      TopBarThemeExtensionDefault.from(ThemeData.light());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -15,4 +15,3 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export './entities/entities.dart';
 | 
					export './entities/entities.dart';
 | 
				
			||||||
export './theme_extensions/theme_extensions.dart';
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -17,11 +17,7 @@
 | 
				
			|||||||
import 'package:flutter/foundation.dart';
 | 
					import 'package:flutter/foundation.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template button_component}
 | 
					 | 
				
			||||||
/// A button component is a component that can be pressed.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
abstract class ButtonComponent extends Component {
 | 
					abstract class ButtonComponent extends Component {
 | 
				
			||||||
  /// {@macro button_component}
 | 
					 | 
				
			||||||
  const ButtonComponent({
 | 
					  const ButtonComponent({
 | 
				
			||||||
    this.disabledStyle,
 | 
					    this.disabledStyle,
 | 
				
			||||||
    this.normalStyle,
 | 
					    this.normalStyle,
 | 
				
			||||||
 | 
				
			|||||||
@ -18,11 +18,7 @@ import 'package:flutter/widgets.dart';
 | 
				
			|||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/theme_style.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/theme_style.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template button_style}
 | 
					 | 
				
			||||||
/// Base class for button styles.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
abstract class ButtonStyle<T> extends ThemeStyle<T> {
 | 
					abstract class ButtonStyle<T> extends ThemeStyle<T> {
 | 
				
			||||||
  /// {@macro button_style}
 | 
					 | 
				
			||||||
  const ButtonStyle({
 | 
					  const ButtonStyle({
 | 
				
			||||||
    this.radius,
 | 
					    this.radius,
 | 
				
			||||||
    this.padding,
 | 
					    this.padding,
 | 
				
			||||||
@ -31,7 +27,6 @@ abstract class ButtonStyle<T> extends ThemeStyle<T> {
 | 
				
			|||||||
    this.borderColors,
 | 
					    this.borderColors,
 | 
				
			||||||
    this.stroke,
 | 
					    this.stroke,
 | 
				
			||||||
    this.shadow,
 | 
					    this.shadow,
 | 
				
			||||||
    this.animationDuration,
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Button radius
 | 
					  /// Button radius
 | 
				
			||||||
@ -69,15 +64,9 @@ abstract class ButtonStyle<T> extends ThemeStyle<T> {
 | 
				
			|||||||
  /// Default to `null`
 | 
					  /// Default to `null`
 | 
				
			||||||
  final BoxShadow? shadow;
 | 
					  final BoxShadow? shadow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Animation duration
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Duration.zero`
 | 
					 | 
				
			||||||
  final Duration? animationDuration;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  String toString() =>
 | 
					  String toString() =>
 | 
				
			||||||
      'ButtonStyle(radius: $radius, padding: $padding, foregroundColors: '
 | 
					      'ButtonStyle(radius: $radius, padding: $padding, foregroundColors: '
 | 
				
			||||||
      '$foregroundColors, backgroundColors: $backgroundColors, borderColors: '
 | 
					      '$foregroundColors, backgroundColors: $backgroundColors, borderColors: '
 | 
				
			||||||
      '$borderColors, stroke: $stroke, shadow: $shadow, '
 | 
					      '$borderColors, stroke: $stroke, shadow: $shadow)';
 | 
				
			||||||
      'animationDuration: $animationDuration)';
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -24,10 +24,10 @@ part 'file_selection_button_component.g.dart';
 | 
				
			|||||||
abstract class FileSelectionButtonComponent extends ButtonComponent
 | 
					abstract class FileSelectionButtonComponent extends ButtonComponent
 | 
				
			||||||
    with CopyWithMixin<$FileSelectionButtonComponentCWProxy> {
 | 
					    with CopyWithMixin<$FileSelectionButtonComponentCWProxy> {
 | 
				
			||||||
  const FileSelectionButtonComponent({
 | 
					  const FileSelectionButtonComponent({
 | 
				
			||||||
    this.mainAxisSize,
 | 
					    this.mainAxisSize = MainAxisSize.min,
 | 
				
			||||||
    this.leading,
 | 
					    this.leading,
 | 
				
			||||||
    this.title,
 | 
					    this.title,
 | 
				
			||||||
    this.subtitle,
 | 
					    this.subTitle,
 | 
				
			||||||
    super.disabledStyle,
 | 
					    super.disabledStyle,
 | 
				
			||||||
    super.normalStyle,
 | 
					    super.normalStyle,
 | 
				
			||||||
    super.hoveredStyle,
 | 
					    super.hoveredStyle,
 | 
				
			||||||
@ -64,15 +64,8 @@ abstract class FileSelectionButtonComponent extends ButtonComponent
 | 
				
			|||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FileSelectionButtonStyle? get invalidStyle;
 | 
					  FileSelectionButtonStyle? get invalidStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// The main axis size of the button
 | 
					 | 
				
			||||||
  final MainAxisSize? mainAxisSize;
 | 
					  final MainAxisSize? mainAxisSize;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The leading widget of the button
 | 
					 | 
				
			||||||
  final Widget? leading;
 | 
					  final Widget? leading;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The title of the button
 | 
					 | 
				
			||||||
  final TextWrapper? title;
 | 
					  final TextWrapper? title;
 | 
				
			||||||
 | 
					  final TextWrapper? subTitle;
 | 
				
			||||||
  /// The subtitle of the button
 | 
					 | 
				
			||||||
  final TextWrapper? subtitle;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ abstract class $FileSelectionButtonComponentCWProxy {
 | 
				
			|||||||
  FileSelectionButtonComponent mainAxisSize(MainAxisSize? mainAxisSize);
 | 
					  FileSelectionButtonComponent mainAxisSize(MainAxisSize? mainAxisSize);
 | 
				
			||||||
  FileSelectionButtonComponent leading(Widget? leading);
 | 
					  FileSelectionButtonComponent leading(Widget? leading);
 | 
				
			||||||
  FileSelectionButtonComponent title(TextWrapper? title);
 | 
					  FileSelectionButtonComponent title(TextWrapper? title);
 | 
				
			||||||
  FileSelectionButtonComponent subtitle(TextWrapper? subtitle);
 | 
					  FileSelectionButtonComponent subTitle(TextWrapper? subTitle);
 | 
				
			||||||
  FileSelectionButtonComponent disabledStyle(
 | 
					  FileSelectionButtonComponent disabledStyle(
 | 
				
			||||||
      ButtonStyle<dynamic>? disabledStyle);
 | 
					      ButtonStyle<dynamic>? disabledStyle);
 | 
				
			||||||
  FileSelectionButtonComponent normalStyle(ButtonStyle<dynamic>? normalStyle);
 | 
					  FileSelectionButtonComponent normalStyle(ButtonStyle<dynamic>? normalStyle);
 | 
				
			||||||
@ -30,7 +30,7 @@ abstract class $FileSelectionButtonComponentCWProxy {
 | 
				
			|||||||
    MainAxisSize? mainAxisSize,
 | 
					    MainAxisSize? mainAxisSize,
 | 
				
			||||||
    Widget? leading,
 | 
					    Widget? leading,
 | 
				
			||||||
    TextWrapper? title,
 | 
					    TextWrapper? title,
 | 
				
			||||||
    TextWrapper? subtitle,
 | 
					    TextWrapper? subTitle,
 | 
				
			||||||
    ButtonStyle<dynamic>? disabledStyle,
 | 
					    ButtonStyle<dynamic>? disabledStyle,
 | 
				
			||||||
    ButtonStyle<dynamic>? normalStyle,
 | 
					    ButtonStyle<dynamic>? normalStyle,
 | 
				
			||||||
    ButtonStyle<dynamic>? hoveredStyle,
 | 
					    ButtonStyle<dynamic>? hoveredStyle,
 | 
				
			||||||
 | 
				
			|||||||
@ -16,21 +16,14 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'dart:ui';
 | 
					import 'dart:ui';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/foundation.dart';
 | 
					 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template file_selection_button_style}
 | 
					 | 
				
			||||||
/// File selection button style.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// This style is used for the FileSelectionButton widget.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
					class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			||||||
  /// {@macro file_selection_button_style}
 | 
					 | 
				
			||||||
  const FileSelectionButtonStyle({
 | 
					  const FileSelectionButtonStyle({
 | 
				
			||||||
    this.titleStyle,
 | 
					    this.title,
 | 
				
			||||||
    this.subtitleStyle,
 | 
					    this.subTitle,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.foregroundColors,
 | 
					    super.foregroundColors,
 | 
				
			||||||
@ -38,7 +31,6 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.stroke,
 | 
					    super.stroke,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.animationDuration,
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Merges non-null `b` attributes in `a`
 | 
					  /// Merges non-null `b` attributes in `a`
 | 
				
			||||||
@ -54,8 +46,8 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return a.copyWith(
 | 
					    return a.copyWith(
 | 
				
			||||||
      titleStyle: b.titleStyle,
 | 
					      title: b.title,
 | 
				
			||||||
      subtitleStyle: b.subtitleStyle,
 | 
					      subTitle: b.subTitle,
 | 
				
			||||||
      radius: b.radius,
 | 
					      radius: b.radius,
 | 
				
			||||||
      padding: b.padding,
 | 
					      padding: b.padding,
 | 
				
			||||||
      foregroundColors: b.foregroundColors,
 | 
					      foregroundColors: b.foregroundColors,
 | 
				
			||||||
@ -63,7 +55,6 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
      borderColors: b.borderColors,
 | 
					      borderColors: b.borderColors,
 | 
				
			||||||
      stroke: b.stroke,
 | 
					      stroke: b.stroke,
 | 
				
			||||||
      shadow: b.shadow,
 | 
					      shadow: b.shadow,
 | 
				
			||||||
      animationDuration: b.animationDuration,
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -78,8 +69,8 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    // b.copyWith to return b attributes even if they are not lerped
 | 
					    // b.copyWith to return b attributes even if they are not lerped
 | 
				
			||||||
    return b.copyWith(
 | 
					    return b.copyWith(
 | 
				
			||||||
      titleStyle: TextStyle.lerp(a.titleStyle, b.titleStyle, t),
 | 
					      title: TextStyle.lerp(a.title, b.title, t),
 | 
				
			||||||
      subtitleStyle: TextStyle.lerp(a.subtitleStyle, b.subtitleStyle, t),
 | 
					      subTitle: TextStyle.lerp(a.title, b.title, t),
 | 
				
			||||||
      foregroundColors: MultiColor.lerp(
 | 
					      foregroundColors: MultiColor.lerp(
 | 
				
			||||||
        a.foregroundColors,
 | 
					        a.foregroundColors,
 | 
				
			||||||
        b.foregroundColors,
 | 
					        b.foregroundColors,
 | 
				
			||||||
@ -99,23 +90,18 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
					      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
				
			||||||
      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
					      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
				
			||||||
      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
					      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
				
			||||||
      animationDuration: lerpDuration(
 | 
					 | 
				
			||||||
        a.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        b.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        t,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Title text style
 | 
					  /// Title text style
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// Default to `TextTheme.labelLarge`
 | 
					  /// Default to `TextTheme.labelLarge`
 | 
				
			||||||
  final TextStyle? titleStyle;
 | 
					  final TextStyle? title;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Sub title text style
 | 
					  /// Sub title text style
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// Default to `TextTheme.labelSmall`
 | 
					  /// Default to `TextTheme.labelSmall`
 | 
				
			||||||
  final TextStyle? subtitleStyle;
 | 
					  final TextStyle? subTitle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FileSelectionButtonStyle? mergeWith(FileSelectionButtonStyle? other) =>
 | 
					  FileSelectionButtonStyle? mergeWith(FileSelectionButtonStyle? other) =>
 | 
				
			||||||
@ -123,8 +109,8 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FileSelectionButtonStyle? copyWith({
 | 
					  FileSelectionButtonStyle? copyWith({
 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					    TextStyle? title,
 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					    TextStyle? subTitle,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    BorderRadiusGeometry? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    EdgeInsetsGeometry? padding,
 | 
				
			||||||
    MultiColor? foregroundColors,
 | 
					    MultiColor? foregroundColors,
 | 
				
			||||||
@ -132,11 +118,10 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    double? stroke,
 | 
					    double? stroke,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    Duration? animationDuration,
 | 
					 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      FileSelectionButtonStyle(
 | 
					      FileSelectionButtonStyle(
 | 
				
			||||||
        titleStyle: titleStyle ?? this.titleStyle,
 | 
					        title: title ?? this.title,
 | 
				
			||||||
        subtitleStyle: subtitleStyle ?? this.subtitleStyle,
 | 
					        subTitle: subTitle ?? this.subTitle,
 | 
				
			||||||
        radius: radius ?? this.radius,
 | 
					        radius: radius ?? this.radius,
 | 
				
			||||||
        padding: padding ?? this.padding,
 | 
					        padding: padding ?? this.padding,
 | 
				
			||||||
        foregroundColors: foregroundColors ?? this.foregroundColors,
 | 
					        foregroundColors: foregroundColors ?? this.foregroundColors,
 | 
				
			||||||
@ -144,6 +129,5 @@ class FileSelectionButtonStyle extends ButtonStyle<FileSelectionButtonStyle> {
 | 
				
			|||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					        borderColors: borderColors ?? this.borderColors,
 | 
				
			||||||
        stroke: stroke ?? this.stroke,
 | 
					        stroke: stroke ?? this.stroke,
 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					        shadow: shadow ?? this.shadow,
 | 
				
			||||||
        animationDuration: animationDuration ?? this.animationDuration,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -54,15 +54,8 @@ abstract class FlatButtonComponent extends ButtonComponent
 | 
				
			|||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FlatButtonStyle? get tappedStyle;
 | 
					  FlatButtonStyle? get tappedStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// The main axis size of the button.
 | 
					 | 
				
			||||||
  final MainAxisSize? mainAxisSize;
 | 
					  final MainAxisSize? mainAxisSize;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The prefix widget of the button.
 | 
					 | 
				
			||||||
  final Widget? prefix;
 | 
					  final Widget? prefix;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The suffix widget of the button.
 | 
					 | 
				
			||||||
  final Widget? suffix;
 | 
					  final Widget? suffix;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The label widget of the button.
 | 
					 | 
				
			||||||
  final TextWrapper? label;
 | 
					  final TextWrapper? label;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,20 +16,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'dart:ui';
 | 
					import 'dart:ui';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/foundation.dart';
 | 
					 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template flat_button_style}
 | 
					 | 
				
			||||||
/// Flat button style.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// This style is used for the FlatButton widget.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
					class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			||||||
  /// {@macro flat_button_style}
 | 
					 | 
				
			||||||
  const FlatButtonStyle({
 | 
					  const FlatButtonStyle({
 | 
				
			||||||
    this.labelStyle,
 | 
					    this.label,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.foregroundColors,
 | 
					    super.foregroundColors,
 | 
				
			||||||
@ -37,7 +30,6 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.stroke,
 | 
					    super.stroke,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.animationDuration,
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Merges non-null `b` attributes in `a`
 | 
					  /// Merges non-null `b` attributes in `a`
 | 
				
			||||||
@ -53,7 +45,7 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return a.copyWith(
 | 
					    return a.copyWith(
 | 
				
			||||||
      labelStyle: b.labelStyle,
 | 
					      label: b.label,
 | 
				
			||||||
      radius: b.radius,
 | 
					      radius: b.radius,
 | 
				
			||||||
      padding: b.padding,
 | 
					      padding: b.padding,
 | 
				
			||||||
      foregroundColors: b.foregroundColors,
 | 
					      foregroundColors: b.foregroundColors,
 | 
				
			||||||
@ -61,7 +53,6 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
      borderColors: b.borderColors,
 | 
					      borderColors: b.borderColors,
 | 
				
			||||||
      stroke: b.stroke,
 | 
					      stroke: b.stroke,
 | 
				
			||||||
      shadow: b.shadow,
 | 
					      shadow: b.shadow,
 | 
				
			||||||
      animationDuration: b.animationDuration,
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -76,7 +67,7 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    // b.copyWith to return b attributes even if they are not lerped
 | 
					    // b.copyWith to return b attributes even if they are not lerped
 | 
				
			||||||
    return b.copyWith(
 | 
					    return b.copyWith(
 | 
				
			||||||
      labelStyle: TextStyle.lerp(a.labelStyle, b.labelStyle, t),
 | 
					      label: TextStyle.lerp(a.label, b.label, t),
 | 
				
			||||||
      foregroundColors: MultiColor.lerp(
 | 
					      foregroundColors: MultiColor.lerp(
 | 
				
			||||||
        a.foregroundColors,
 | 
					        a.foregroundColors,
 | 
				
			||||||
        b.foregroundColors,
 | 
					        b.foregroundColors,
 | 
				
			||||||
@ -96,18 +87,13 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
					      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
				
			||||||
      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
					      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
				
			||||||
      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
					      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
				
			||||||
      animationDuration: lerpDuration(
 | 
					 | 
				
			||||||
        a.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        b.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        t,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// labelStyle text style
 | 
					  /// Label text style
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// Default to `TextTheme.labelLarge`
 | 
					  /// Default to `TextTheme.labelLarge`
 | 
				
			||||||
  final TextStyle? labelStyle;
 | 
					  final TextStyle? label;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FlatButtonStyle? mergeWith(FlatButtonStyle? other) =>
 | 
					  FlatButtonStyle? mergeWith(FlatButtonStyle? other) =>
 | 
				
			||||||
@ -115,7 +101,7 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  FlatButtonStyle? copyWith({
 | 
					  FlatButtonStyle? copyWith({
 | 
				
			||||||
    TextStyle? labelStyle,
 | 
					    TextStyle? label,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    BorderRadiusGeometry? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    EdgeInsetsGeometry? padding,
 | 
				
			||||||
    MultiColor? foregroundColors,
 | 
					    MultiColor? foregroundColors,
 | 
				
			||||||
@ -123,10 +109,9 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    double? stroke,
 | 
					    double? stroke,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    Duration? animationDuration,
 | 
					 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      FlatButtonStyle(
 | 
					      FlatButtonStyle(
 | 
				
			||||||
        labelStyle: labelStyle ?? this.labelStyle,
 | 
					        label: label ?? this.label,
 | 
				
			||||||
        radius: radius ?? this.radius,
 | 
					        radius: radius ?? this.radius,
 | 
				
			||||||
        padding: padding ?? this.padding,
 | 
					        padding: padding ?? this.padding,
 | 
				
			||||||
        foregroundColors: foregroundColors ?? this.foregroundColors,
 | 
					        foregroundColors: foregroundColors ?? this.foregroundColors,
 | 
				
			||||||
@ -134,6 +119,5 @@ class FlatButtonStyle extends ButtonStyle<FlatButtonStyle> {
 | 
				
			|||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					        borderColors: borderColors ?? this.borderColors,
 | 
				
			||||||
        stroke: stroke ?? this.stroke,
 | 
					        stroke: stroke ?? this.stroke,
 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					        shadow: shadow ?? this.shadow,
 | 
				
			||||||
        animationDuration: animationDuration ?? this.animationDuration,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -51,6 +51,5 @@ abstract class SimpleIconButtonComponent extends ButtonComponent
 | 
				
			|||||||
  @override
 | 
					  @override
 | 
				
			||||||
  SimpleIconButtonStyle? get tappedStyle;
 | 
					  SimpleIconButtonStyle? get tappedStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// The icon to display inside the button.
 | 
					  final Icon? icon;
 | 
				
			||||||
  final Widget? icon;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ part of 'simple_icon_button_component.dart';
 | 
				
			|||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class $SimpleIconButtonComponentCWProxy {
 | 
					abstract class $SimpleIconButtonComponentCWProxy {
 | 
				
			||||||
  SimpleIconButtonComponent icon(Widget? icon);
 | 
					  SimpleIconButtonComponent icon(Icon? icon);
 | 
				
			||||||
  SimpleIconButtonComponent disabledStyle(ButtonStyle<dynamic>? disabledStyle);
 | 
					  SimpleIconButtonComponent disabledStyle(ButtonStyle<dynamic>? disabledStyle);
 | 
				
			||||||
  SimpleIconButtonComponent normalStyle(ButtonStyle<dynamic>? normalStyle);
 | 
					  SimpleIconButtonComponent normalStyle(ButtonStyle<dynamic>? normalStyle);
 | 
				
			||||||
  SimpleIconButtonComponent hoveredStyle(ButtonStyle<dynamic>? hoveredStyle);
 | 
					  SimpleIconButtonComponent hoveredStyle(ButtonStyle<dynamic>? hoveredStyle);
 | 
				
			||||||
@ -19,7 +19,7 @@ abstract class $SimpleIconButtonComponentCWProxy {
 | 
				
			|||||||
      ThemeResolver<dynamic, dynamic, dynamic>? themeResolver);
 | 
					      ThemeResolver<dynamic, dynamic, dynamic>? themeResolver);
 | 
				
			||||||
  SimpleIconButtonComponent key(Key? key);
 | 
					  SimpleIconButtonComponent key(Key? key);
 | 
				
			||||||
  SimpleIconButtonComponent call({
 | 
					  SimpleIconButtonComponent call({
 | 
				
			||||||
    Widget? icon,
 | 
					    Icon? icon,
 | 
				
			||||||
    ButtonStyle<dynamic>? disabledStyle,
 | 
					    ButtonStyle<dynamic>? disabledStyle,
 | 
				
			||||||
    ButtonStyle<dynamic>? normalStyle,
 | 
					    ButtonStyle<dynamic>? normalStyle,
 | 
				
			||||||
    ButtonStyle<dynamic>? hoveredStyle,
 | 
					    ButtonStyle<dynamic>? hoveredStyle,
 | 
				
			||||||
 | 
				
			|||||||
@ -16,18 +16,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'dart:ui';
 | 
					import 'dart:ui';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/foundation.dart';
 | 
					 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template simple_icon_button_style}
 | 
					 | 
				
			||||||
/// Simple icon button style.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// This style is used for the SimpleIconButton widget.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
					class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			||||||
  /// {@macro simple_icon_button_style}
 | 
					 | 
				
			||||||
  const SimpleIconButtonStyle({
 | 
					  const SimpleIconButtonStyle({
 | 
				
			||||||
    this.dimension,
 | 
					    this.dimension,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
@ -37,7 +30,6 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			|||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.stroke,
 | 
					    super.stroke,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.animationDuration,
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Merges non-null `b` attributes in `a`
 | 
					  /// Merges non-null `b` attributes in `a`
 | 
				
			||||||
@ -61,7 +53,6 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			|||||||
      borderColors: b.borderColors,
 | 
					      borderColors: b.borderColors,
 | 
				
			||||||
      stroke: b.stroke,
 | 
					      stroke: b.stroke,
 | 
				
			||||||
      shadow: b.shadow,
 | 
					      shadow: b.shadow,
 | 
				
			||||||
      animationDuration: b.animationDuration,
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -96,11 +87,6 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			|||||||
      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
					      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
				
			||||||
      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
					      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
				
			||||||
      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
					      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
				
			||||||
      animationDuration: lerpDuration(
 | 
					 | 
				
			||||||
        a.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        b.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        t,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -123,7 +109,6 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			|||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    double? stroke,
 | 
					    double? stroke,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    Duration? animationDuration,
 | 
					 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      SimpleIconButtonStyle(
 | 
					      SimpleIconButtonStyle(
 | 
				
			||||||
        dimension: dimension ?? this.dimension,
 | 
					        dimension: dimension ?? this.dimension,
 | 
				
			||||||
@ -134,6 +119,5 @@ class SimpleIconButtonStyle extends ButtonStyle<SimpleIconButtonStyle> {
 | 
				
			|||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					        borderColors: borderColors ?? this.borderColors,
 | 
				
			||||||
        stroke: stroke ?? this.stroke,
 | 
					        stroke: stroke ?? this.stroke,
 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					        shadow: shadow ?? this.shadow,
 | 
				
			||||||
        animationDuration: animationDuration ?? this.animationDuration,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@ part 'symbol_button_component.g.dart';
 | 
				
			|||||||
abstract class SymbolButtonComponent extends ButtonComponent
 | 
					abstract class SymbolButtonComponent extends ButtonComponent
 | 
				
			||||||
    with CopyWithMixin<$SymbolButtonComponentCWProxy> {
 | 
					    with CopyWithMixin<$SymbolButtonComponentCWProxy> {
 | 
				
			||||||
  const SymbolButtonComponent({
 | 
					  const SymbolButtonComponent({
 | 
				
			||||||
    this.mainAxisSize,
 | 
					    this.mainAxisSize = MainAxisSize.min,
 | 
				
			||||||
    this.label,
 | 
					    this.label,
 | 
				
			||||||
    this.icon,
 | 
					    this.icon,
 | 
				
			||||||
    super.disabledStyle,
 | 
					    super.disabledStyle,
 | 
				
			||||||
@ -57,12 +57,7 @@ abstract class SymbolButtonComponent extends ButtonComponent
 | 
				
			|||||||
  @override
 | 
					  @override
 | 
				
			||||||
  SymbolButtonStyle? get selectedStyle;
 | 
					  SymbolButtonStyle? get selectedStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// The main axis size of the button.
 | 
					 | 
				
			||||||
  final MainAxisSize? mainAxisSize;
 | 
					  final MainAxisSize? mainAxisSize;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The icon widget of the button.
 | 
					 | 
				
			||||||
  final Widget? icon;
 | 
					  final Widget? icon;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The label widget of the button.
 | 
					 | 
				
			||||||
  final TextWrapper? label;
 | 
					  final TextWrapper? label;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,20 +16,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'dart:ui';
 | 
					import 'dart:ui';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/foundation.dart';
 | 
					 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/buttons/button_style.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template symbol_button_style}
 | 
					 | 
				
			||||||
/// Symbol button style.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// This style is used for the SymbolButton widget.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
					class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			||||||
  /// {@macro symbol_button_style}
 | 
					 | 
				
			||||||
  const SymbolButtonStyle({
 | 
					  const SymbolButtonStyle({
 | 
				
			||||||
    this.labelStyle,
 | 
					    this.label,
 | 
				
			||||||
    this.dimension,
 | 
					    this.dimension,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
@ -38,7 +31,6 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.stroke,
 | 
					    super.stroke,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.animationDuration,
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Merges non-null `b` attributes in `a`
 | 
					  /// Merges non-null `b` attributes in `a`
 | 
				
			||||||
@ -54,7 +46,7 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return a.copyWith(
 | 
					    return a.copyWith(
 | 
				
			||||||
      labelStyle: b.labelStyle,
 | 
					      label: b.label,
 | 
				
			||||||
      dimension: b.dimension,
 | 
					      dimension: b.dimension,
 | 
				
			||||||
      radius: b.radius,
 | 
					      radius: b.radius,
 | 
				
			||||||
      padding: b.padding,
 | 
					      padding: b.padding,
 | 
				
			||||||
@ -63,7 +55,6 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
      borderColors: b.borderColors,
 | 
					      borderColors: b.borderColors,
 | 
				
			||||||
      stroke: b.stroke,
 | 
					      stroke: b.stroke,
 | 
				
			||||||
      shadow: b.shadow,
 | 
					      shadow: b.shadow,
 | 
				
			||||||
      animationDuration: b.animationDuration,
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -78,7 +69,7 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    // b.copyWith to return b attributes even if they are not lerped
 | 
					    // b.copyWith to return b attributes even if they are not lerped
 | 
				
			||||||
    return b.copyWith(
 | 
					    return b.copyWith(
 | 
				
			||||||
      labelStyle: TextStyle.lerp(a.labelStyle, b.labelStyle, t),
 | 
					      label: TextStyle.lerp(a.label, b.label, t),
 | 
				
			||||||
      dimension: lerpDouble(a.dimension, b.dimension, t),
 | 
					      dimension: lerpDouble(a.dimension, b.dimension, t),
 | 
				
			||||||
      foregroundColors: MultiColor.lerp(
 | 
					      foregroundColors: MultiColor.lerp(
 | 
				
			||||||
        a.foregroundColors,
 | 
					        a.foregroundColors,
 | 
				
			||||||
@ -99,18 +90,13 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
					      padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
 | 
				
			||||||
      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
					      stroke: lerpDouble(a.stroke, b.stroke, t),
 | 
				
			||||||
      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
					      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
				
			||||||
      animationDuration: lerpDuration(
 | 
					 | 
				
			||||||
        a.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        b.animationDuration ?? Duration.zero,
 | 
					 | 
				
			||||||
        t,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// labelStyle text style
 | 
					  /// Label text style
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// Default to `TextTheme.labelLarge`
 | 
					  /// Default to `TextTheme.labelLarge`
 | 
				
			||||||
  final TextStyle? labelStyle;
 | 
					  final TextStyle? label;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Dimension of this button (as a square)
 | 
					  /// Dimension of this button (as a square)
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
@ -123,7 +109,7 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  SymbolButtonStyle? copyWith({
 | 
					  SymbolButtonStyle? copyWith({
 | 
				
			||||||
    TextStyle? labelStyle,
 | 
					    TextStyle? label,
 | 
				
			||||||
    double? dimension,
 | 
					    double? dimension,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    BorderRadiusGeometry? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    EdgeInsetsGeometry? padding,
 | 
				
			||||||
@ -132,10 +118,9 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    double? stroke,
 | 
					    double? stroke,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    Duration? animationDuration,
 | 
					 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      SymbolButtonStyle(
 | 
					      SymbolButtonStyle(
 | 
				
			||||||
        labelStyle: labelStyle ?? this.labelStyle,
 | 
					        label: label ?? this.label,
 | 
				
			||||||
        dimension: dimension ?? this.dimension,
 | 
					        dimension: dimension ?? this.dimension,
 | 
				
			||||||
        radius: radius ?? this.radius,
 | 
					        radius: radius ?? this.radius,
 | 
				
			||||||
        padding: padding ?? this.padding,
 | 
					        padding: padding ?? this.padding,
 | 
				
			||||||
@ -144,6 +129,5 @@ class SymbolButtonStyle extends ButtonStyle<SymbolButtonStyle> {
 | 
				
			|||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					        borderColors: borderColors ?? this.borderColors,
 | 
				
			||||||
        stroke: stroke ?? this.stroke,
 | 
					        stroke: stroke ?? this.stroke,
 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					        shadow: shadow ?? this.shadow,
 | 
				
			||||||
        animationDuration: animationDuration ?? this.animationDuration,
 | 
					 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -18,81 +18,43 @@ import 'package:flutter/widgets.dart';
 | 
				
			|||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/component.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template card_component}
 | 
					 | 
				
			||||||
/// Card component.
 | 
					 | 
				
			||||||
/// Used to display a card with a background and a shadow.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
abstract class CardComponent extends Component {
 | 
					abstract class CardComponent extends Component {
 | 
				
			||||||
  const CardComponent({
 | 
					  const CardComponent({
 | 
				
			||||||
    this.radius,
 | 
					    this.radius = 12,
 | 
				
			||||||
    this.padding,
 | 
					    this.padding = 25,
 | 
				
			||||||
    this.backgroundColors,
 | 
					 | 
				
			||||||
    this.borderColors,
 | 
					    this.borderColors,
 | 
				
			||||||
    this.stroke,
 | 
					    this.backgroundColors,
 | 
				
			||||||
    this.minSize,
 | 
					    this.minSize = const Size(330, 230),
 | 
				
			||||||
    this.maxSize,
 | 
					    this.maxSize = const Size(330, 530),
 | 
				
			||||||
    this.shadow,
 | 
					    this.shadow = const BoxShadow(
 | 
				
			||||||
    this.titleStyle,
 | 
					      blurRadius: 30,
 | 
				
			||||||
    this.subtitleStyle,
 | 
					      offset: Offset(0, 5),
 | 
				
			||||||
    this.bodyStyle,
 | 
					      color: Color.fromRGBO(0, 0, 0, 0.05),
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
    this.background,
 | 
					    this.background,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Card radius
 | 
					  /// Card radius
 | 
				
			||||||
  ///
 | 
					  final double? radius;
 | 
				
			||||||
  /// Default to `BorderRadius.all(Radius.circular(12.0))`
 | 
					 | 
				
			||||||
  final BorderRadiusGeometry? radius;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Padding and gaps of this card
 | 
					  /// Padding and gaps of this card
 | 
				
			||||||
  ///
 | 
					  final double? padding;
 | 
				
			||||||
  /// Default to `Theme.cardTheme.margin`
 | 
					 | 
				
			||||||
  final EdgeInsetsGeometry? padding;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Card background gradient colors (from left to right)
 | 
					  /// Border gradient color (from left to right)
 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.cardTheme.color`
 | 
					 | 
				
			||||||
  final MultiColor? backgroundColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Border colors (from left to right).
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final MultiColor? borderColors;
 | 
					  final MultiColor? borderColors;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Stroke of the border
 | 
					  /// Card background color
 | 
				
			||||||
  ///
 | 
					  final MultiColor? backgroundColors;
 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final double? stroke;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Drop shadow
 | 
					  /// Minimum size for this card
 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final BoxShadow? shadow;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Minimum size of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `const Size(330, double.infinity)`
 | 
					 | 
				
			||||||
  final Size? minSize;
 | 
					  final Size? minSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Maximum size of the card
 | 
					  /// Maximum size for this card
 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `const Size(double.infinity, double.infinity)`
 | 
					 | 
				
			||||||
  final Size? maxSize;
 | 
					  final Size? maxSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Title text style
 | 
					  /// Drop shadow
 | 
				
			||||||
  ///
 | 
					  final BoxShadow? shadow;
 | 
				
			||||||
  /// Default to `Theme.textTheme.titleLarge`
 | 
					 | 
				
			||||||
  final TextStyle? titleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle text style
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.textTheme.titleMedium`
 | 
					 | 
				
			||||||
  final TextStyle? subtitleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Body text style
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.textTheme.bodyMedium`
 | 
					 | 
				
			||||||
  final TextStyle? bodyStyle;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Background of the card
 | 
					  /// Background of the card
 | 
				
			||||||
  final Widget? background;
 | 
					  final Widget? background;
 | 
				
			||||||
 | 
				
			|||||||
@ -14,9 +14,7 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export './card_component.dart';
 | 
					 | 
				
			||||||
export './information_card_component.dart';
 | 
					export './information_card_component.dart';
 | 
				
			||||||
export './portfolio_card_component.dart';
 | 
					export './portfolio_card_component.dart';
 | 
				
			||||||
export './pricing_card_component.dart';
 | 
					 | 
				
			||||||
export './quote_card_component.dart';
 | 
					export './quote_card_component.dart';
 | 
				
			||||||
export './skill_card_component.dart';
 | 
					export './skill_card_component.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
 | 
					import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'information_card_component.g.dart';
 | 
					part 'information_card_component.g.dart';
 | 
				
			||||||
@ -28,40 +29,21 @@ abstract class InformationCardComponent extends CardComponent
 | 
				
			|||||||
    this.title,
 | 
					    this.title,
 | 
				
			||||||
    this.subtitle,
 | 
					    this.subtitle,
 | 
				
			||||||
    this.body,
 | 
					    this.body,
 | 
				
			||||||
    this.axis,
 | 
					    this.axis = Axis.vertical,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.backgroundColors,
 | 
					    super.backgroundColors,
 | 
				
			||||||
    super.stroke,
 | 
					 | 
				
			||||||
    super.minSize,
 | 
					    super.minSize,
 | 
				
			||||||
    super.maxSize,
 | 
					    super.maxSize,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.titleStyle,
 | 
					 | 
				
			||||||
    super.subtitleStyle,
 | 
					 | 
				
			||||||
    super.bodyStyle,
 | 
					 | 
				
			||||||
    super.background,
 | 
					    super.background,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Axis of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// If [axis] is [Axis.horizontal] then only the first icon will be displayed.
 | 
					 | 
				
			||||||
  /// Used in header of the card.
 | 
					 | 
				
			||||||
  final Axis? axis;
 | 
					  final Axis? axis;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Icons of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// If [axis] is [Axis.horizontal] then only the first icon will be displayed
 | 
					 | 
				
			||||||
  /// on the left side of the card and the rest will be ignored.
 | 
					 | 
				
			||||||
  final List<Widget>? icons;
 | 
					  final List<Widget>? icons;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Title of the card
 | 
					 | 
				
			||||||
  final TextWrapper? title;
 | 
					  final TextWrapper? title;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle of the card
 | 
					 | 
				
			||||||
  final TextWrapper? subtitle;
 | 
					  final TextWrapper? subtitle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Body of the card
 | 
					 | 
				
			||||||
  final TextWrapper? body;
 | 
					  final TextWrapper? body;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -12,17 +12,13 @@ abstract class $InformationCardComponentCWProxy {
 | 
				
			|||||||
  InformationCardComponent subtitle(TextWrapper? subtitle);
 | 
					  InformationCardComponent subtitle(TextWrapper? subtitle);
 | 
				
			||||||
  InformationCardComponent body(TextWrapper? body);
 | 
					  InformationCardComponent body(TextWrapper? body);
 | 
				
			||||||
  InformationCardComponent axis(Axis? axis);
 | 
					  InformationCardComponent axis(Axis? axis);
 | 
				
			||||||
  InformationCardComponent radius(BorderRadiusGeometry? radius);
 | 
					  InformationCardComponent radius(double? radius);
 | 
				
			||||||
  InformationCardComponent padding(EdgeInsetsGeometry? padding);
 | 
					  InformationCardComponent padding(double? padding);
 | 
				
			||||||
  InformationCardComponent borderColors(MultiColor? borderColors);
 | 
					  InformationCardComponent borderColors(MultiColor? borderColors);
 | 
				
			||||||
  InformationCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
					  InformationCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
				
			||||||
  InformationCardComponent stroke(double? stroke);
 | 
					 | 
				
			||||||
  InformationCardComponent minSize(Size? minSize);
 | 
					  InformationCardComponent minSize(Size? minSize);
 | 
				
			||||||
  InformationCardComponent maxSize(Size? maxSize);
 | 
					  InformationCardComponent maxSize(Size? maxSize);
 | 
				
			||||||
  InformationCardComponent shadow(BoxShadow? shadow);
 | 
					  InformationCardComponent shadow(BoxShadow? shadow);
 | 
				
			||||||
  InformationCardComponent titleStyle(TextStyle? titleStyle);
 | 
					 | 
				
			||||||
  InformationCardComponent subtitleStyle(TextStyle? subtitleStyle);
 | 
					 | 
				
			||||||
  InformationCardComponent bodyStyle(TextStyle? bodyStyle);
 | 
					 | 
				
			||||||
  InformationCardComponent background(Widget? background);
 | 
					  InformationCardComponent background(Widget? background);
 | 
				
			||||||
  InformationCardComponent key(Key? key);
 | 
					  InformationCardComponent key(Key? key);
 | 
				
			||||||
  InformationCardComponent call({
 | 
					  InformationCardComponent call({
 | 
				
			||||||
@ -31,17 +27,13 @@ abstract class $InformationCardComponentCWProxy {
 | 
				
			|||||||
    TextWrapper? subtitle,
 | 
					    TextWrapper? subtitle,
 | 
				
			||||||
    TextWrapper? body,
 | 
					    TextWrapper? body,
 | 
				
			||||||
    Axis? axis,
 | 
					    Axis? axis,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    double? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    double? padding,
 | 
				
			||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					    MultiColor? backgroundColors,
 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Size? minSize,
 | 
					    Size? minSize,
 | 
				
			||||||
    Size? maxSize,
 | 
					    Size? maxSize,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    TextStyle? bodyStyle,
 | 
					 | 
				
			||||||
    Widget? background,
 | 
					    Widget? background,
 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
 | 
					import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'portfolio_card_component.g.dart';
 | 
					part 'portfolio_card_component.g.dart';
 | 
				
			||||||
@ -24,9 +25,9 @@ part 'portfolio_card_component.g.dart';
 | 
				
			|||||||
abstract class PortfolioCardComponent extends CardComponent
 | 
					abstract class PortfolioCardComponent extends CardComponent
 | 
				
			||||||
    with CopyWithMixin<$PortfolioCardComponentCWProxy> {
 | 
					    with CopyWithMixin<$PortfolioCardComponentCWProxy> {
 | 
				
			||||||
  const PortfolioCardComponent({
 | 
					  const PortfolioCardComponent({
 | 
				
			||||||
    this.showAssetsOnTop,
 | 
					    this.secondaryBackgroundColors,
 | 
				
			||||||
    this.keywords,
 | 
					    this.showImagesOnTop,
 | 
				
			||||||
    this.keywordsBackgroundColors,
 | 
					    this.keyword,
 | 
				
			||||||
    this.description,
 | 
					    this.description,
 | 
				
			||||||
    this.logo,
 | 
					    this.logo,
 | 
				
			||||||
    this.projectName,
 | 
					    this.projectName,
 | 
				
			||||||
@ -37,42 +38,20 @@ abstract class PortfolioCardComponent extends CardComponent
 | 
				
			|||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.backgroundColors,
 | 
					    super.backgroundColors,
 | 
				
			||||||
    super.stroke,
 | 
					 | 
				
			||||||
    super.minSize,
 | 
					    super.minSize,
 | 
				
			||||||
    super.maxSize,
 | 
					    super.maxSize,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.titleStyle,
 | 
					 | 
				
			||||||
    super.subtitleStyle,
 | 
					 | 
				
			||||||
    super.bodyStyle,
 | 
					 | 
				
			||||||
    super.background,
 | 
					    super.background,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Keywords of the portfolio
 | 
					  final bool? showImagesOnTop;
 | 
				
			||||||
  final List<TextWrapper>? keywords;
 | 
					  final List<TextWrapper>? keyword;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Background colors for the keywords badges
 | 
					 | 
				
			||||||
  final MultiColor? keywordsBackgroundColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Assets to display
 | 
					 | 
				
			||||||
  final List<Widget>? assets;
 | 
					  final List<Widget>? assets;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Whether to show the assets on top or on bottom
 | 
					 | 
				
			||||||
  /// of the card
 | 
					 | 
				
			||||||
  final bool? showAssetsOnTop;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Logo of the portfolio
 | 
					 | 
				
			||||||
  final Widget? logo;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Description of the portfolio
 | 
					 | 
				
			||||||
  final TextWrapper? description;
 | 
					  final TextWrapper? description;
 | 
				
			||||||
 | 
					  final Widget? logo;
 | 
				
			||||||
  /// Name of the portfolio
 | 
					 | 
				
			||||||
  final TextWrapper? projectName;
 | 
					  final TextWrapper? projectName;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle of the portfolio
 | 
					 | 
				
			||||||
  final TextWrapper? subtitle;
 | 
					  final TextWrapper? subtitle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Call to actions of the portfolio
 | 
					 | 
				
			||||||
  final List<Widget>? ctas;
 | 
					  final List<Widget>? ctas;
 | 
				
			||||||
 | 
					  final Color? secondaryBackgroundColors;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,50 +7,42 @@ part of 'portfolio_card_component.dart';
 | 
				
			|||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class $PortfolioCardComponentCWProxy {
 | 
					abstract class $PortfolioCardComponentCWProxy {
 | 
				
			||||||
  PortfolioCardComponent showAssetsOnTop(bool? showAssetsOnTop);
 | 
					  PortfolioCardComponent secondaryBackgroundColors(
 | 
				
			||||||
  PortfolioCardComponent keywords(List<TextWrapper>? keywords);
 | 
					      Color? secondaryBackgroundColors);
 | 
				
			||||||
  PortfolioCardComponent keywordsBackgroundColors(
 | 
					  PortfolioCardComponent showImagesOnTop(bool? showImagesOnTop);
 | 
				
			||||||
      MultiColor? keywordsBackgroundColors);
 | 
					  PortfolioCardComponent keyword(List<TextWrapper>? keyword);
 | 
				
			||||||
  PortfolioCardComponent description(TextWrapper? description);
 | 
					  PortfolioCardComponent description(TextWrapper? description);
 | 
				
			||||||
  PortfolioCardComponent logo(Widget? logo);
 | 
					  PortfolioCardComponent logo(Widget? logo);
 | 
				
			||||||
  PortfolioCardComponent projectName(TextWrapper? projectName);
 | 
					  PortfolioCardComponent projectName(TextWrapper? projectName);
 | 
				
			||||||
  PortfolioCardComponent subtitle(TextWrapper? subtitle);
 | 
					  PortfolioCardComponent subtitle(TextWrapper? subtitle);
 | 
				
			||||||
  PortfolioCardComponent ctas(List<Widget>? ctas);
 | 
					  PortfolioCardComponent ctas(List<Widget>? ctas);
 | 
				
			||||||
  PortfolioCardComponent assets(List<Widget>? assets);
 | 
					  PortfolioCardComponent assets(List<Widget>? assets);
 | 
				
			||||||
  PortfolioCardComponent radius(BorderRadiusGeometry? radius);
 | 
					  PortfolioCardComponent radius(double? radius);
 | 
				
			||||||
  PortfolioCardComponent padding(EdgeInsetsGeometry? padding);
 | 
					  PortfolioCardComponent padding(double? padding);
 | 
				
			||||||
  PortfolioCardComponent borderColors(MultiColor? borderColors);
 | 
					  PortfolioCardComponent borderColors(MultiColor? borderColors);
 | 
				
			||||||
  PortfolioCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
					  PortfolioCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
				
			||||||
  PortfolioCardComponent stroke(double? stroke);
 | 
					 | 
				
			||||||
  PortfolioCardComponent minSize(Size? minSize);
 | 
					  PortfolioCardComponent minSize(Size? minSize);
 | 
				
			||||||
  PortfolioCardComponent maxSize(Size? maxSize);
 | 
					  PortfolioCardComponent maxSize(Size? maxSize);
 | 
				
			||||||
  PortfolioCardComponent shadow(BoxShadow? shadow);
 | 
					  PortfolioCardComponent shadow(BoxShadow? shadow);
 | 
				
			||||||
  PortfolioCardComponent titleStyle(TextStyle? titleStyle);
 | 
					 | 
				
			||||||
  PortfolioCardComponent subtitleStyle(TextStyle? subtitleStyle);
 | 
					 | 
				
			||||||
  PortfolioCardComponent bodyStyle(TextStyle? bodyStyle);
 | 
					 | 
				
			||||||
  PortfolioCardComponent background(Widget? background);
 | 
					  PortfolioCardComponent background(Widget? background);
 | 
				
			||||||
  PortfolioCardComponent key(Key? key);
 | 
					  PortfolioCardComponent key(Key? key);
 | 
				
			||||||
  PortfolioCardComponent call({
 | 
					  PortfolioCardComponent call({
 | 
				
			||||||
    bool? showAssetsOnTop,
 | 
					    Color? secondaryBackgroundColors,
 | 
				
			||||||
    List<TextWrapper>? keywords,
 | 
					    bool? showImagesOnTop,
 | 
				
			||||||
    MultiColor? keywordsBackgroundColors,
 | 
					    List<TextWrapper>? keyword,
 | 
				
			||||||
    TextWrapper? description,
 | 
					    TextWrapper? description,
 | 
				
			||||||
    Widget? logo,
 | 
					    Widget? logo,
 | 
				
			||||||
    TextWrapper? projectName,
 | 
					    TextWrapper? projectName,
 | 
				
			||||||
    TextWrapper? subtitle,
 | 
					    TextWrapper? subtitle,
 | 
				
			||||||
    List<Widget>? ctas,
 | 
					    List<Widget>? ctas,
 | 
				
			||||||
    List<Widget>? assets,
 | 
					    List<Widget>? assets,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    double? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    double? padding,
 | 
				
			||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					    MultiColor? backgroundColors,
 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Size? minSize,
 | 
					    Size? minSize,
 | 
				
			||||||
    Size? maxSize,
 | 
					    Size? maxSize,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    TextStyle? bodyStyle,
 | 
					 | 
				
			||||||
    Widget? background,
 | 
					    Widget? background,
 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
				
			|||||||
@ -1,99 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
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';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class PricingLine {
 | 
					 | 
				
			||||||
  const PricingLine({
 | 
					 | 
				
			||||||
    required this.data,
 | 
					 | 
				
			||||||
    this.icon,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  final TextWrapper data;
 | 
					 | 
				
			||||||
  final Widget? icon;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  String toString() => 'PricingLine(data: $data, icon: $icon)';
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class Pricing {
 | 
					 | 
				
			||||||
  const Pricing({
 | 
					 | 
				
			||||||
    required this.price,
 | 
					 | 
				
			||||||
    this.period,
 | 
					 | 
				
			||||||
    this.hasAsterisk = false,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  final TextWrapper price;
 | 
					 | 
				
			||||||
  final TextWrapper? period;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// If [hasAsterisk] is true then the price will be displayed with
 | 
					 | 
				
			||||||
  /// an asterisk to emphasize that it is a special price.
 | 
					 | 
				
			||||||
  final bool hasAsterisk;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@ComponentProxyExtension()
 | 
					 | 
				
			||||||
abstract class PricingCardComponent extends CardComponent
 | 
					 | 
				
			||||||
    with CopyWithMixin<$PricingCardComponentCWProxy> {
 | 
					 | 
				
			||||||
  const PricingCardComponent({
 | 
					 | 
				
			||||||
    this.axis,
 | 
					 | 
				
			||||||
    this.title,
 | 
					 | 
				
			||||||
    this.pricing,
 | 
					 | 
				
			||||||
    this.description,
 | 
					 | 
				
			||||||
    this.features,
 | 
					 | 
				
			||||||
    this.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,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Axis of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// If [axis] is [Axis.horizontal] then only the first icon will be displayed.
 | 
					 | 
				
			||||||
  /// Used in header of the card.
 | 
					 | 
				
			||||||
  final Axis? axis;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Title of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// If [axis] is [Axis.vertical] then icon of the title will be displayed
 | 
					 | 
				
			||||||
  /// above the title.
 | 
					 | 
				
			||||||
  final PricingLine? title;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Pricing of the card
 | 
					 | 
				
			||||||
  final Pricing? pricing;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Description of the card
 | 
					 | 
				
			||||||
  final TextWrapper? description;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// List of special features of the card
 | 
					 | 
				
			||||||
  final List<PricingLine>? features;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// CTA of the card
 | 
					 | 
				
			||||||
  final Widget? cta;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -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<PricingLine>? 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<PricingLine>? 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,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -16,6 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
 | 
					import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'quote_card_component.g.dart';
 | 
					part 'quote_card_component.g.dart';
 | 
				
			||||||
@ -27,6 +28,7 @@ abstract class QuoteCardComponent extends CardComponent
 | 
				
			|||||||
    this.avatar,
 | 
					    this.avatar,
 | 
				
			||||||
    this.name,
 | 
					    this.name,
 | 
				
			||||||
    this.subtitle,
 | 
					    this.subtitle,
 | 
				
			||||||
 | 
					    this.gradient,
 | 
				
			||||||
    this.quote,
 | 
					    this.quote,
 | 
				
			||||||
    this.leftQuote,
 | 
					    this.leftQuote,
 | 
				
			||||||
    this.rightQuote,
 | 
					    this.rightQuote,
 | 
				
			||||||
@ -34,32 +36,19 @@ abstract class QuoteCardComponent extends CardComponent
 | 
				
			|||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.backgroundColors,
 | 
					    super.backgroundColors,
 | 
				
			||||||
    super.stroke,
 | 
					 | 
				
			||||||
    super.minSize,
 | 
					    super.minSize,
 | 
				
			||||||
    super.maxSize,
 | 
					    super.maxSize,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.titleStyle,
 | 
					 | 
				
			||||||
    super.subtitleStyle,
 | 
					 | 
				
			||||||
    super.bodyStyle,
 | 
					 | 
				
			||||||
    super.background,
 | 
					    super.background,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Avatar of the contact who wrote the quote
 | 
					 | 
				
			||||||
  final Widget? avatar;
 | 
					  final Widget? avatar;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Name of the contact who wrote the quote
 | 
					 | 
				
			||||||
  final TextWrapper? name;
 | 
					  final TextWrapper? name;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle, usually the date of the quote or the company of the contact
 | 
					 | 
				
			||||||
  final TextWrapper? subtitle;
 | 
					  final TextWrapper? subtitle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Quote
 | 
					 | 
				
			||||||
  final TextWrapper? quote;
 | 
					  final TextWrapper? quote;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Left quote, usually a double quote
 | 
					  final Gradient? gradient;
 | 
				
			||||||
  final Widget? leftQuote;
 | 
					  final Widget? leftQuote;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Right quote, usually a double quote
 | 
					 | 
				
			||||||
  final Widget? rightQuote;
 | 
					  final Widget? rightQuote;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -10,40 +10,34 @@ abstract class $QuoteCardComponentCWProxy {
 | 
				
			|||||||
  QuoteCardComponent avatar(Widget? avatar);
 | 
					  QuoteCardComponent avatar(Widget? avatar);
 | 
				
			||||||
  QuoteCardComponent name(TextWrapper? name);
 | 
					  QuoteCardComponent name(TextWrapper? name);
 | 
				
			||||||
  QuoteCardComponent subtitle(TextWrapper? subtitle);
 | 
					  QuoteCardComponent subtitle(TextWrapper? subtitle);
 | 
				
			||||||
 | 
					  QuoteCardComponent gradient(Gradient? gradient);
 | 
				
			||||||
  QuoteCardComponent quote(TextWrapper? quote);
 | 
					  QuoteCardComponent quote(TextWrapper? quote);
 | 
				
			||||||
  QuoteCardComponent leftQuote(Widget? leftQuote);
 | 
					  QuoteCardComponent leftQuote(Widget? leftQuote);
 | 
				
			||||||
  QuoteCardComponent rightQuote(Widget? rightQuote);
 | 
					  QuoteCardComponent rightQuote(Widget? rightQuote);
 | 
				
			||||||
  QuoteCardComponent radius(BorderRadiusGeometry? radius);
 | 
					  QuoteCardComponent radius(double? radius);
 | 
				
			||||||
  QuoteCardComponent padding(EdgeInsetsGeometry? padding);
 | 
					  QuoteCardComponent padding(double? padding);
 | 
				
			||||||
  QuoteCardComponent borderColors(MultiColor? borderColors);
 | 
					  QuoteCardComponent borderColors(MultiColor? borderColors);
 | 
				
			||||||
  QuoteCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
					  QuoteCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
				
			||||||
  QuoteCardComponent stroke(double? stroke);
 | 
					 | 
				
			||||||
  QuoteCardComponent minSize(Size? minSize);
 | 
					  QuoteCardComponent minSize(Size? minSize);
 | 
				
			||||||
  QuoteCardComponent maxSize(Size? maxSize);
 | 
					  QuoteCardComponent maxSize(Size? maxSize);
 | 
				
			||||||
  QuoteCardComponent shadow(BoxShadow? shadow);
 | 
					  QuoteCardComponent shadow(BoxShadow? shadow);
 | 
				
			||||||
  QuoteCardComponent titleStyle(TextStyle? titleStyle);
 | 
					 | 
				
			||||||
  QuoteCardComponent subtitleStyle(TextStyle? subtitleStyle);
 | 
					 | 
				
			||||||
  QuoteCardComponent bodyStyle(TextStyle? bodyStyle);
 | 
					 | 
				
			||||||
  QuoteCardComponent background(Widget? background);
 | 
					  QuoteCardComponent background(Widget? background);
 | 
				
			||||||
  QuoteCardComponent key(Key? key);
 | 
					  QuoteCardComponent key(Key? key);
 | 
				
			||||||
  QuoteCardComponent call({
 | 
					  QuoteCardComponent call({
 | 
				
			||||||
    Widget? avatar,
 | 
					    Widget? avatar,
 | 
				
			||||||
    TextWrapper? name,
 | 
					    TextWrapper? name,
 | 
				
			||||||
    TextWrapper? subtitle,
 | 
					    TextWrapper? subtitle,
 | 
				
			||||||
 | 
					    Gradient? gradient,
 | 
				
			||||||
    TextWrapper? quote,
 | 
					    TextWrapper? quote,
 | 
				
			||||||
    Widget? leftQuote,
 | 
					    Widget? leftQuote,
 | 
				
			||||||
    Widget? rightQuote,
 | 
					    Widget? rightQuote,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    double? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    double? padding,
 | 
				
			||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					    MultiColor? backgroundColors,
 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Size? minSize,
 | 
					    Size? minSize,
 | 
				
			||||||
    Size? maxSize,
 | 
					    Size? maxSize,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    TextStyle? bodyStyle,
 | 
					 | 
				
			||||||
    Widget? background,
 | 
					    Widget? background,
 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
 | 
					import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'skill_card_component.g.dart';
 | 
					part 'skill_card_component.g.dart';
 | 
				
			||||||
@ -24,56 +25,29 @@ part 'skill_card_component.g.dart';
 | 
				
			|||||||
abstract class SkillCardComponent extends CardComponent
 | 
					abstract class SkillCardComponent extends CardComponent
 | 
				
			||||||
    with CopyWithMixin<$SkillCardComponentCWProxy> {
 | 
					    with CopyWithMixin<$SkillCardComponentCWProxy> {
 | 
				
			||||||
  const SkillCardComponent({
 | 
					  const SkillCardComponent({
 | 
				
			||||||
    this.axis,
 | 
					    this.icon,
 | 
				
			||||||
    this.icons,
 | 
					    this.gradient,
 | 
				
			||||||
    this.title,
 | 
					    this.title,
 | 
				
			||||||
    this.subtitle,
 | 
					 | 
				
			||||||
    this.description,
 | 
					    this.description,
 | 
				
			||||||
    this.skills,
 | 
					    this.skills,
 | 
				
			||||||
    this.bulletColors,
 | 
					    this.leadingIcon,
 | 
				
			||||||
    this.bulletIcon,
 | 
					    this.secondaryBackgroundColors,
 | 
				
			||||||
    super.radius,
 | 
					    super.radius,
 | 
				
			||||||
    super.padding,
 | 
					    super.padding,
 | 
				
			||||||
    super.borderColors,
 | 
					    super.borderColors,
 | 
				
			||||||
    super.backgroundColors,
 | 
					    super.backgroundColors,
 | 
				
			||||||
    super.stroke,
 | 
					 | 
				
			||||||
    super.minSize,
 | 
					    super.minSize,
 | 
				
			||||||
    super.maxSize,
 | 
					    super.maxSize,
 | 
				
			||||||
    super.shadow,
 | 
					    super.shadow,
 | 
				
			||||||
    super.titleStyle,
 | 
					 | 
				
			||||||
    super.subtitleStyle,
 | 
					 | 
				
			||||||
    super.bodyStyle,
 | 
					 | 
				
			||||||
    super.background,
 | 
					    super.background,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Axis of the card
 | 
					  final Widget? icon;
 | 
				
			||||||
  ///
 | 
					  final List<Color>? gradient;
 | 
				
			||||||
  /// If [axis] is [Axis.horizontal] then only the first icon will be displayed.
 | 
					 | 
				
			||||||
  /// Used in header of the card.
 | 
					 | 
				
			||||||
  final Axis? axis;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Icons of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// If [axis] is [Axis.horizontal] then only the first icon will be displayed
 | 
					 | 
				
			||||||
  /// on the left side of the card and the rest will be ignored.
 | 
					 | 
				
			||||||
  final List<Widget>? icons;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Title of the card
 | 
					 | 
				
			||||||
  final TextWrapper? title;
 | 
					  final TextWrapper? title;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle of the card
 | 
					 | 
				
			||||||
  final TextWrapper? subtitle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Description of the card
 | 
					 | 
				
			||||||
  final TextWrapper? description;
 | 
					  final TextWrapper? description;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Skills to be displayed
 | 
					 | 
				
			||||||
  final List<TextWrapper>? skills;
 | 
					  final List<TextWrapper>? skills;
 | 
				
			||||||
 | 
					  final IconData? leadingIcon;
 | 
				
			||||||
  /// Gradient of skill icons.
 | 
					  final Color? secondaryBackgroundColors;
 | 
				
			||||||
  final MultiColor? bulletColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Icon to be displayed before each skill.
 | 
					 | 
				
			||||||
  final Widget? bulletIcon;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,47 +7,38 @@ part of 'skill_card_component.dart';
 | 
				
			|||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class $SkillCardComponentCWProxy {
 | 
					abstract class $SkillCardComponentCWProxy {
 | 
				
			||||||
  SkillCardComponent axis(Axis? axis);
 | 
					  SkillCardComponent icon(Widget? icon);
 | 
				
			||||||
  SkillCardComponent icons(List<Widget>? icons);
 | 
					  SkillCardComponent gradient(List<Color>? gradient);
 | 
				
			||||||
  SkillCardComponent title(TextWrapper? title);
 | 
					  SkillCardComponent title(TextWrapper? title);
 | 
				
			||||||
  SkillCardComponent subtitle(TextWrapper? subtitle);
 | 
					 | 
				
			||||||
  SkillCardComponent description(TextWrapper? description);
 | 
					  SkillCardComponent description(TextWrapper? description);
 | 
				
			||||||
  SkillCardComponent skills(List<TextWrapper>? skills);
 | 
					  SkillCardComponent skills(List<TextWrapper>? skills);
 | 
				
			||||||
  SkillCardComponent bulletColors(MultiColor? bulletColors);
 | 
					  SkillCardComponent leadingIcon(IconData? leadingIcon);
 | 
				
			||||||
  SkillCardComponent bulletIcon(Widget? bulletIcon);
 | 
					  SkillCardComponent secondaryBackgroundColors(
 | 
				
			||||||
  SkillCardComponent radius(BorderRadiusGeometry? radius);
 | 
					      Color? secondaryBackgroundColors);
 | 
				
			||||||
  SkillCardComponent padding(EdgeInsetsGeometry? padding);
 | 
					  SkillCardComponent radius(double? radius);
 | 
				
			||||||
 | 
					  SkillCardComponent padding(double? padding);
 | 
				
			||||||
  SkillCardComponent borderColors(MultiColor? borderColors);
 | 
					  SkillCardComponent borderColors(MultiColor? borderColors);
 | 
				
			||||||
  SkillCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
					  SkillCardComponent backgroundColors(MultiColor? backgroundColors);
 | 
				
			||||||
  SkillCardComponent stroke(double? stroke);
 | 
					 | 
				
			||||||
  SkillCardComponent minSize(Size? minSize);
 | 
					  SkillCardComponent minSize(Size? minSize);
 | 
				
			||||||
  SkillCardComponent maxSize(Size? maxSize);
 | 
					  SkillCardComponent maxSize(Size? maxSize);
 | 
				
			||||||
  SkillCardComponent shadow(BoxShadow? shadow);
 | 
					  SkillCardComponent shadow(BoxShadow? shadow);
 | 
				
			||||||
  SkillCardComponent titleStyle(TextStyle? titleStyle);
 | 
					 | 
				
			||||||
  SkillCardComponent subtitleStyle(TextStyle? subtitleStyle);
 | 
					 | 
				
			||||||
  SkillCardComponent bodyStyle(TextStyle? bodyStyle);
 | 
					 | 
				
			||||||
  SkillCardComponent background(Widget? background);
 | 
					  SkillCardComponent background(Widget? background);
 | 
				
			||||||
  SkillCardComponent key(Key? key);
 | 
					  SkillCardComponent key(Key? key);
 | 
				
			||||||
  SkillCardComponent call({
 | 
					  SkillCardComponent call({
 | 
				
			||||||
    Axis? axis,
 | 
					    Widget? icon,
 | 
				
			||||||
    List<Widget>? icons,
 | 
					    List<Color>? gradient,
 | 
				
			||||||
    TextWrapper? title,
 | 
					    TextWrapper? title,
 | 
				
			||||||
    TextWrapper? subtitle,
 | 
					 | 
				
			||||||
    TextWrapper? description,
 | 
					    TextWrapper? description,
 | 
				
			||||||
    List<TextWrapper>? skills,
 | 
					    List<TextWrapper>? skills,
 | 
				
			||||||
    MultiColor? bulletColors,
 | 
					    IconData? leadingIcon,
 | 
				
			||||||
    Widget? bulletIcon,
 | 
					    Color? secondaryBackgroundColors,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    double? radius,
 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					    double? padding,
 | 
				
			||||||
    MultiColor? borderColors,
 | 
					    MultiColor? borderColors,
 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					    MultiColor? backgroundColors,
 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    Size? minSize,
 | 
					    Size? minSize,
 | 
				
			||||||
    Size? maxSize,
 | 
					    Size? maxSize,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? shadow,
 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    TextStyle? bodyStyle,
 | 
					 | 
				
			||||||
    Widget? background,
 | 
					    Widget? background,
 | 
				
			||||||
    Key? key,
 | 
					    Key? key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,6 @@ import 'package:wyatt_ui_components/src/core/utils/theme_resolver.dart';
 | 
				
			|||||||
/// Base class for all components.
 | 
					/// Base class for all components.
 | 
				
			||||||
/// {@endtemplate}
 | 
					/// {@endtemplate}
 | 
				
			||||||
abstract class Component extends StatelessWidget {
 | 
					abstract class Component extends StatelessWidget {
 | 
				
			||||||
  /// {@macro component}
 | 
					 | 
				
			||||||
  const Component({this.themeResolver, super.key});
 | 
					  const Component({this.themeResolver, super.key});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Theme Resolver for this component
 | 
					  /// Theme Resolver for this component
 | 
				
			||||||
 | 
				
			|||||||
@ -18,9 +18,9 @@ export './bars/bars.dart';
 | 
				
			|||||||
export './buttons/buttons.dart';
 | 
					export './buttons/buttons.dart';
 | 
				
			||||||
export './cards/cards.dart';
 | 
					export './cards/cards.dart';
 | 
				
			||||||
export './component.dart';
 | 
					export './component.dart';
 | 
				
			||||||
export './error/error.dart';
 | 
					export './error_widget_component.dart';
 | 
				
			||||||
export './gradients/gradients.dart';
 | 
					 | 
				
			||||||
export './loader/loader.dart';
 | 
					export './loader/loader.dart';
 | 
				
			||||||
 | 
					export './loading_widget_component.dart';
 | 
				
			||||||
export './rich_text_builder/rich_text_builder.dart';
 | 
					export './rich_text_builder/rich_text_builder.dart';
 | 
				
			||||||
export './text_inputs/text_inputs.dart';
 | 
					export './text_inputs/text_inputs.dart';
 | 
				
			||||||
export './theme_style.dart';
 | 
					export './theme_style.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -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<dynamic, dynamic, dynamic>? themeResolver);
 | 
					 | 
				
			||||||
  ErrorComponent key(Key? key);
 | 
					 | 
				
			||||||
  ErrorComponent call({
 | 
					 | 
				
			||||||
    MultiColor? colors,
 | 
					 | 
				
			||||||
    TextWrapper? message,
 | 
					 | 
				
			||||||
    TextWrapper? details,
 | 
					 | 
				
			||||||
    ThemeResolver<dynamic, dynamic, dynamic>? themeResolver,
 | 
					 | 
				
			||||||
    Key? key,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -14,29 +14,15 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
					import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
part 'error_component.g.dart';
 | 
					part 'error_widget_component.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ComponentProxyExtension()
 | 
					@ComponentProxyExtension()
 | 
				
			||||||
abstract class ErrorComponent extends Component
 | 
					abstract class ErrorWidgetComponent extends Component
 | 
				
			||||||
    with CopyWithMixin<$ErrorComponentCWProxy> {
 | 
					    with CopyWithMixin<$ErrorWidgetComponentCWProxy> {
 | 
				
			||||||
  const ErrorComponent({
 | 
					  const ErrorWidgetComponent({required this.error, super.key});
 | 
				
			||||||
    this.colors,
 | 
					  final TextWrapper? error;
 | 
				
			||||||
    this.message,
 | 
					 | 
				
			||||||
    this.details,
 | 
					 | 
				
			||||||
    super.themeResolver,
 | 
					 | 
				
			||||||
    super.key,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Error message
 | 
					 | 
				
			||||||
  final TextWrapper? message;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Details for the error component
 | 
					 | 
				
			||||||
  final TextWrapper? details;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Colors for the error component
 | 
					 | 
				
			||||||
  final MultiColor? colors;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					// GENERATED CODE - DO NOT MODIFY BY HAND
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					part of 'error_widget_component.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					// ComponentProxyGenerator
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					abstract class $ErrorWidgetComponentCWProxy {
 | 
				
			||||||
 | 
					  ErrorWidgetComponent error(TextWrapper? error);
 | 
				
			||||||
 | 
					  ErrorWidgetComponent key(Key? key);
 | 
				
			||||||
 | 
					  ErrorWidgetComponent call({
 | 
				
			||||||
 | 
					    TextWrapper? error,
 | 
				
			||||||
 | 
					    Key? key,
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -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<Shadow>? 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<Shadow>? shadows,
 | 
					 | 
				
			||||||
    String? semanticLabel,
 | 
					 | 
				
			||||||
    TextDirection? textDirection,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,54 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
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';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
part 'gradient_text_component.g.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@ComponentProxyExtension()
 | 
					 | 
				
			||||||
abstract class GradientTextComponent extends Text
 | 
					 | 
				
			||||||
    with CopyWithMixin<$GradientTextComponentCWProxy>
 | 
					 | 
				
			||||||
    implements GradientComponent {
 | 
					 | 
				
			||||||
  const GradientTextComponent({
 | 
					 | 
				
			||||||
    required String? data,
 | 
					 | 
				
			||||||
    required this.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,
 | 
					 | 
				
			||||||
  }) : super(data ?? '');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  final MultiColor gradientColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeResolver<dynamic, dynamic, dynamic>? get themeResolver => 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,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,19 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export 'gradient_component.dart';
 | 
					 | 
				
			||||||
export 'gradient_icon_component.dart';
 | 
					 | 
				
			||||||
export 'gradient_text_component.dart';
 | 
					 | 
				
			||||||
@ -14,18 +14,16 @@
 | 
				
			|||||||
// You should have received a copy of the GNU General Public License
 | 
					// You should have received a copy of the GNU General Public License
 | 
				
			||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					import 'package:flutter/material.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/domain/entities/component.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/component.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template gradient_component}
 | 
					part 'loading_widget_component.g.dart';
 | 
				
			||||||
/// Base class for all gradient components.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// For example, text, icons, and box borders.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
abstract class GradientComponent extends Component {
 | 
					 | 
				
			||||||
  /// {@macro gradient_component}
 | 
					 | 
				
			||||||
  const GradientComponent({super.key});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns colors for the gradient.
 | 
					@ComponentProxyExtension()
 | 
				
			||||||
  MultiColor get gradientColors;
 | 
					abstract class LoadingWidgetComponent extends Component
 | 
				
			||||||
 | 
					    with CopyWithMixin<$LoadingWidgetComponentCWProxy> {
 | 
				
			||||||
 | 
					  const LoadingWidgetComponent({required this.color, super.key});
 | 
				
			||||||
 | 
					  final Color? color;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					// GENERATED CODE - DO NOT MODIFY BY HAND
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					part of 'loading_widget_component.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					// ComponentProxyGenerator
 | 
				
			||||||
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					abstract class $LoadingWidgetComponentCWProxy {
 | 
				
			||||||
 | 
					  LoadingWidgetComponent color(Color? color);
 | 
				
			||||||
 | 
					  LoadingWidgetComponent key(Key? key);
 | 
				
			||||||
 | 
					  LoadingWidgetComponent call({
 | 
				
			||||||
 | 
					    Color? color,
 | 
				
			||||||
 | 
					    Key? key,
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -16,43 +16,17 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/widgets.dart';
 | 
					import 'package:flutter/widgets.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template rich_text_style_parameter}
 | 
					 | 
				
			||||||
/// Rich text style parameter used to parse the text.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class RichTextStyleParameter {
 | 
					class RichTextStyleParameter {
 | 
				
			||||||
  /// {@macro rich_text_style_parameter}
 | 
					 | 
				
			||||||
  const RichTextStyleParameter(
 | 
					  const RichTextStyleParameter(
 | 
				
			||||||
    this.defaultStyle,
 | 
					    this.defaultStyle,
 | 
				
			||||||
    this.definedStyle,
 | 
					    this.definedStyle,
 | 
				
			||||||
    this.styleName,
 | 
					    this.styleName,
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Default style to use if no style is defined.
 | 
					 | 
				
			||||||
  final TextStyle? defaultStyle;
 | 
					  final TextStyle? defaultStyle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Map of defined styles. The key is the style name.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Example:
 | 
					 | 
				
			||||||
  /// ```dart
 | 
					 | 
				
			||||||
  /// definedStyle: {
 | 
					 | 
				
			||||||
  ///  'bold': TextStyle(fontWeight: FontWeight.bold),
 | 
					 | 
				
			||||||
  ///  'italic': TextStyle(fontStyle: FontStyle.italic),
 | 
					 | 
				
			||||||
  /// }
 | 
					 | 
				
			||||||
  /// ```
 | 
					 | 
				
			||||||
  /// then, the text `This is <bold>bold</bold> and <italic>italic</italic>`
 | 
					 | 
				
			||||||
  /// will be parsed and the word `bold` will be bold and the word `italic`
 | 
					 | 
				
			||||||
  /// will be italic in the RichText widget.
 | 
					 | 
				
			||||||
  final Map<String, TextStyle> definedStyle;
 | 
					  final Map<String, TextStyle> definedStyle;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style name to use for the text.
 | 
					 | 
				
			||||||
  /// If no style is defined and no default style is defined, the text will be
 | 
					 | 
				
			||||||
  /// displayed with the default style of the RichText widget.
 | 
					 | 
				
			||||||
  final String? styleName;
 | 
					  final String? styleName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns the style to use for the given style name.
 | 
					 | 
				
			||||||
  /// If no style is defined for the given style name, the default style is
 | 
					 | 
				
			||||||
  /// returned. If no default style is defined, the default style of the
 | 
					 | 
				
			||||||
  /// RichText widget is returned.
 | 
					 | 
				
			||||||
  TextStyle get style {
 | 
					  TextStyle get style {
 | 
				
			||||||
    if (definedStyle.containsKey(styleName)) {
 | 
					    if (definedStyle.containsKey(styleName)) {
 | 
				
			||||||
      return definedStyle[styleName]!;
 | 
					      return definedStyle[styleName]!;
 | 
				
			||||||
@ -72,47 +46,11 @@ class RichTextStyleParameter {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template rich_text_node}
 | 
					 | 
				
			||||||
/// Rich text node.
 | 
					 | 
				
			||||||
///
 | 
					 | 
				
			||||||
/// Used as a node in the tree of the RichText widget.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class RichTextNode {
 | 
					class RichTextNode {
 | 
				
			||||||
  /// {@macro rich_text_node}
 | 
					  RichTextNode(this.nodes);
 | 
				
			||||||
  const RichTextNode(this.nodes);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// List of nodes.
 | 
					 | 
				
			||||||
  final List<RichTextNode> nodes;
 | 
					  final List<RichTextNode> nodes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns a RichTextNode from the given content.
 | 
					 | 
				
			||||||
  /// If the content contains a match with the given regex, the content is
 | 
					 | 
				
			||||||
  /// split into multiple nodes. If the content does not contain a match with
 | 
					 | 
				
			||||||
  /// the given regex, a leaf node is returned.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Example:
 | 
					 | 
				
			||||||
  /// ```dart
 | 
					 | 
				
			||||||
  /// RichTextNode.from(
 | 
					 | 
				
			||||||
  ///  'This is <bold>bold</bold> and <italic>italic</italic>',
 | 
					 | 
				
			||||||
  ///   RegExp(r'<(\w+)>(.*?)</\1>'),
 | 
					 | 
				
			||||||
  ///   RichTextStyleParameter(
 | 
					 | 
				
			||||||
  ///     TextStyle(fontWeight: FontWeight.w400),
 | 
					 | 
				
			||||||
  ///     {'bold': TextStyle(fontWeight: FontWeight.bold)},
 | 
					 | 
				
			||||||
  ///     {'italic': TextStyle(fontStyle: FontStyle.italic)},
 | 
					 | 
				
			||||||
  ///   ),
 | 
					 | 
				
			||||||
  /// );
 | 
					 | 
				
			||||||
  /// ```
 | 
					 | 
				
			||||||
  /// will return a RichTextNode with 5 nodes:
 | 
					 | 
				
			||||||
  /// - `This is `
 | 
					 | 
				
			||||||
  /// - `<bold>bold</bold>`
 | 
					 | 
				
			||||||
  /// - ` and `
 | 
					 | 
				
			||||||
  /// - `<italic>italic</italic>`
 | 
					 | 
				
			||||||
  /// - `` (empty string)
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// The first node is a leaf node with the default style of the RichText
 | 
					 | 
				
			||||||
  /// widget. The second node is a node with bold paramters. The third node is
 | 
					 | 
				
			||||||
  /// a leaf node with the default style of the RichText widget.
 | 
					 | 
				
			||||||
  /// The fourth node is a node italic parameters. The fifth node is a
 | 
					 | 
				
			||||||
  /// leaf node with the default style of the RichText widget.
 | 
					 | 
				
			||||||
  static RichTextNode from(
 | 
					  static RichTextNode from(
 | 
				
			||||||
    String content,
 | 
					    String content,
 | 
				
			||||||
    RegExp regex,
 | 
					    RegExp regex,
 | 
				
			||||||
@ -150,11 +88,6 @@ class RichTextNode {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns an InlineSpan from the given RichTextNode.
 | 
					 | 
				
			||||||
  /// The given RichTextParser is used to convert the RichTextNode to an
 | 
					 | 
				
			||||||
  /// InlineSpan.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// InlineSpan is used to display text in the RichText widget.
 | 
					 | 
				
			||||||
  InlineSpan toInlineSpan(RichTextParser parser) {
 | 
					  InlineSpan toInlineSpan(RichTextParser parser) {
 | 
				
			||||||
    final children = <InlineSpan>[];
 | 
					    final children = <InlineSpan>[];
 | 
				
			||||||
    for (final node in nodes) {
 | 
					    for (final node in nodes) {
 | 
				
			||||||
@ -164,17 +97,10 @@ class RichTextNode {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template rich_text_leaf}
 | 
					 | 
				
			||||||
/// Rich text leaf.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class RichTextLeaf extends RichTextNode {
 | 
					class RichTextLeaf extends RichTextNode {
 | 
				
			||||||
  /// {@macro rich_text_leaf}
 | 
					  RichTextLeaf(this.style, this.content) : super([]);
 | 
				
			||||||
  const RichTextLeaf(this.style, this.content) : super(const []);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Style to use for the text.
 | 
					 | 
				
			||||||
  final TextStyle style;
 | 
					  final TextStyle style;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Text content.
 | 
					 | 
				
			||||||
  final String content;
 | 
					  final String content;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
@ -182,26 +108,13 @@ class RichTextLeaf extends RichTextNode {
 | 
				
			|||||||
      parser.nodeBuilder.call(content, style);
 | 
					      parser.nodeBuilder.call(content, style);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template rich_text_parser}
 | 
					 | 
				
			||||||
/// Rich text parser.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class RichTextParser {
 | 
					class RichTextParser {
 | 
				
			||||||
  /// {@macro rich_text_parser}
 | 
					 | 
				
			||||||
  const RichTextParser({required this.nodeBuilder});
 | 
					  const RichTextParser({required this.nodeBuilder});
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Returns a default RichTextParser.
 | 
					 | 
				
			||||||
  /// The default RichTextParser uses the given nodeBuilder to convert a
 | 
					 | 
				
			||||||
  /// RichTextNode to an InlineSpan.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// By default, the nodeBuilder returns a TextSpan with the given content
 | 
					 | 
				
			||||||
  /// and style.
 | 
					 | 
				
			||||||
  factory RichTextParser.defaultBuilder() => RichTextParser(
 | 
					  factory RichTextParser.defaultBuilder() => RichTextParser(
 | 
				
			||||||
        nodeBuilder: (content, style) => TextSpan(
 | 
					        nodeBuilder: (content, style) => TextSpan(
 | 
				
			||||||
          text: content,
 | 
					          text: content,
 | 
				
			||||||
          style: style,
 | 
					          style: style,
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Converts the given RichTextNode to an InlineSpan.
 | 
					 | 
				
			||||||
  final InlineSpan Function(String content, TextStyle style) nodeBuilder;
 | 
					  final InlineSpan Function(String content, TextStyle style) nodeBuilder;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -39,8 +39,8 @@ abstract class TextInputComponent extends Component
 | 
				
			|||||||
    this.hint,
 | 
					    this.hint,
 | 
				
			||||||
    this.normalStyle,
 | 
					    this.normalStyle,
 | 
				
			||||||
    this.focusedStyle,
 | 
					    this.focusedStyle,
 | 
				
			||||||
    this.invalidStyle,
 | 
					    this.errorStyle,
 | 
				
			||||||
    this.disabledStyle,
 | 
					    this.disableStyle,
 | 
				
			||||||
    this.controller,
 | 
					    this.controller,
 | 
				
			||||||
    this.focusNode,
 | 
					    this.focusNode,
 | 
				
			||||||
    this.keyboardType,
 | 
					    this.keyboardType,
 | 
				
			||||||
@ -156,11 +156,10 @@ abstract class TextInputComponent extends Component
 | 
				
			|||||||
  final bool Function(String)? validator;
 | 
					  final bool Function(String)? validator;
 | 
				
			||||||
  final String? Function(String)? onError;
 | 
					  final String? Function(String)? onError;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Styles
 | 
					 | 
				
			||||||
  final TextInputStyle? normalStyle;
 | 
					  final TextInputStyle? normalStyle;
 | 
				
			||||||
  final TextInputStyle? focusedStyle;
 | 
					  final TextInputStyle? focusedStyle;
 | 
				
			||||||
  final TextInputStyle? invalidStyle;
 | 
					  final TextInputStyle? errorStyle;
 | 
				
			||||||
  final TextInputStyle? disabledStyle;
 | 
					  final TextInputStyle? disableStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  final bool? expand;
 | 
					  final bool? expand;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -18,8 +18,8 @@ abstract class $TextInputComponentCWProxy {
 | 
				
			|||||||
  TextInputComponent hint(TextWrapper? hint);
 | 
					  TextInputComponent hint(TextWrapper? hint);
 | 
				
			||||||
  TextInputComponent normalStyle(TextInputStyle? normalStyle);
 | 
					  TextInputComponent normalStyle(TextInputStyle? normalStyle);
 | 
				
			||||||
  TextInputComponent focusedStyle(TextInputStyle? focusedStyle);
 | 
					  TextInputComponent focusedStyle(TextInputStyle? focusedStyle);
 | 
				
			||||||
  TextInputComponent invalidStyle(TextInputStyle? invalidStyle);
 | 
					  TextInputComponent errorStyle(TextInputStyle? errorStyle);
 | 
				
			||||||
  TextInputComponent disabledStyle(TextInputStyle? disabledStyle);
 | 
					  TextInputComponent disableStyle(TextInputStyle? disableStyle);
 | 
				
			||||||
  TextInputComponent controller(TextEditingController? controller);
 | 
					  TextInputComponent controller(TextEditingController? controller);
 | 
				
			||||||
  TextInputComponent focusNode(FocusNode? focusNode);
 | 
					  TextInputComponent focusNode(FocusNode? focusNode);
 | 
				
			||||||
  TextInputComponent keyboardType(TextInputType? keyboardType);
 | 
					  TextInputComponent keyboardType(TextInputType? keyboardType);
 | 
				
			||||||
@ -96,8 +96,8 @@ abstract class $TextInputComponentCWProxy {
 | 
				
			|||||||
    TextWrapper? hint,
 | 
					    TextWrapper? hint,
 | 
				
			||||||
    TextInputStyle? normalStyle,
 | 
					    TextInputStyle? normalStyle,
 | 
				
			||||||
    TextInputStyle? focusedStyle,
 | 
					    TextInputStyle? focusedStyle,
 | 
				
			||||||
    TextInputStyle? invalidStyle,
 | 
					    TextInputStyle? errorStyle,
 | 
				
			||||||
    TextInputStyle? disabledStyle,
 | 
					    TextInputStyle? disableStyle,
 | 
				
			||||||
    TextEditingController? controller,
 | 
					    TextEditingController? controller,
 | 
				
			||||||
    FocusNode? focusNode,
 | 
					    FocusNode? focusNode,
 | 
				
			||||||
    TextInputType? keyboardType,
 | 
					    TextInputType? keyboardType,
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
    this.hintStyle,
 | 
					    this.hintStyle,
 | 
				
			||||||
    this.backgroundColors,
 | 
					    this.backgroundColors,
 | 
				
			||||||
    this.borderColors,
 | 
					    this.borderColors,
 | 
				
			||||||
    this.shadow,
 | 
					    this.boxShadow,
 | 
				
			||||||
    this.radius,
 | 
					    this.radius,
 | 
				
			||||||
    this.inputStyle,
 | 
					    this.inputStyle,
 | 
				
			||||||
    this.iconColor,
 | 
					    this.iconColor,
 | 
				
			||||||
@ -44,7 +44,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  final MultiColor? backgroundColors;
 | 
					  final MultiColor? backgroundColors;
 | 
				
			||||||
  final Color? borderColors;
 | 
					  final Color? borderColors;
 | 
				
			||||||
  final BoxShadow? shadow;
 | 
					  final BoxShadow? boxShadow;
 | 
				
			||||||
  final BorderRadiusGeometry? radius;
 | 
					  final BorderRadiusGeometry? radius;
 | 
				
			||||||
  final TextStyle? inputStyle;
 | 
					  final TextStyle? inputStyle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -60,7 +60,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
      hintStyle: b.hintStyle,
 | 
					      hintStyle: b.hintStyle,
 | 
				
			||||||
      backgroundColors: b.backgroundColors,
 | 
					      backgroundColors: b.backgroundColors,
 | 
				
			||||||
      borderColors: b.borderColors,
 | 
					      borderColors: b.borderColors,
 | 
				
			||||||
      shadow: b.shadow,
 | 
					      boxShadow: b.boxShadow,
 | 
				
			||||||
      radius: b.radius,
 | 
					      radius: b.radius,
 | 
				
			||||||
      inputStyle: b.inputStyle,
 | 
					      inputStyle: b.inputStyle,
 | 
				
			||||||
      iconColor: b.iconColor,
 | 
					      iconColor: b.iconColor,
 | 
				
			||||||
@ -87,7 +87,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
          MultiColor.lerp(a.backgroundColors, b.backgroundColors, t),
 | 
					          MultiColor.lerp(a.backgroundColors, b.backgroundColors, t),
 | 
				
			||||||
      radius: BorderRadiusGeometry.lerp(a.radius, b.radius, t),
 | 
					      radius: BorderRadiusGeometry.lerp(a.radius, b.radius, t),
 | 
				
			||||||
      borderColors: Color.lerp(a.borderColors, b.borderColors, t),
 | 
					      borderColors: Color.lerp(a.borderColors, b.borderColors, t),
 | 
				
			||||||
      shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
 | 
					      boxShadow: BoxShadow.lerp(a.boxShadow, b.boxShadow, t),
 | 
				
			||||||
      inputStyle: TextStyle.lerp(a.inputStyle, b.inputStyle, t),
 | 
					      inputStyle: TextStyle.lerp(a.inputStyle, b.inputStyle, t),
 | 
				
			||||||
      prefixStyle: TextStyle.lerp(a.prefixStyle, b.prefixStyle, t),
 | 
					      prefixStyle: TextStyle.lerp(a.prefixStyle, b.prefixStyle, t),
 | 
				
			||||||
      suffixStyle: TextStyle.lerp(a.suffixStyle, b.suffixStyle, t),
 | 
					      suffixStyle: TextStyle.lerp(a.suffixStyle, b.suffixStyle, t),
 | 
				
			||||||
@ -107,7 +107,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
    TextStyle? hintStyle,
 | 
					    TextStyle? hintStyle,
 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					    MultiColor? backgroundColors,
 | 
				
			||||||
    Color? borderColors,
 | 
					    Color? borderColors,
 | 
				
			||||||
    BoxShadow? shadow,
 | 
					    BoxShadow? boxShadow,
 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					    BorderRadiusGeometry? radius,
 | 
				
			||||||
    TextStyle? inputStyle,
 | 
					    TextStyle? inputStyle,
 | 
				
			||||||
    Color? iconColor,
 | 
					    Color? iconColor,
 | 
				
			||||||
@ -122,7 +122,7 @@ class TextInputStyle extends ThemeStyle<TextInputStyle> {
 | 
				
			|||||||
        backgroundColors: backgroundColors ?? this.backgroundColors,
 | 
					        backgroundColors: backgroundColors ?? this.backgroundColors,
 | 
				
			||||||
        radius: radius ?? this.radius,
 | 
					        radius: radius ?? this.radius,
 | 
				
			||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					        borderColors: borderColors ?? this.borderColors,
 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					        boxShadow: boxShadow ?? this.boxShadow,
 | 
				
			||||||
        inputStyle: inputStyle ?? this.inputStyle,
 | 
					        inputStyle: inputStyle ?? this.inputStyle,
 | 
				
			||||||
        prefixStyle: prefixStyle ?? this.prefixStyle,
 | 
					        prefixStyle: prefixStyle ?? this.prefixStyle,
 | 
				
			||||||
        suffixStyle: suffixStyle ?? this.suffixStyle,
 | 
					        suffixStyle: suffixStyle ?? this.suffixStyle,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,103 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
/// File selection button theme extension that extends [ThemeExtension] and
 | 
					 | 
				
			||||||
/// implements copyWith, and lerp methods so you don't have to.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FileSelectionButtonThemeExtension
 | 
					 | 
				
			||||||
    extends ThemeExtension<FileSelectionButtonThemeExtension> {
 | 
					 | 
				
			||||||
  /// {@macro file_selection_button_theme_extension}
 | 
					 | 
				
			||||||
  const FileSelectionButtonThemeExtension({
 | 
					 | 
				
			||||||
    this.disabledStyle,
 | 
					 | 
				
			||||||
    this.focusedStyle,
 | 
					 | 
				
			||||||
    this.hoveredStyle,
 | 
					 | 
				
			||||||
    this.normalStyle,
 | 
					 | 
				
			||||||
    this.tappedStyle,
 | 
					 | 
				
			||||||
    this.selectedStyle,
 | 
					 | 
				
			||||||
    this.invalidStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in disabled state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? disabledStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in focused state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? focusedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in hovered state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? hoveredStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in normal state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? normalStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in tapped state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? tappedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in selected state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? selectedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in invalid state
 | 
					 | 
				
			||||||
  final FileSelectionButtonStyle? invalidStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<FileSelectionButtonThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? disabledStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? focusedStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? hoveredStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? normalStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? tappedStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? selectedStyle,
 | 
					 | 
				
			||||||
    FileSelectionButtonStyle? invalidStyle,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      FileSelectionButtonThemeExtension(
 | 
					 | 
				
			||||||
        disabledStyle: disabledStyle ?? this.disabledStyle,
 | 
					 | 
				
			||||||
        focusedStyle: focusedStyle ?? this.focusedStyle,
 | 
					 | 
				
			||||||
        hoveredStyle: hoveredStyle ?? this.hoveredStyle,
 | 
					 | 
				
			||||||
        normalStyle: normalStyle ?? this.normalStyle,
 | 
					 | 
				
			||||||
        tappedStyle: tappedStyle ?? this.tappedStyle,
 | 
					 | 
				
			||||||
        selectedStyle: selectedStyle ?? this.selectedStyle,
 | 
					 | 
				
			||||||
        invalidStyle: invalidStyle ?? this.invalidStyle,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<FileSelectionButtonThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<FileSelectionButtonThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! FileSelectionButtonThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return FileSelectionButtonThemeExtension(
 | 
					 | 
				
			||||||
      disabledStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(disabledStyle, other.disabledStyle, t),
 | 
					 | 
				
			||||||
      focusedStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(focusedStyle, other.focusedStyle, t),
 | 
					 | 
				
			||||||
      hoveredStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(hoveredStyle, other.hoveredStyle, t),
 | 
					 | 
				
			||||||
      normalStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(normalStyle, other.normalStyle, t),
 | 
					 | 
				
			||||||
      tappedStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(tappedStyle, other.tappedStyle, t),
 | 
					 | 
				
			||||||
      selectedStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(selectedStyle, other.selectedStyle, t),
 | 
					 | 
				
			||||||
      invalidStyle:
 | 
					 | 
				
			||||||
          FileSelectionButtonStyle.lerp(invalidStyle, other.invalidStyle, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,83 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template flat_button_theme_extension}
 | 
					 | 
				
			||||||
/// Flat button theme extension that extends [ThemeExtension] and
 | 
					 | 
				
			||||||
/// implements copyWith, and lerp methods so you don't have to.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class FlatButtonThemeExtension
 | 
					 | 
				
			||||||
    extends ThemeExtension<FlatButtonThemeExtension> {
 | 
					 | 
				
			||||||
  /// {@macro flat_button_theme_extension}
 | 
					 | 
				
			||||||
  const FlatButtonThemeExtension({
 | 
					 | 
				
			||||||
    this.disabledStyle,
 | 
					 | 
				
			||||||
    this.focusedStyle,
 | 
					 | 
				
			||||||
    this.hoveredStyle,
 | 
					 | 
				
			||||||
    this.normalStyle,
 | 
					 | 
				
			||||||
    this.tappedStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in disabled state
 | 
					 | 
				
			||||||
  final FlatButtonStyle? disabledStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in focused state
 | 
					 | 
				
			||||||
  final FlatButtonStyle? focusedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in hovered state
 | 
					 | 
				
			||||||
  final FlatButtonStyle? hoveredStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in normal state
 | 
					 | 
				
			||||||
  final FlatButtonStyle? normalStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in tapped state
 | 
					 | 
				
			||||||
  final FlatButtonStyle? tappedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<FlatButtonThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    FlatButtonStyle? disabledStyle,
 | 
					 | 
				
			||||||
    FlatButtonStyle? focusedStyle,
 | 
					 | 
				
			||||||
    FlatButtonStyle? hoveredStyle,
 | 
					 | 
				
			||||||
    FlatButtonStyle? normalStyle,
 | 
					 | 
				
			||||||
    FlatButtonStyle? tappedStyle,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      FlatButtonThemeExtension(
 | 
					 | 
				
			||||||
        disabledStyle: disabledStyle ?? this.disabledStyle,
 | 
					 | 
				
			||||||
        focusedStyle: focusedStyle ?? this.focusedStyle,
 | 
					 | 
				
			||||||
        hoveredStyle: hoveredStyle ?? this.hoveredStyle,
 | 
					 | 
				
			||||||
        normalStyle: normalStyle ?? this.normalStyle,
 | 
					 | 
				
			||||||
        tappedStyle: tappedStyle ?? this.tappedStyle,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<FlatButtonThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<FlatButtonThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! FlatButtonThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return FlatButtonThemeExtension(
 | 
					 | 
				
			||||||
      disabledStyle:
 | 
					 | 
				
			||||||
          FlatButtonStyle.lerp(disabledStyle, other.disabledStyle, t),
 | 
					 | 
				
			||||||
      focusedStyle: FlatButtonStyle.lerp(focusedStyle, other.focusedStyle, t),
 | 
					 | 
				
			||||||
      hoveredStyle: FlatButtonStyle.lerp(hoveredStyle, other.hoveredStyle, t),
 | 
					 | 
				
			||||||
      normalStyle: FlatButtonStyle.lerp(normalStyle, other.normalStyle, t),
 | 
					 | 
				
			||||||
      tappedStyle: FlatButtonStyle.lerp(tappedStyle, other.tappedStyle, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,91 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template symbol_button_theme_extension}
 | 
					 | 
				
			||||||
/// Symbol button theme extension that extends [ThemeExtension] and
 | 
					 | 
				
			||||||
/// implements copyWith, and lerp methods so you don't have to.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class SymbolButtonThemeExtension
 | 
					 | 
				
			||||||
    extends ThemeExtension<SymbolButtonThemeExtension> {
 | 
					 | 
				
			||||||
  /// {@macro symbol_button_theme_extension}
 | 
					 | 
				
			||||||
  const SymbolButtonThemeExtension({
 | 
					 | 
				
			||||||
    this.disabledStyle,
 | 
					 | 
				
			||||||
    this.focusedStyle,
 | 
					 | 
				
			||||||
    this.hoveredStyle,
 | 
					 | 
				
			||||||
    this.normalStyle,
 | 
					 | 
				
			||||||
    this.tappedStyle,
 | 
					 | 
				
			||||||
    this.selectedStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in disabled state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? disabledStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in focused state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? focusedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in hovered state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? hoveredStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in normal state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? normalStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in tapped state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? tappedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Style of this button in selected state
 | 
					 | 
				
			||||||
  final SymbolButtonStyle? selectedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<SymbolButtonThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    SymbolButtonStyle? disabledStyle,
 | 
					 | 
				
			||||||
    SymbolButtonStyle? focusedStyle,
 | 
					 | 
				
			||||||
    SymbolButtonStyle? hoveredStyle,
 | 
					 | 
				
			||||||
    SymbolButtonStyle? normalStyle,
 | 
					 | 
				
			||||||
    SymbolButtonStyle? tappedStyle,
 | 
					 | 
				
			||||||
    SymbolButtonStyle? selectedStyle,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      SymbolButtonThemeExtension(
 | 
					 | 
				
			||||||
        disabledStyle: disabledStyle ?? this.disabledStyle,
 | 
					 | 
				
			||||||
        focusedStyle: focusedStyle ?? this.focusedStyle,
 | 
					 | 
				
			||||||
        hoveredStyle: hoveredStyle ?? this.hoveredStyle,
 | 
					 | 
				
			||||||
        normalStyle: normalStyle ?? this.normalStyle,
 | 
					 | 
				
			||||||
        tappedStyle: tappedStyle ?? this.tappedStyle,
 | 
					 | 
				
			||||||
        selectedStyle: selectedStyle ?? this.selectedStyle,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<SymbolButtonThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<SymbolButtonThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! SymbolButtonThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return SymbolButtonThemeExtension(
 | 
					 | 
				
			||||||
      disabledStyle:
 | 
					 | 
				
			||||||
          SymbolButtonStyle.lerp(disabledStyle, other.disabledStyle, t),
 | 
					 | 
				
			||||||
      focusedStyle: SymbolButtonStyle.lerp(focusedStyle, other.focusedStyle, t),
 | 
					 | 
				
			||||||
      hoveredStyle: SymbolButtonStyle.lerp(hoveredStyle, other.hoveredStyle, t),
 | 
					 | 
				
			||||||
      normalStyle: SymbolButtonStyle.lerp(normalStyle, other.normalStyle, t),
 | 
					 | 
				
			||||||
      tappedStyle: SymbolButtonStyle.lerp(tappedStyle, other.tappedStyle, t),
 | 
					 | 
				
			||||||
      selectedStyle:
 | 
					 | 
				
			||||||
          SymbolButtonStyle.lerp(selectedStyle, other.selectedStyle, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,143 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template card_theme_extension}
 | 
					 | 
				
			||||||
/// Card theme extension that extends [ThemeExtension] and
 | 
					 | 
				
			||||||
/// implements copyWith, and lerp methods so you don't have to.
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class CardThemeExtension extends ThemeExtension<CardThemeExtension> {
 | 
					 | 
				
			||||||
  /// {@macro card_theme_extension}
 | 
					 | 
				
			||||||
  const CardThemeExtension({
 | 
					 | 
				
			||||||
    this.radius,
 | 
					 | 
				
			||||||
    this.padding,
 | 
					 | 
				
			||||||
    this.backgroundColors,
 | 
					 | 
				
			||||||
    this.borderColors,
 | 
					 | 
				
			||||||
    this.stroke,
 | 
					 | 
				
			||||||
    this.shadow,
 | 
					 | 
				
			||||||
    this.minSize,
 | 
					 | 
				
			||||||
    this.maxSize,
 | 
					 | 
				
			||||||
    this.titleStyle,
 | 
					 | 
				
			||||||
    this.subtitleStyle,
 | 
					 | 
				
			||||||
    this.bodyStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Card radius
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `BorderRadius.all(Radius.circular(12.0))`
 | 
					 | 
				
			||||||
  final BorderRadiusGeometry? radius;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Padding and gaps of this card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.cardTheme.margin`
 | 
					 | 
				
			||||||
  final EdgeInsetsGeometry? padding;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Card background gradient colors (from left to right)
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.cardTheme.color`
 | 
					 | 
				
			||||||
  final MultiColor? backgroundColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Border colors (from left to right).
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final MultiColor? borderColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Stroke of the border
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final double? stroke;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Drop shadow
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `null`
 | 
					 | 
				
			||||||
  final BoxShadow? shadow;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Minimum size of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `const Size(330, 0)`
 | 
					 | 
				
			||||||
  final Size? minSize;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Maximum size of the card
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `const Size(double.infinity, double.infinity)`
 | 
					 | 
				
			||||||
  final Size? maxSize;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Title text style
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.textTheme.titleLarge`
 | 
					 | 
				
			||||||
  final TextStyle? titleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle text style
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.textTheme.titleMedium`
 | 
					 | 
				
			||||||
  final TextStyle? subtitleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Body text style
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Default to `Theme.textTheme.bodyMedium`
 | 
					 | 
				
			||||||
  final TextStyle? bodyStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<CardThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    BorderRadiusGeometry? radius,
 | 
					 | 
				
			||||||
    EdgeInsetsGeometry? padding,
 | 
					 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					 | 
				
			||||||
    MultiColor? borderColors,
 | 
					 | 
				
			||||||
    double? stroke,
 | 
					 | 
				
			||||||
    BoxShadow? shadow,
 | 
					 | 
				
			||||||
    Size? minSize,
 | 
					 | 
				
			||||||
    Size? maxSize,
 | 
					 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    TextStyle? bodyStyle,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      CardThemeExtension(
 | 
					 | 
				
			||||||
        radius: radius ?? this.radius,
 | 
					 | 
				
			||||||
        padding: padding ?? this.padding,
 | 
					 | 
				
			||||||
        backgroundColors: backgroundColors ?? this.backgroundColors,
 | 
					 | 
				
			||||||
        borderColors: borderColors ?? this.borderColors,
 | 
					 | 
				
			||||||
        stroke: stroke ?? this.stroke,
 | 
					 | 
				
			||||||
        shadow: shadow ?? this.shadow,
 | 
					 | 
				
			||||||
        minSize: minSize ?? this.minSize,
 | 
					 | 
				
			||||||
        maxSize: maxSize ?? this.maxSize,
 | 
					 | 
				
			||||||
        titleStyle: titleStyle ?? this.titleStyle,
 | 
					 | 
				
			||||||
        subtitleStyle: subtitleStyle ?? this.subtitleStyle,
 | 
					 | 
				
			||||||
        bodyStyle: bodyStyle ?? this.bodyStyle,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<CardThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<CardThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! CardThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return CardThemeExtension(
 | 
					 | 
				
			||||||
      radius: BorderRadiusGeometry.lerp(radius, other.radius, t),
 | 
					 | 
				
			||||||
      padding: EdgeInsetsGeometry.lerp(padding, other.padding, t),
 | 
					 | 
				
			||||||
      backgroundColors:
 | 
					 | 
				
			||||||
          MultiColor.lerp(backgroundColors, other.backgroundColors, t),
 | 
					 | 
				
			||||||
      borderColors: MultiColor.lerp(borderColors, other.borderColors, t),
 | 
					 | 
				
			||||||
      shadow: BoxShadow.lerp(shadow, other.shadow, t),
 | 
					 | 
				
			||||||
      bodyStyle: TextStyle.lerp(bodyStyle, other.bodyStyle, t),
 | 
					 | 
				
			||||||
      titleStyle: TextStyle.lerp(titleStyle, other.titleStyle, t),
 | 
					 | 
				
			||||||
      subtitleStyle: TextStyle.lerp(subtitleStyle, other.subtitleStyle, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,55 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class RichTextBuilderThemeExtension
 | 
					 | 
				
			||||||
    extends ThemeExtension<RichTextBuilderThemeExtension> {
 | 
					 | 
				
			||||||
  const RichTextBuilderThemeExtension({
 | 
					 | 
				
			||||||
    this.defaultStyle,
 | 
					 | 
				
			||||||
    this.styles,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Default TextStyle used in this rich text component.
 | 
					 | 
				
			||||||
  final TextStyle? defaultStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Used styles in this rich text component.
 | 
					 | 
				
			||||||
  final Map<String, TextStyle>? styles;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<RichTextBuilderThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    TextStyle? defaultStyle,
 | 
					 | 
				
			||||||
    Map<String, TextStyle>? styles,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      RichTextBuilderThemeExtension(
 | 
					 | 
				
			||||||
        defaultStyle: defaultStyle ?? this.defaultStyle,
 | 
					 | 
				
			||||||
        styles: styles ?? this.styles,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<RichTextBuilderThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<RichTextBuilderThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! RichTextBuilderThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return RichTextBuilderThemeExtension(
 | 
					 | 
				
			||||||
      defaultStyle: TextStyle.lerp(defaultStyle, other.defaultStyle, t),
 | 
					 | 
				
			||||||
      styles: styles,
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,69 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/text_inputs/text_input_style.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class TextInputThemeExtension extends ThemeExtension<TextInputThemeExtension> {
 | 
					 | 
				
			||||||
  const TextInputThemeExtension({
 | 
					 | 
				
			||||||
    this.normalStyle,
 | 
					 | 
				
			||||||
    this.focusedStyle,
 | 
					 | 
				
			||||||
    this.invalidStyle,
 | 
					 | 
				
			||||||
    this.disabledStyle,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The default style for TextInputs.
 | 
					 | 
				
			||||||
  final TextInputStyle? normalStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The style for TextInputs when they are focused.
 | 
					 | 
				
			||||||
  final TextInputStyle? focusedStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The style for TextInputs when they are invalid.
 | 
					 | 
				
			||||||
  final TextInputStyle? invalidStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The style for TextInputs when they are disabled.
 | 
					 | 
				
			||||||
  final TextInputStyle? disabledStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<TextInputThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<TextInputThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! TextInputThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return TextInputThemeExtension(
 | 
					 | 
				
			||||||
      normalStyle: TextInputStyle.lerp(normalStyle, other.normalStyle, t),
 | 
					 | 
				
			||||||
      focusedStyle: TextInputStyle.lerp(focusedStyle, other.focusedStyle, t),
 | 
					 | 
				
			||||||
      disabledStyle: TextInputStyle.lerp(disabledStyle, other.disabledStyle, t),
 | 
					 | 
				
			||||||
      invalidStyle: TextInputStyle.lerp(invalidStyle, other.invalidStyle, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<TextInputThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    TextInputStyle? normalStyle,
 | 
					 | 
				
			||||||
    TextInputStyle? focusedStyle,
 | 
					 | 
				
			||||||
    TextInputStyle? disabledStyle,
 | 
					 | 
				
			||||||
    TextInputStyle? invalidStyle,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      TextInputThemeExtension(
 | 
					 | 
				
			||||||
        normalStyle: normalStyle ?? this.normalStyle,
 | 
					 | 
				
			||||||
        focusedStyle: focusedStyle ?? this.focusedStyle,
 | 
					 | 
				
			||||||
        disabledStyle: disabledStyle ?? this.disabledStyle,
 | 
					 | 
				
			||||||
        invalidStyle: invalidStyle ?? this.invalidStyle,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,98 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class TopBarThemeExtension extends ThemeExtension<TopBarThemeExtension> {
 | 
					 | 
				
			||||||
  const TopBarThemeExtension({
 | 
					 | 
				
			||||||
    this.iconTheme,
 | 
					 | 
				
			||||||
    this.backgroundColors,
 | 
					 | 
				
			||||||
    this.titleStyle,
 | 
					 | 
				
			||||||
    this.subtitleStyle,
 | 
					 | 
				
			||||||
    this.selectedIndicatorColors,
 | 
					 | 
				
			||||||
    this.selectedIndicatorSize,
 | 
					 | 
				
			||||||
    this.dividerColor,
 | 
					 | 
				
			||||||
  });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Background colors from start to end of the top bar.
 | 
					 | 
				
			||||||
  final MultiColor? backgroundColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Icon theme used in this top bar.
 | 
					 | 
				
			||||||
  final IconThemeData? iconTheme;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Selected indicator colors used in this top bar.
 | 
					 | 
				
			||||||
  final MultiColor? selectedIndicatorColors;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Divider color used in this top bar.
 | 
					 | 
				
			||||||
  final Color? dividerColor;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Title style used in this top bar.
 | 
					 | 
				
			||||||
  final TextStyle? titleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Subtitle style used in this top bar.
 | 
					 | 
				
			||||||
  final TextStyle? subtitleStyle;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Selected indicator size used in this top bar.
 | 
					 | 
				
			||||||
  final Size? selectedIndicatorSize;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<TopBarThemeExtension> copyWith({
 | 
					 | 
				
			||||||
    MultiColor? backgroundColors,
 | 
					 | 
				
			||||||
    IconThemeData? iconTheme,
 | 
					 | 
				
			||||||
    MultiColor? selectedIndicatorColors,
 | 
					 | 
				
			||||||
    Color? dividerColor,
 | 
					 | 
				
			||||||
    TextStyle? titleStyle,
 | 
					 | 
				
			||||||
    TextStyle? subtitleStyle,
 | 
					 | 
				
			||||||
    Size? selectedIndicatorSize,
 | 
					 | 
				
			||||||
  }) =>
 | 
					 | 
				
			||||||
      TopBarThemeExtension(
 | 
					 | 
				
			||||||
        iconTheme: iconTheme ?? this.iconTheme,
 | 
					 | 
				
			||||||
        backgroundColors: backgroundColors ?? this.backgroundColors,
 | 
					 | 
				
			||||||
        selectedIndicatorColors:
 | 
					 | 
				
			||||||
            selectedIndicatorColors ?? this.selectedIndicatorColors,
 | 
					 | 
				
			||||||
        dividerColor: dividerColor ?? this.dividerColor,
 | 
					 | 
				
			||||||
        titleStyle: titleStyle ?? this.titleStyle,
 | 
					 | 
				
			||||||
        subtitleStyle: subtitleStyle ?? this.subtitleStyle,
 | 
					 | 
				
			||||||
        selectedIndicatorSize:
 | 
					 | 
				
			||||||
            selectedIndicatorSize ?? this.selectedIndicatorSize,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  ThemeExtension<TopBarThemeExtension> lerp(
 | 
					 | 
				
			||||||
    covariant ThemeExtension<TopBarThemeExtension>? other,
 | 
					 | 
				
			||||||
    double t,
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    if (other is! TopBarThemeExtension) {
 | 
					 | 
				
			||||||
      return this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return TopBarThemeExtension(
 | 
					 | 
				
			||||||
      iconTheme: IconThemeData.lerp(iconTheme, other.iconTheme, t),
 | 
					 | 
				
			||||||
      backgroundColors:
 | 
					 | 
				
			||||||
          MultiColor.lerp(backgroundColors, other.backgroundColors, t),
 | 
					 | 
				
			||||||
      selectedIndicatorColors: MultiColor.lerp(
 | 
					 | 
				
			||||||
        selectedIndicatorColors,
 | 
					 | 
				
			||||||
        other.selectedIndicatorColors,
 | 
					 | 
				
			||||||
        t,
 | 
					 | 
				
			||||||
      ),
 | 
					 | 
				
			||||||
      dividerColor: Color.lerp(dividerColor, other.dividerColor, t),
 | 
					 | 
				
			||||||
      titleStyle: TextStyle.lerp(titleStyle, other.titleStyle, t),
 | 
					 | 
				
			||||||
      subtitleStyle: TextStyle.lerp(subtitleStyle, other.subtitleStyle, t),
 | 
					 | 
				
			||||||
      selectedIndicatorSize:
 | 
					 | 
				
			||||||
          Size.lerp(selectedIndicatorSize, other.selectedIndicatorSize, t),
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -15,7 +15,7 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					import 'package:wyatt_ui_components/src/features/features.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// {@template component_theme}
 | 
					/// {@template component_theme}
 | 
				
			||||||
/// A [ComponentTheme] widget that provides a [ComponentThemeData] to its
 | 
					/// A [ComponentTheme] widget that provides a [ComponentThemeData] to its
 | 
				
			||||||
@ -25,17 +25,11 @@ class ComponentTheme extends StatelessWidget {
 | 
				
			|||||||
  /// {@macro component_theme}
 | 
					  /// {@macro component_theme}
 | 
				
			||||||
  const ComponentTheme({
 | 
					  const ComponentTheme({
 | 
				
			||||||
    required this.child,
 | 
					    required this.child,
 | 
				
			||||||
    required this.data,
 | 
					    required this.componentThemeWidget,
 | 
				
			||||||
    super.key,
 | 
					    super.key,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The [ComponentThemeData] of this widget.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// This contains all components instances of the theme.
 | 
					 | 
				
			||||||
  final ComponentThemeData data;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// The widget below this widget in the tree.
 | 
					 | 
				
			||||||
  final Widget child;
 | 
					  final Widget child;
 | 
				
			||||||
 | 
					  final ComponentThemeData componentThemeWidget;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns the [ComponentThemeData] of the closest ancestor [ComponentTheme]
 | 
					  /// Returns the [ComponentThemeData] of the closest ancestor [ComponentTheme]
 | 
				
			||||||
  /// widget. If there is no ancestor [ComponentTheme] widget, it throws an
 | 
					  /// widget. If there is no ancestor [ComponentTheme] widget, it throws an
 | 
				
			||||||
@ -48,7 +42,7 @@ class ComponentTheme extends StatelessWidget {
 | 
				
			|||||||
      inheritedThemeComponent != null,
 | 
					      inheritedThemeComponent != null,
 | 
				
			||||||
      'Theme component not find in tree',
 | 
					      'Theme component not find in tree',
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    return inheritedThemeComponent!.themeWidget.data;
 | 
					    return inheritedThemeComponent!.themeWidget.componentThemeWidget;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Returns the [ComponentThemeData] of the closest ancestor [ComponentTheme]
 | 
					  /// Returns the [ComponentThemeData] of the closest ancestor [ComponentTheme]
 | 
				
			||||||
@ -57,7 +51,7 @@ class ComponentTheme extends StatelessWidget {
 | 
				
			|||||||
    final _InheritedComponentTheme? inheritedThemeComponent =
 | 
					    final _InheritedComponentTheme? inheritedThemeComponent =
 | 
				
			||||||
        context.dependOnInheritedWidgetOfExactType<_InheritedComponentTheme>();
 | 
					        context.dependOnInheritedWidgetOfExactType<_InheritedComponentTheme>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return inheritedThemeComponent?.themeWidget.data;
 | 
					    return inheritedThemeComponent?.themeWidget.componentThemeWidget;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,6 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:copy_with_extension/copy_with_extension.dart';
 | 
					import 'package:copy_with_extension/copy_with_extension.dart';
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/src/domain/entities/entities.dart';
 | 
					import 'package:wyatt_ui_components/src/domain/entities/entities.dart';
 | 
				
			||||||
part 'component_theme_data.g.dart';
 | 
					part 'component_theme_data.g.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -24,153 +23,82 @@ part 'component_theme_data.g.dart';
 | 
				
			|||||||
/// {@endtemplate}
 | 
					/// {@endtemplate}
 | 
				
			||||||
@CopyWith()
 | 
					@CopyWith()
 | 
				
			||||||
class ComponentThemeData {
 | 
					class ComponentThemeData {
 | 
				
			||||||
  /// {@macro component_theme_data}
 | 
					 | 
				
			||||||
  factory ComponentThemeData({
 | 
					  factory ComponentThemeData({
 | 
				
			||||||
    TopAppBarComponent? topAppBar,
 | 
					    TopAppBarComponent? appBar,
 | 
				
			||||||
    TopNavigationBarComponent? topNavigationBar,
 | 
					    TopNavigationBarComponent? topNavigationBarComponent,
 | 
				
			||||||
    BottomNavigationBarComponent? bottomNavigationBar,
 | 
					    BottomNavigationBarComponent? bottomNavigationBar,
 | 
				
			||||||
    ErrorComponent? error,
 | 
					    ErrorWidgetComponent? errorWidget,
 | 
				
			||||||
    LoaderComponent? loader,
 | 
					    LoadingWidgetComponent? loadingWidget,
 | 
				
			||||||
    RichTextBuilderComponent? richTextBuilder,
 | 
					    LoaderComponent? loaderComponent,
 | 
				
			||||||
    TextInputComponent? textInput,
 | 
					    RichTextBuilderComponent? richTextBuilderComponent,
 | 
				
			||||||
    FileSelectionButtonComponent? fileSelectionButton,
 | 
					    TextInputComponent? textInputComponent,
 | 
				
			||||||
    FlatButtonComponent? flatButton,
 | 
					    FileSelectionButtonComponent? fileSelectionButtonComponent,
 | 
				
			||||||
    SimpleIconButtonComponent? simpleIconButton,
 | 
					    FlatButtonComponent? flatButtonComponent,
 | 
				
			||||||
    SymbolButtonComponent? symbolButton,
 | 
					    SimpleIconButtonComponent? simpleIconButtonComponent,
 | 
				
			||||||
    InformationCardComponent? informationCard,
 | 
					    SymbolButtonComponent? symbolButtonComponent,
 | 
				
			||||||
    PortfolioCardComponent? portfolioCard,
 | 
					    InformationCardComponent? informationCardComponent,
 | 
				
			||||||
    QuoteCardComponent? quoteCard,
 | 
					    PortfolioCardComponent? portfolioCardComponent,
 | 
				
			||||||
    SkillCardComponent? skillCard,
 | 
					    QuoteCardComponent? quoteCardComponent,
 | 
				
			||||||
 | 
					    SkillCardComponent? skillCardComponent,
 | 
				
			||||||
  }) =>
 | 
					  }) =>
 | 
				
			||||||
      ComponentThemeData.raw(
 | 
					      ComponentThemeData.raw(
 | 
				
			||||||
        topAppBar: topAppBar,
 | 
					        appBar: appBar,
 | 
				
			||||||
        topNavigationBar: topNavigationBar,
 | 
					        topNavigationBarComponent: topNavigationBarComponent,
 | 
				
			||||||
        bottomNavigationBar: bottomNavigationBar,
 | 
					        bottomNavigationBar: bottomNavigationBar,
 | 
				
			||||||
        error: error,
 | 
					        errorWidget: errorWidget,
 | 
				
			||||||
        loader: loader,
 | 
					        loadingWidget: loadingWidget,
 | 
				
			||||||
        richTextBuilder: richTextBuilder,
 | 
					        loaderComponent: loaderComponent,
 | 
				
			||||||
        textInput: textInput,
 | 
					        richTextBuilderComponent: richTextBuilderComponent,
 | 
				
			||||||
        fileSelectionButton: fileSelectionButton,
 | 
					        textInputComponent: textInputComponent,
 | 
				
			||||||
        flatButton: flatButton,
 | 
					        fileSelectionButtonComponent: fileSelectionButtonComponent,
 | 
				
			||||||
        simpleIconButton: simpleIconButton,
 | 
					        flatButtonComponent: flatButtonComponent,
 | 
				
			||||||
        symbolButton: symbolButton,
 | 
					        simpleIconButtonComponent: simpleIconButtonComponent,
 | 
				
			||||||
        informationCard: informationCard,
 | 
					        symbolButtonComponent: symbolButtonComponent,
 | 
				
			||||||
        portfolioCard: portfolioCard,
 | 
					        informationCardComponent: informationCardComponent,
 | 
				
			||||||
        quoteCard: quoteCard,
 | 
					        portfolioCardComponent: portfolioCardComponent,
 | 
				
			||||||
        skillCard: skillCard,
 | 
					        quoteCardComponent: quoteCardComponent,
 | 
				
			||||||
 | 
					        skillCardComponent: skillCardComponent,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// {@macro component_theme_data}
 | 
					 | 
				
			||||||
  factory ComponentThemeData.fromOther(ComponentThemeData other) =>
 | 
					 | 
				
			||||||
      ComponentThemeData(
 | 
					 | 
				
			||||||
        topAppBar: other.topAppBar,
 | 
					 | 
				
			||||||
        topNavigationBar: other.topNavigationBar,
 | 
					 | 
				
			||||||
        bottomNavigationBar: other.bottomNavigationBar,
 | 
					 | 
				
			||||||
        error: other.error,
 | 
					 | 
				
			||||||
        loader: other.loader,
 | 
					 | 
				
			||||||
        richTextBuilder: other.richTextBuilder,
 | 
					 | 
				
			||||||
        textInput: other.textInput,
 | 
					 | 
				
			||||||
        fileSelectionButton: other.fileSelectionButton,
 | 
					 | 
				
			||||||
        flatButton: other.flatButton,
 | 
					 | 
				
			||||||
        simpleIconButton: other.simpleIconButton,
 | 
					 | 
				
			||||||
        symbolButton: other.symbolButton,
 | 
					 | 
				
			||||||
        informationCard: other.informationCard,
 | 
					 | 
				
			||||||
        portfolioCard: other.portfolioCard,
 | 
					 | 
				
			||||||
        quoteCard: other.quoteCard,
 | 
					 | 
				
			||||||
        skillCard: other.skillCard,
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Create a [ComponentThemeData] given a set of exact values. Most values
 | 
					 | 
				
			||||||
  /// must be specified.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// This will rarely be used directly. It is used by lerp to
 | 
					 | 
				
			||||||
  /// create intermediate themes based on two themes created with the
 | 
					 | 
				
			||||||
  /// [ComponentThemeData] constructor.
 | 
					 | 
				
			||||||
  const ComponentThemeData.raw({
 | 
					  const ComponentThemeData.raw({
 | 
				
			||||||
    this.topAppBar,
 | 
					    this.appBar,
 | 
				
			||||||
    this.topNavigationBar,
 | 
					    this.topNavigationBarComponent,
 | 
				
			||||||
    this.bottomNavigationBar,
 | 
					    this.bottomNavigationBar,
 | 
				
			||||||
    this.error,
 | 
					    this.errorWidget,
 | 
				
			||||||
    this.loader,
 | 
					    this.loadingWidget,
 | 
				
			||||||
    this.richTextBuilder,
 | 
					    this.loaderComponent,
 | 
				
			||||||
    this.textInput,
 | 
					    this.richTextBuilderComponent,
 | 
				
			||||||
    this.fileSelectionButton,
 | 
					    this.textInputComponent,
 | 
				
			||||||
    this.flatButton,
 | 
					    this.fileSelectionButtonComponent,
 | 
				
			||||||
    this.simpleIconButton,
 | 
					    this.flatButtonComponent,
 | 
				
			||||||
    this.symbolButton,
 | 
					    this.simpleIconButtonComponent,
 | 
				
			||||||
    this.informationCard,
 | 
					    this.symbolButtonComponent,
 | 
				
			||||||
    this.portfolioCard,
 | 
					    this.informationCardComponent,
 | 
				
			||||||
    this.quoteCard,
 | 
					    this.portfolioCardComponent,
 | 
				
			||||||
    this.skillCard,
 | 
					    this.quoteCardComponent,
 | 
				
			||||||
 | 
					    this.skillCardComponent,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  R _get<T extends Component, R>(T? component, R? returned) {
 | 
					  final TopAppBarComponent? appBar;
 | 
				
			||||||
    if (component == null) {
 | 
					 | 
				
			||||||
      throw FlutterError('No $T component provided.\n'
 | 
					 | 
				
			||||||
          'Please provide a $T component in the ComponentThemeData.');
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (returned == null) {
 | 
					  final TopNavigationBarComponent? topNavigationBarComponent;
 | 
				
			||||||
      throw FlutterError('$T does not have a CopyWith method.\n'
 | 
					 | 
				
			||||||
          'Please provide a $T component that implements CopyWith '
 | 
					 | 
				
			||||||
          'in the ComponentThemeData.');
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return returned;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Bars
 | 
					 | 
				
			||||||
  final TopAppBarComponent? topAppBar;
 | 
					 | 
				
			||||||
  $TopAppBarComponentCWProxy get topAppBarComponent =>
 | 
					 | 
				
			||||||
      _get(topAppBar, topAppBar?.copyWith);
 | 
					 | 
				
			||||||
  final TopNavigationBarComponent? topNavigationBar;
 | 
					 | 
				
			||||||
  $TopNavigationBarComponentCWProxy get topNavigationBarComponent =>
 | 
					 | 
				
			||||||
      _get(topNavigationBar, topNavigationBar?.copyWith);
 | 
					 | 
				
			||||||
  final BottomNavigationBarComponent? bottomNavigationBar;
 | 
					  final BottomNavigationBarComponent? bottomNavigationBar;
 | 
				
			||||||
  $BottomNavigationBarComponentCWProxy get bottomNavigationBarComponent =>
 | 
					  final ErrorWidgetComponent? errorWidget;
 | 
				
			||||||
      _get(bottomNavigationBar, bottomNavigationBar?.copyWith);
 | 
					  final LoadingWidgetComponent? loadingWidget;
 | 
				
			||||||
 | 
					  final LoaderComponent? loaderComponent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // CRUD Widgets
 | 
					  final RichTextBuilderComponent? richTextBuilderComponent;
 | 
				
			||||||
  final ErrorComponent? error;
 | 
					  final TextInputComponent? textInputComponent;
 | 
				
			||||||
  $ErrorComponentCWProxy get errorComponent => _get(error, error?.copyWith);
 | 
					 | 
				
			||||||
  final LoaderComponent? loader;
 | 
					 | 
				
			||||||
  $LoaderComponentCWProxy get loaderComponent => _get(loader, loader?.copyWith);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Cards
 | 
					 | 
				
			||||||
  final InformationCardComponent? informationCard;
 | 
					 | 
				
			||||||
  $InformationCardComponentCWProxy get informationCardComponent =>
 | 
					 | 
				
			||||||
      _get(informationCard, informationCard?.copyWith);
 | 
					 | 
				
			||||||
  final PortfolioCardComponent? portfolioCard;
 | 
					 | 
				
			||||||
  $PortfolioCardComponentCWProxy get portfolioCardComponent =>
 | 
					 | 
				
			||||||
      _get(portfolioCard, portfolioCard?.copyWith);
 | 
					 | 
				
			||||||
  final QuoteCardComponent? quoteCard;
 | 
					 | 
				
			||||||
  $QuoteCardComponentCWProxy get quoteCardComponent =>
 | 
					 | 
				
			||||||
      _get(quoteCard, quoteCard?.copyWith);
 | 
					 | 
				
			||||||
  final SkillCardComponent? skillCard;
 | 
					 | 
				
			||||||
  $SkillCardComponentCWProxy get skillCardComponent =>
 | 
					 | 
				
			||||||
      _get(skillCard, skillCard?.copyWith);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Rich Text
 | 
					 | 
				
			||||||
  final RichTextBuilderComponent? richTextBuilder;
 | 
					 | 
				
			||||||
  $RichTextBuilderComponentCWProxy get richTextBuilderComponent =>
 | 
					 | 
				
			||||||
      _get(richTextBuilder, richTextBuilder?.copyWith);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Text Inputs
 | 
					 | 
				
			||||||
  final TextInputComponent? textInput;
 | 
					 | 
				
			||||||
  $TextInputComponentCWProxy get textInputComponent =>
 | 
					 | 
				
			||||||
      _get(textInput, textInput?.copyWith);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Buttons
 | 
					  // Buttons
 | 
				
			||||||
  final FileSelectionButtonComponent? fileSelectionButton;
 | 
					  final FileSelectionButtonComponent? fileSelectionButtonComponent;
 | 
				
			||||||
  $FileSelectionButtonComponentCWProxy get fileSelectionButtonComponent =>
 | 
					  final FlatButtonComponent? flatButtonComponent;
 | 
				
			||||||
      _get(fileSelectionButton, fileSelectionButton?.copyWith);
 | 
					  final SimpleIconButtonComponent? simpleIconButtonComponent;
 | 
				
			||||||
  final FlatButtonComponent? flatButton;
 | 
					  final SymbolButtonComponent? symbolButtonComponent;
 | 
				
			||||||
  $FlatButtonComponentCWProxy get flatButtonComponent =>
 | 
					
 | 
				
			||||||
      _get(flatButton, flatButton?.copyWith);
 | 
					  // Cards
 | 
				
			||||||
  final SimpleIconButtonComponent? simpleIconButton;
 | 
					  final InformationCardComponent? informationCardComponent;
 | 
				
			||||||
  $SimpleIconButtonComponentCWProxy get simpleIconButtonComponent =>
 | 
					  final PortfolioCardComponent? portfolioCardComponent;
 | 
				
			||||||
      _get(simpleIconButton, simpleIconButton?.copyWith);
 | 
					  final QuoteCardComponent? quoteCardComponent;
 | 
				
			||||||
  final SymbolButtonComponent? symbolButton;
 | 
					  final SkillCardComponent? skillCardComponent;
 | 
				
			||||||
  $SymbolButtonComponentCWProxy get symbolButtonComponent =>
 | 
					 | 
				
			||||||
      _get(symbolButton, symbolButton?.copyWith);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,39 +7,46 @@ part of 'component_theme_data.dart';
 | 
				
			|||||||
// **************************************************************************
 | 
					// **************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract class _$ComponentThemeDataCWProxy {
 | 
					abstract class _$ComponentThemeDataCWProxy {
 | 
				
			||||||
  ComponentThemeData topAppBar(TopAppBarComponent? topAppBar);
 | 
					  ComponentThemeData appBar(TopAppBarComponent? appBar);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData topNavigationBar(
 | 
					  ComponentThemeData topNavigationBarComponent(
 | 
				
			||||||
      TopNavigationBarComponent? topNavigationBar);
 | 
					      TopNavigationBarComponent? topNavigationBarComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData bottomNavigationBar(
 | 
					  ComponentThemeData bottomNavigationBar(
 | 
				
			||||||
      BottomNavigationBarComponent? bottomNavigationBar);
 | 
					      BottomNavigationBarComponent? bottomNavigationBar);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData error(ErrorComponent? error);
 | 
					  ComponentThemeData errorWidget(ErrorWidgetComponent? errorWidget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData loader(LoaderComponent? loader);
 | 
					  ComponentThemeData loadingWidget(LoadingWidgetComponent? loadingWidget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData richTextBuilder(RichTextBuilderComponent? richTextBuilder);
 | 
					  ComponentThemeData loaderComponent(LoaderComponent? loaderComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData textInput(TextInputComponent? textInput);
 | 
					  ComponentThemeData richTextBuilderComponent(
 | 
				
			||||||
 | 
					      RichTextBuilderComponent? richTextBuilderComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData fileSelectionButton(
 | 
					  ComponentThemeData textInputComponent(TextInputComponent? textInputComponent);
 | 
				
			||||||
      FileSelectionButtonComponent? fileSelectionButton);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData flatButton(FlatButtonComponent? flatButton);
 | 
					  ComponentThemeData fileSelectionButtonComponent(
 | 
				
			||||||
 | 
					      FileSelectionButtonComponent? fileSelectionButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData simpleIconButton(
 | 
					  ComponentThemeData flatButtonComponent(
 | 
				
			||||||
      SimpleIconButtonComponent? simpleIconButton);
 | 
					      FlatButtonComponent? flatButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData symbolButton(SymbolButtonComponent? symbolButton);
 | 
					  ComponentThemeData simpleIconButtonComponent(
 | 
				
			||||||
 | 
					      SimpleIconButtonComponent? simpleIconButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData informationCard(InformationCardComponent? informationCard);
 | 
					  ComponentThemeData symbolButtonComponent(
 | 
				
			||||||
 | 
					      SymbolButtonComponent? symbolButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData portfolioCard(PortfolioCardComponent? portfolioCard);
 | 
					  ComponentThemeData informationCardComponent(
 | 
				
			||||||
 | 
					      InformationCardComponent? informationCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData quoteCard(QuoteCardComponent? quoteCard);
 | 
					  ComponentThemeData portfolioCardComponent(
 | 
				
			||||||
 | 
					      PortfolioCardComponent? portfolioCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ComponentThemeData skillCard(SkillCardComponent? skillCard);
 | 
					  ComponentThemeData quoteCardComponent(QuoteCardComponent? quoteCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ComponentThemeData skillCardComponent(SkillCardComponent? skillCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ComponentThemeData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
 | 
					  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `ComponentThemeData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
@ -48,21 +55,22 @@ abstract class _$ComponentThemeDataCWProxy {
 | 
				
			|||||||
  /// ComponentThemeData(...).copyWith(id: 12, name: "My name")
 | 
					  /// ComponentThemeData(...).copyWith(id: 12, name: "My name")
 | 
				
			||||||
  /// ````
 | 
					  /// ````
 | 
				
			||||||
  ComponentThemeData call({
 | 
					  ComponentThemeData call({
 | 
				
			||||||
    TopAppBarComponent? topAppBar,
 | 
					    TopAppBarComponent? appBar,
 | 
				
			||||||
    TopNavigationBarComponent? topNavigationBar,
 | 
					    TopNavigationBarComponent? topNavigationBarComponent,
 | 
				
			||||||
    BottomNavigationBarComponent? bottomNavigationBar,
 | 
					    BottomNavigationBarComponent? bottomNavigationBar,
 | 
				
			||||||
    ErrorComponent? error,
 | 
					    ErrorWidgetComponent? errorWidget,
 | 
				
			||||||
    LoaderComponent? loader,
 | 
					    LoadingWidgetComponent? loadingWidget,
 | 
				
			||||||
    RichTextBuilderComponent? richTextBuilder,
 | 
					    LoaderComponent? loaderComponent,
 | 
				
			||||||
    TextInputComponent? textInput,
 | 
					    RichTextBuilderComponent? richTextBuilderComponent,
 | 
				
			||||||
    FileSelectionButtonComponent? fileSelectionButton,
 | 
					    TextInputComponent? textInputComponent,
 | 
				
			||||||
    FlatButtonComponent? flatButton,
 | 
					    FileSelectionButtonComponent? fileSelectionButtonComponent,
 | 
				
			||||||
    SimpleIconButtonComponent? simpleIconButton,
 | 
					    FlatButtonComponent? flatButtonComponent,
 | 
				
			||||||
    SymbolButtonComponent? symbolButton,
 | 
					    SimpleIconButtonComponent? simpleIconButtonComponent,
 | 
				
			||||||
    InformationCardComponent? informationCard,
 | 
					    SymbolButtonComponent? symbolButtonComponent,
 | 
				
			||||||
    PortfolioCardComponent? portfolioCard,
 | 
					    InformationCardComponent? informationCardComponent,
 | 
				
			||||||
    QuoteCardComponent? quoteCard,
 | 
					    PortfolioCardComponent? portfolioCardComponent,
 | 
				
			||||||
    SkillCardComponent? skillCard,
 | 
					    QuoteCardComponent? quoteCardComponent,
 | 
				
			||||||
 | 
					    SkillCardComponent? skillCardComponent,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -73,13 +81,12 @@ class _$ComponentThemeDataCWProxyImpl implements _$ComponentThemeDataCWProxy {
 | 
				
			|||||||
  final ComponentThemeData _value;
 | 
					  final ComponentThemeData _value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData topAppBar(TopAppBarComponent? topAppBar) =>
 | 
					  ComponentThemeData appBar(TopAppBarComponent? appBar) => this(appBar: appBar);
 | 
				
			||||||
      this(topAppBar: topAppBar);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData topNavigationBar(
 | 
					  ComponentThemeData topNavigationBarComponent(
 | 
				
			||||||
          TopNavigationBarComponent? topNavigationBar) =>
 | 
					          TopNavigationBarComponent? topNavigationBarComponent) =>
 | 
				
			||||||
      this(topNavigationBar: topNavigationBar);
 | 
					      this(topNavigationBarComponent: topNavigationBarComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData bottomNavigationBar(
 | 
					  ComponentThemeData bottomNavigationBar(
 | 
				
			||||||
@ -87,54 +94,66 @@ class _$ComponentThemeDataCWProxyImpl implements _$ComponentThemeDataCWProxy {
 | 
				
			|||||||
      this(bottomNavigationBar: bottomNavigationBar);
 | 
					      this(bottomNavigationBar: bottomNavigationBar);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData error(ErrorComponent? error) => this(error: error);
 | 
					  ComponentThemeData errorWidget(ErrorWidgetComponent? errorWidget) =>
 | 
				
			||||||
 | 
					      this(errorWidget: errorWidget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData loader(LoaderComponent? loader) => this(loader: loader);
 | 
					  ComponentThemeData loadingWidget(LoadingWidgetComponent? loadingWidget) =>
 | 
				
			||||||
 | 
					      this(loadingWidget: loadingWidget);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData richTextBuilder(
 | 
					  ComponentThemeData loaderComponent(LoaderComponent? loaderComponent) =>
 | 
				
			||||||
          RichTextBuilderComponent? richTextBuilder) =>
 | 
					      this(loaderComponent: loaderComponent);
 | 
				
			||||||
      this(richTextBuilder: richTextBuilder);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData textInput(TextInputComponent? textInput) =>
 | 
					  ComponentThemeData richTextBuilderComponent(
 | 
				
			||||||
      this(textInput: textInput);
 | 
					          RichTextBuilderComponent? richTextBuilderComponent) =>
 | 
				
			||||||
 | 
					      this(richTextBuilderComponent: richTextBuilderComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData fileSelectionButton(
 | 
					  ComponentThemeData textInputComponent(
 | 
				
			||||||
          FileSelectionButtonComponent? fileSelectionButton) =>
 | 
					          TextInputComponent? textInputComponent) =>
 | 
				
			||||||
      this(fileSelectionButton: fileSelectionButton);
 | 
					      this(textInputComponent: textInputComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData flatButton(FlatButtonComponent? flatButton) =>
 | 
					  ComponentThemeData fileSelectionButtonComponent(
 | 
				
			||||||
      this(flatButton: flatButton);
 | 
					          FileSelectionButtonComponent? fileSelectionButtonComponent) =>
 | 
				
			||||||
 | 
					      this(fileSelectionButtonComponent: fileSelectionButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData simpleIconButton(
 | 
					  ComponentThemeData flatButtonComponent(
 | 
				
			||||||
          SimpleIconButtonComponent? simpleIconButton) =>
 | 
					          FlatButtonComponent? flatButtonComponent) =>
 | 
				
			||||||
      this(simpleIconButton: simpleIconButton);
 | 
					      this(flatButtonComponent: flatButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData symbolButton(SymbolButtonComponent? symbolButton) =>
 | 
					  ComponentThemeData simpleIconButtonComponent(
 | 
				
			||||||
      this(symbolButton: symbolButton);
 | 
					          SimpleIconButtonComponent? simpleIconButtonComponent) =>
 | 
				
			||||||
 | 
					      this(simpleIconButtonComponent: simpleIconButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData informationCard(
 | 
					  ComponentThemeData symbolButtonComponent(
 | 
				
			||||||
          InformationCardComponent? informationCard) =>
 | 
					          SymbolButtonComponent? symbolButtonComponent) =>
 | 
				
			||||||
      this(informationCard: informationCard);
 | 
					      this(symbolButtonComponent: symbolButtonComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData portfolioCard(PortfolioCardComponent? portfolioCard) =>
 | 
					  ComponentThemeData informationCardComponent(
 | 
				
			||||||
      this(portfolioCard: portfolioCard);
 | 
					          InformationCardComponent? informationCardComponent) =>
 | 
				
			||||||
 | 
					      this(informationCardComponent: informationCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData quoteCard(QuoteCardComponent? quoteCard) =>
 | 
					  ComponentThemeData portfolioCardComponent(
 | 
				
			||||||
      this(quoteCard: quoteCard);
 | 
					          PortfolioCardComponent? portfolioCardComponent) =>
 | 
				
			||||||
 | 
					      this(portfolioCardComponent: portfolioCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  ComponentThemeData skillCard(SkillCardComponent? skillCard) =>
 | 
					  ComponentThemeData quoteCardComponent(
 | 
				
			||||||
      this(skillCard: skillCard);
 | 
					          QuoteCardComponent? quoteCardComponent) =>
 | 
				
			||||||
 | 
					      this(quoteCardComponent: quoteCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  ComponentThemeData skillCardComponent(
 | 
				
			||||||
 | 
					          SkillCardComponent? skillCardComponent) =>
 | 
				
			||||||
 | 
					      this(skillCardComponent: skillCardComponent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -145,83 +164,95 @@ class _$ComponentThemeDataCWProxyImpl implements _$ComponentThemeDataCWProxy {
 | 
				
			|||||||
  /// ComponentThemeData(...).copyWith(id: 12, name: "My name")
 | 
					  /// ComponentThemeData(...).copyWith(id: 12, name: "My name")
 | 
				
			||||||
  /// ````
 | 
					  /// ````
 | 
				
			||||||
  ComponentThemeData call({
 | 
					  ComponentThemeData call({
 | 
				
			||||||
    Object? topAppBar = const $CopyWithPlaceholder(),
 | 
					    Object? appBar = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? topNavigationBar = const $CopyWithPlaceholder(),
 | 
					    Object? topNavigationBarComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? bottomNavigationBar = const $CopyWithPlaceholder(),
 | 
					    Object? bottomNavigationBar = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? error = const $CopyWithPlaceholder(),
 | 
					    Object? errorWidget = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? loader = const $CopyWithPlaceholder(),
 | 
					    Object? loadingWidget = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? richTextBuilder = const $CopyWithPlaceholder(),
 | 
					    Object? loaderComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? textInput = const $CopyWithPlaceholder(),
 | 
					    Object? richTextBuilderComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? fileSelectionButton = const $CopyWithPlaceholder(),
 | 
					    Object? textInputComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? flatButton = const $CopyWithPlaceholder(),
 | 
					    Object? fileSelectionButtonComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? simpleIconButton = const $CopyWithPlaceholder(),
 | 
					    Object? flatButtonComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? symbolButton = const $CopyWithPlaceholder(),
 | 
					    Object? simpleIconButtonComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? informationCard = const $CopyWithPlaceholder(),
 | 
					    Object? symbolButtonComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? portfolioCard = const $CopyWithPlaceholder(),
 | 
					    Object? informationCardComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? quoteCard = const $CopyWithPlaceholder(),
 | 
					    Object? portfolioCardComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
    Object? skillCard = const $CopyWithPlaceholder(),
 | 
					    Object? quoteCardComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
 | 
					    Object? skillCardComponent = const $CopyWithPlaceholder(),
 | 
				
			||||||
  }) {
 | 
					  }) {
 | 
				
			||||||
    return ComponentThemeData(
 | 
					    return ComponentThemeData(
 | 
				
			||||||
      topAppBar: topAppBar == const $CopyWithPlaceholder()
 | 
					      appBar: appBar == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.topAppBar
 | 
					          ? _value.appBar
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : topAppBar as TopAppBarComponent?,
 | 
					          : appBar as TopAppBarComponent?,
 | 
				
			||||||
      topNavigationBar: topNavigationBar == const $CopyWithPlaceholder()
 | 
					      topNavigationBarComponent:
 | 
				
			||||||
          ? _value.topNavigationBar
 | 
					          topNavigationBarComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.topNavigationBarComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : topNavigationBar as TopNavigationBarComponent?,
 | 
					              : topNavigationBarComponent as TopNavigationBarComponent?,
 | 
				
			||||||
      bottomNavigationBar: bottomNavigationBar == const $CopyWithPlaceholder()
 | 
					      bottomNavigationBar: bottomNavigationBar == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.bottomNavigationBar
 | 
					          ? _value.bottomNavigationBar
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : bottomNavigationBar as BottomNavigationBarComponent?,
 | 
					          : bottomNavigationBar as BottomNavigationBarComponent?,
 | 
				
			||||||
      error: error == const $CopyWithPlaceholder()
 | 
					      errorWidget: errorWidget == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.error
 | 
					          ? _value.errorWidget
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : error as ErrorComponent?,
 | 
					          : errorWidget as ErrorWidgetComponent?,
 | 
				
			||||||
      loader: loader == const $CopyWithPlaceholder()
 | 
					      loadingWidget: loadingWidget == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.loader
 | 
					          ? _value.loadingWidget
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : loader as LoaderComponent?,
 | 
					          : loadingWidget as LoadingWidgetComponent?,
 | 
				
			||||||
      richTextBuilder: richTextBuilder == const $CopyWithPlaceholder()
 | 
					      loaderComponent: loaderComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.richTextBuilder
 | 
					          ? _value.loaderComponent
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : richTextBuilder as RichTextBuilderComponent?,
 | 
					          : loaderComponent as LoaderComponent?,
 | 
				
			||||||
      textInput: textInput == const $CopyWithPlaceholder()
 | 
					      richTextBuilderComponent:
 | 
				
			||||||
          ? _value.textInput
 | 
					          richTextBuilderComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.richTextBuilderComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : textInput as TextInputComponent?,
 | 
					              : richTextBuilderComponent as RichTextBuilderComponent?,
 | 
				
			||||||
      fileSelectionButton: fileSelectionButton == const $CopyWithPlaceholder()
 | 
					      textInputComponent: textInputComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.fileSelectionButton
 | 
					          ? _value.textInputComponent
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : fileSelectionButton as FileSelectionButtonComponent?,
 | 
					          : textInputComponent as TextInputComponent?,
 | 
				
			||||||
      flatButton: flatButton == const $CopyWithPlaceholder()
 | 
					      fileSelectionButtonComponent:
 | 
				
			||||||
          ? _value.flatButton
 | 
					          fileSelectionButtonComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.fileSelectionButtonComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : flatButton as FlatButtonComponent?,
 | 
					              : fileSelectionButtonComponent as FileSelectionButtonComponent?,
 | 
				
			||||||
      simpleIconButton: simpleIconButton == const $CopyWithPlaceholder()
 | 
					      flatButtonComponent: flatButtonComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.simpleIconButton
 | 
					          ? _value.flatButtonComponent
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : simpleIconButton as SimpleIconButtonComponent?,
 | 
					          : flatButtonComponent as FlatButtonComponent?,
 | 
				
			||||||
      symbolButton: symbolButton == const $CopyWithPlaceholder()
 | 
					      simpleIconButtonComponent:
 | 
				
			||||||
          ? _value.symbolButton
 | 
					          simpleIconButtonComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.simpleIconButtonComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : symbolButton as SymbolButtonComponent?,
 | 
					              : simpleIconButtonComponent as SimpleIconButtonComponent?,
 | 
				
			||||||
      informationCard: informationCard == const $CopyWithPlaceholder()
 | 
					      symbolButtonComponent:
 | 
				
			||||||
          ? _value.informationCard
 | 
					          symbolButtonComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.symbolButtonComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : informationCard as InformationCardComponent?,
 | 
					              : symbolButtonComponent as SymbolButtonComponent?,
 | 
				
			||||||
      portfolioCard: portfolioCard == const $CopyWithPlaceholder()
 | 
					      informationCardComponent:
 | 
				
			||||||
          ? _value.portfolioCard
 | 
					          informationCardComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.informationCardComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : portfolioCard as PortfolioCardComponent?,
 | 
					              : informationCardComponent as InformationCardComponent?,
 | 
				
			||||||
      quoteCard: quoteCard == const $CopyWithPlaceholder()
 | 
					      portfolioCardComponent:
 | 
				
			||||||
          ? _value.quoteCard
 | 
					          portfolioCardComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					              ? _value.portfolioCardComponent
 | 
				
			||||||
              // ignore: cast_nullable_to_non_nullable
 | 
					              // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : quoteCard as QuoteCardComponent?,
 | 
					              : portfolioCardComponent as PortfolioCardComponent?,
 | 
				
			||||||
      skillCard: skillCard == const $CopyWithPlaceholder()
 | 
					      quoteCardComponent: quoteCardComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
          ? _value.skillCard
 | 
					          ? _value.quoteCardComponent
 | 
				
			||||||
          // ignore: cast_nullable_to_non_nullable
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
          : skillCard as SkillCardComponent?,
 | 
					          : quoteCardComponent as QuoteCardComponent?,
 | 
				
			||||||
 | 
					      skillCardComponent: skillCardComponent == const $CopyWithPlaceholder()
 | 
				
			||||||
 | 
					          ? _value.skillCardComponent
 | 
				
			||||||
 | 
					          // ignore: cast_nullable_to_non_nullable
 | 
				
			||||||
 | 
					          : skillCardComponent as SkillCardComponent?,
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,4 +16,3 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export 'component_theme.dart';
 | 
					export 'component_theme.dart';
 | 
				
			||||||
export 'component_theme_data.dart';
 | 
					export 'component_theme_data.dart';
 | 
				
			||||||
export 'theme_extension_provider.dart';
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -1,107 +0,0 @@
 | 
				
			|||||||
// 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 <https://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					 | 
				
			||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template theme_extension_provider}
 | 
					 | 
				
			||||||
/// A provider of [ThemeExtension]s to automatically apply to a [Theme].
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
abstract class ThemeExtensionProvider {
 | 
					 | 
				
			||||||
  /// {@macro theme_extension_provider}
 | 
					 | 
				
			||||||
  const ThemeExtensionProvider();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Returns the [ThemeExtension]s to apply to the current [ThemeData].
 | 
					 | 
				
			||||||
  List<ThemeExtension<dynamic>> getThemeExtensionsFor(ThemeData theme);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Returns a [ThemeData] with the [ThemeExtension]s applied.
 | 
					 | 
				
			||||||
  ThemeData applyExtensionsTo(
 | 
					 | 
				
			||||||
    ThemeData theme,
 | 
					 | 
				
			||||||
  ) =>
 | 
					 | 
				
			||||||
      theme.copyWith(
 | 
					 | 
				
			||||||
        extensions: [
 | 
					 | 
				
			||||||
          ...theme.extensions.values,
 | 
					 | 
				
			||||||
          ...getThemeExtensionsFor(theme),
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/// {@template default_theme_extension_provider}
 | 
					 | 
				
			||||||
/// A [ThemeExtensionProvider] that provides the default [ThemeExtension]s
 | 
					 | 
				
			||||||
/// for the current [ThemeData.brightness].
 | 
					 | 
				
			||||||
/// {@endtemplate}
 | 
					 | 
				
			||||||
class DefaultThemeExtensionProvider extends ThemeExtensionProvider {
 | 
					 | 
				
			||||||
  /// {@macro default_theme_extension_provider}
 | 
					 | 
				
			||||||
  const DefaultThemeExtensionProvider();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Default light theme extensions form Wyatt UI Components
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// This needs to be added to the [ThemeData] in order to use the
 | 
					 | 
				
			||||||
  /// Wyatt UI Components widgets.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Those extensions are the default ones used in fallback mode
 | 
					 | 
				
			||||||
  /// when no custom theme is provided.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// See `wyatt_ui_kit` for a custom theme example.
 | 
					 | 
				
			||||||
  static List<ThemeExtension<dynamic>> get defaultLight => [
 | 
					 | 
				
			||||||
        // Cards
 | 
					 | 
				
			||||||
        CardThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        // Loader
 | 
					 | 
				
			||||||
        LoaderThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        // RichText
 | 
					 | 
				
			||||||
        RichTextBuilderThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        // Buttons
 | 
					 | 
				
			||||||
        FileSelectionButtonThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        FlatButtonThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        SimpleIconButtonThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        SymbolButtonThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        // TextInput
 | 
					 | 
				
			||||||
        TextInputThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
        // TopBar
 | 
					 | 
				
			||||||
        TopBarThemeExtensionDefault.light(),
 | 
					 | 
				
			||||||
      ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /// Default dark theme extensions form Wyatt UI Components
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// This needs to be added to the [ThemeData] in order to use the
 | 
					 | 
				
			||||||
  /// Wyatt UI Components widgets.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// Those extensions are the default ones used in fallback mode
 | 
					 | 
				
			||||||
  /// when no custom theme is provided.
 | 
					 | 
				
			||||||
  ///
 | 
					 | 
				
			||||||
  /// See `wyatt_ui_kit` for a custom theme example.
 | 
					 | 
				
			||||||
  static List<ThemeExtension<dynamic>> get defaultDark => [
 | 
					 | 
				
			||||||
        // Cards
 | 
					 | 
				
			||||||
        CardThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        // Loader
 | 
					 | 
				
			||||||
        LoaderThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        // RichText
 | 
					 | 
				
			||||||
        RichTextBuilderThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        // Buttons
 | 
					 | 
				
			||||||
        FileSelectionButtonThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        FlatButtonThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        SimpleIconButtonThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        SymbolButtonThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        // TextInput
 | 
					 | 
				
			||||||
        TextInputThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
        // TopBar
 | 
					 | 
				
			||||||
        TopBarThemeExtensionDefault.dark(),
 | 
					 | 
				
			||||||
      ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  List<ThemeExtension<dynamic>> getThemeExtensionsFor(ThemeData theme) =>
 | 
					 | 
				
			||||||
      theme.brightness == Brightness.light ? defaultLight : defaultDark;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -15,6 +15,5 @@
 | 
				
			|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
					// along with this program. If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export 'core/core.dart';
 | 
					export 'core/core.dart';
 | 
				
			||||||
export 'data/data.dart';
 | 
					 | 
				
			||||||
export 'domain/domain.dart';
 | 
					export 'domain/domain.dart';
 | 
				
			||||||
export 'features/features.dart';
 | 
					export 'features/features.dart';
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@ targets:
 | 
				
			|||||||
  $default:
 | 
					  $default:
 | 
				
			||||||
    builders:
 | 
					    builders:
 | 
				
			||||||
      # Typically the builder key is just the package name, run `pub run build_runner doctor` to check your config.
 | 
					      # Typically the builder key is just the package name, run `pub run build_runner doctor` to check your config.
 | 
				
			||||||
      wyatt_component_copy_with_gen:wyatt_component_copy_with_gen:
 | 
					      wyatt_component_copy_with_gen:component_copy_with_gen:
 | 
				
			||||||
        generate_for:
 | 
					        generate_for:
 | 
				
			||||||
          # Example glob for only the Dart files under `lib/models`
 | 
					          # Example glob for only the Dart files under `lib/models`
 | 
				
			||||||
          - lib/**/*.dart
 | 
					          - lib/**/*.dart
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user