Flutter - Component Copy With Extension
This package provides annotations for generating code and simplifying the use of an UI kit within a Flutter application. The package contains only the annotation classes.
Annotation Classes
ComponentProxyExtension
This annotation class is used to annotate a new component of an UI kit in the wyatt_ui_components
package. It generates the abstract proxy of the component and allows access to all its properties in different packages and throughout the application.
part 'text_field_component.g.dart';
@ComponentProxyExtension()
abstract class TextFieldComponent extends Component {
with CopyWithMixin<$TextFieldComponentCWProxy> {
const TextFieldComponent({
...
});
}
ComponentCopyWithExtension
This annotation class is used to annotate the implementation of components directly in the application. It generates the implementation of the proxy and the mixin to ensure that the component meets the specifications defined in the wyatt_ui_components package
.
part 'text_field_component.g.dart';
@ComponentProxyExtension()
abstract class TextFieldComponent extends Component {
with CopyWithMixin<$TextFieldComponentCWProxy> {
const TextFieldComponent({
...
});
}
Additional features
The skipFields field allows you to directly and specifically change a field. This makes it easier to use. You can disable it through annotation.