feat(ui_components)!: available same type component usage (#200)
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
a4c73421d2
commit
a6903ae432
@ -43,7 +43,23 @@ First create all your custom components in `domain/entities` folder. For exemple
|
|||||||
|
|
||||||
> Run `flutter pub run build_runner build` to generate your components.
|
> Run `flutter pub run build_runner build` to generate your components.
|
||||||
|
|
||||||
Then, add your components to `ComponentThemeData` class.
|
Then, add your components to `ComponentThemeData` class. You can utilize multiple components of the same type, such as having multiple top app bars or distinct cards. However, it's necessary to distinguish them using identifiers. Extensions are provided to make your life easier. Note that it's not obligatory to assign an identifier to a component if there's only one of its kind. Here's an example:
|
||||||
|
|
||||||
|
```dart
|
||||||
|
class AppThemeComponent {
|
||||||
|
static ComponentThemeData get components => ComponentThemeData.raw(
|
||||||
|
topAppBars: const {
|
||||||
|
'root': CustomRootAppBar(),
|
||||||
|
'second': CustomSecondAppBar(),
|
||||||
|
}.registry(),
|
||||||
|
bottomNavigationBars: const CustomBottomNavigationBar().registry(),
|
||||||
|
errors: const CustomErrorWidget().registry(),
|
||||||
|
loaders: const CustomLoaderWidget().registry(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
I've rephrased the sentence while maintaining the original meaning and intent.
|
||||||
|
|
||||||
### Provider
|
### Provider
|
||||||
|
|
||||||
@ -82,21 +98,28 @@ context.components,
|
|||||||
For example :
|
For example :
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
@override
|
context.components.topAppBarComponent()(),
|
||||||
Widget build(BuildContext context) => Scaffold(
|
|
||||||
appBar: context.components.appBar,
|
|
||||||
body: ...
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you need specific settings, or pass parameters to your component, call `copyWith.call` method.
|
or
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
@override
|
appBar: context.components.topAppBarComponent().call(),
|
||||||
Widget build(BuildContext context) => Scaffold(
|
```
|
||||||
appBar: context.components.appBar.copyWith.call({title: 'New Title !'}),
|
|
||||||
body: ...
|
If you require specific settings or want to pass parameters to your component, simply provide them when you call your component.
|
||||||
)
|
|
||||||
|
```dart
|
||||||
|
context.components.loaderComponent()(
|
||||||
|
colors: const MultiColor.single(Colors.green),
|
||||||
|
),
|
||||||
|
```
|
||||||
|
|
||||||
|
And if you have only one parameter to modify, you can directly call it as shown below:
|
||||||
|
|
||||||
|
```dart
|
||||||
|
context.components.loaderComponent().
|
||||||
|
colors(const MultiColor.single(Colors.green)),
|
||||||
```
|
```
|
||||||
|
|
||||||
## Default implementation
|
## Default implementation
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
import 'package:wyatt_ui_components_example/components/custom_app_bar.dart';
|
|
||||||
import 'package:wyatt_ui_components_example/components/custom_bottom_bar.dart';
|
import 'package:wyatt_ui_components_example/components/custom_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_loader_widget.dart';
|
||||||
|
import 'package:wyatt_ui_components_example/components/custom_root_app_bar.dart';
|
||||||
|
import 'package:wyatt_ui_components_example/components/custom_second_app_bar.dart';
|
||||||
|
|
||||||
class AppThemeComponent {
|
class AppThemeComponent {
|
||||||
static ComponentThemeData get components => const ComponentThemeData.raw(
|
static ComponentThemeData get components => ComponentThemeData.raw(
|
||||||
topAppBar: CustomAppBar(),
|
topAppBars: const {
|
||||||
bottomNavigationBar: CustomBottomNavigationBar(),
|
'root': CustomRootAppBar(),
|
||||||
error: CustomErrorWidget(),
|
'second': CustomSecondAppBar(),
|
||||||
loader: CustomLoaderWidget(),
|
}.registry(),
|
||||||
|
bottomNavigationBars: const CustomBottomNavigationBar().registry(),
|
||||||
|
errors: const CustomErrorWidget().registry(),
|
||||||
|
loaders: const CustomLoaderWidget().registry(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'custom_app_bar.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// ComponentCopyWithGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
|
||||||
const $CustomAppBarCWProxyImpl(this._value);
|
|
||||||
final CustomAppBar _value;
|
|
||||||
@override
|
|
||||||
CustomAppBar title(TextWrapper? title) => this(title: title);
|
|
||||||
@override
|
|
||||||
CustomAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
|
|
||||||
@override
|
|
||||||
CustomAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
|
||||||
@override
|
|
||||||
CustomAppBar systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle) =>
|
|
||||||
this(systemOverlayStyle: systemOverlayStyle);
|
|
||||||
@override
|
|
||||||
CustomAppBar automaticallyImplyLeading(bool? automaticallyImplyLeading) =>
|
|
||||||
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
|
||||||
@override
|
|
||||||
CustomAppBar flexibleSpace(Widget? flexibleSpace) =>
|
|
||||||
this(flexibleSpace: flexibleSpace);
|
|
||||||
@override
|
|
||||||
CustomAppBar bottom(PreferredSizeWidget? bottom) => this(bottom: bottom);
|
|
||||||
@override
|
|
||||||
CustomAppBar elevation(double? elevation) => this(elevation: elevation);
|
|
||||||
@override
|
|
||||||
CustomAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
|
|
||||||
this(scrolledUnderElevation: scrolledUnderElevation);
|
|
||||||
@override
|
|
||||||
CustomAppBar shadowColor(Color? shadowColor) =>
|
|
||||||
this(shadowColor: shadowColor);
|
|
||||||
@override
|
|
||||||
CustomAppBar surfaceTintColor(Color? surfaceTintColor) =>
|
|
||||||
this(surfaceTintColor: surfaceTintColor);
|
|
||||||
@override
|
|
||||||
CustomAppBar backgroundColor(MultiColor? backgroundColor) =>
|
|
||||||
this(backgroundColor: backgroundColor);
|
|
||||||
@override
|
|
||||||
CustomAppBar iconTheme(IconThemeData? iconTheme) =>
|
|
||||||
this(iconTheme: iconTheme);
|
|
||||||
@override
|
|
||||||
CustomAppBar primary(bool? primary) => this(primary: primary);
|
|
||||||
@override
|
|
||||||
CustomAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
|
||||||
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
|
||||||
@override
|
|
||||||
CustomAppBar toolbarHeight(double? toolbarHeight) =>
|
|
||||||
this(toolbarHeight: toolbarHeight);
|
|
||||||
@override
|
|
||||||
CustomAppBar leadingWidth(double? leadingWidth) =>
|
|
||||||
this(leadingWidth: leadingWidth);
|
|
||||||
@override
|
|
||||||
CustomAppBar leading(Widget? leading) => this(leading: leading);
|
|
||||||
@override
|
|
||||||
CustomAppBar actions(List<Widget>? actions) => this(actions: actions);
|
|
||||||
@override
|
|
||||||
CustomAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
|
||||||
this(expandedWidget: expandedWidget);
|
|
||||||
@override
|
|
||||||
CustomAppBar key(Key? key) => this(key: key);
|
|
||||||
@override
|
|
||||||
CustomAppBar call({
|
|
||||||
TextWrapper? title,
|
|
||||||
bool? centerTitle,
|
|
||||||
ShapeBorder? shape,
|
|
||||||
SystemUiOverlayStyle? systemOverlayStyle,
|
|
||||||
bool? automaticallyImplyLeading,
|
|
||||||
Widget? flexibleSpace,
|
|
||||||
PreferredSizeWidget? bottom,
|
|
||||||
double? elevation,
|
|
||||||
double? scrolledUnderElevation,
|
|
||||||
Color? shadowColor,
|
|
||||||
Color? surfaceTintColor,
|
|
||||||
MultiColor? backgroundColor,
|
|
||||||
IconThemeData? iconTheme,
|
|
||||||
bool? primary,
|
|
||||||
bool? excludeHeaderSemantics,
|
|
||||||
double? toolbarHeight,
|
|
||||||
double? leadingWidth,
|
|
||||||
Widget? leading,
|
|
||||||
List<Widget>? actions,
|
|
||||||
List<Widget>? expandedWidget,
|
|
||||||
Key? key,
|
|
||||||
}) =>
|
|
||||||
CustomAppBar(
|
|
||||||
title: title ?? _value.title,
|
|
||||||
key: key ?? _value.key,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
mixin $CustomAppBarCWMixin on Component {
|
|
||||||
$TopAppBarComponentCWProxy get copyWith =>
|
|
||||||
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
|
||||||
}
|
|
@ -1,12 +1,14 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
import 'package:wyatt_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_app_bar.g.dart';
|
part 'custom_root_app_bar.g.dart';
|
||||||
|
|
||||||
@ComponentCopyWithExtension()
|
@ComponentCopyWithExtension()
|
||||||
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
|
class CustomRootAppBar extends TopAppBarComponent
|
||||||
const CustomAppBar({super.title, super.key});
|
with $CustomRootAppBarCWMixin {
|
||||||
|
const CustomRootAppBar({super.title, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AppBar(
|
Widget build(BuildContext context) => AppBar(
|
@ -0,0 +1,101 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_root_app_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomRootAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||||
|
const $CustomRootAppBarCWProxyImpl(this._value);
|
||||||
|
final CustomRootAppBar _value;
|
||||||
|
@override
|
||||||
|
CustomRootAppBar title(TextWrapper? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar centerTitle(bool? centerTitle) =>
|
||||||
|
this(centerTitle: centerTitle);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar systemOverlayStyle(
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||||
|
this(systemOverlayStyle: systemOverlayStyle);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar automaticallyImplyLeading(bool? automaticallyImplyLeading) =>
|
||||||
|
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar flexibleSpace(Widget? flexibleSpace) =>
|
||||||
|
this(flexibleSpace: flexibleSpace);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar bottom(PreferredSizeWidget? bottom) => this(bottom: bottom);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar elevation(double? elevation) => this(elevation: elevation);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
|
||||||
|
this(scrolledUnderElevation: scrolledUnderElevation);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar shadowColor(Color? shadowColor) =>
|
||||||
|
this(shadowColor: shadowColor);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar surfaceTintColor(Color? surfaceTintColor) =>
|
||||||
|
this(surfaceTintColor: surfaceTintColor);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar backgroundColor(MultiColor? backgroundColor) =>
|
||||||
|
this(backgroundColor: backgroundColor);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar iconTheme(IconThemeData? iconTheme) =>
|
||||||
|
this(iconTheme: iconTheme);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar primary(bool? primary) => this(primary: primary);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
||||||
|
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar toolbarHeight(double? toolbarHeight) =>
|
||||||
|
this(toolbarHeight: toolbarHeight);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar leadingWidth(double? leadingWidth) =>
|
||||||
|
this(leadingWidth: leadingWidth);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
||||||
|
this(expandedWidget: expandedWidget);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomRootAppBar call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
|
ShapeBorder? shape,
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
|
bool? automaticallyImplyLeading,
|
||||||
|
Widget? flexibleSpace,
|
||||||
|
PreferredSizeWidget? bottom,
|
||||||
|
double? elevation,
|
||||||
|
double? scrolledUnderElevation,
|
||||||
|
Color? shadowColor,
|
||||||
|
Color? surfaceTintColor,
|
||||||
|
MultiColor? backgroundColor,
|
||||||
|
IconThemeData? iconTheme,
|
||||||
|
bool? primary,
|
||||||
|
bool? excludeHeaderSemantics,
|
||||||
|
double? toolbarHeight,
|
||||||
|
double? leadingWidth,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
List<Widget>? expandedWidget,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomRootAppBar(
|
||||||
|
title: title ?? _value.title,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomRootAppBarCWMixin on Component {
|
||||||
|
$TopAppBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomRootAppBarCWProxyImpl(this as CustomRootAppBar);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
||||||
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
|
part 'custom_second_app_bar.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomSecondAppBar extends TopAppBarComponent
|
||||||
|
with $CustomSecondAppBarCWMixin {
|
||||||
|
const CustomSecondAppBar({super.title, super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => AppBar(
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
title: Text(
|
||||||
|
super.title?.data ?? '',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_second_app_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomSecondAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||||
|
const $CustomSecondAppBarCWProxyImpl(this._value);
|
||||||
|
final CustomSecondAppBar _value;
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar title(TextWrapper? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar centerTitle(bool? centerTitle) =>
|
||||||
|
this(centerTitle: centerTitle);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar systemOverlayStyle(
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||||
|
this(systemOverlayStyle: systemOverlayStyle);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar automaticallyImplyLeading(
|
||||||
|
bool? automaticallyImplyLeading) =>
|
||||||
|
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar flexibleSpace(Widget? flexibleSpace) =>
|
||||||
|
this(flexibleSpace: flexibleSpace);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar bottom(PreferredSizeWidget? bottom) =>
|
||||||
|
this(bottom: bottom);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar elevation(double? elevation) => this(elevation: elevation);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
|
||||||
|
this(scrolledUnderElevation: scrolledUnderElevation);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar shadowColor(Color? shadowColor) =>
|
||||||
|
this(shadowColor: shadowColor);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar surfaceTintColor(Color? surfaceTintColor) =>
|
||||||
|
this(surfaceTintColor: surfaceTintColor);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar backgroundColor(MultiColor? backgroundColor) =>
|
||||||
|
this(backgroundColor: backgroundColor);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar iconTheme(IconThemeData? iconTheme) =>
|
||||||
|
this(iconTheme: iconTheme);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar primary(bool? primary) => this(primary: primary);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
||||||
|
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar toolbarHeight(double? toolbarHeight) =>
|
||||||
|
this(toolbarHeight: toolbarHeight);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar leadingWidth(double? leadingWidth) =>
|
||||||
|
this(leadingWidth: leadingWidth);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
||||||
|
this(expandedWidget: expandedWidget);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomSecondAppBar call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
|
ShapeBorder? shape,
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
|
bool? automaticallyImplyLeading,
|
||||||
|
Widget? flexibleSpace,
|
||||||
|
PreferredSizeWidget? bottom,
|
||||||
|
double? elevation,
|
||||||
|
double? scrolledUnderElevation,
|
||||||
|
Color? shadowColor,
|
||||||
|
Color? surfaceTintColor,
|
||||||
|
MultiColor? backgroundColor,
|
||||||
|
IconThemeData? iconTheme,
|
||||||
|
bool? primary,
|
||||||
|
bool? excludeHeaderSemantics,
|
||||||
|
double? toolbarHeight,
|
||||||
|
double? leadingWidth,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
List<Widget>? expandedWidget,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomSecondAppBar(
|
||||||
|
title: title ?? _value.title,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomSecondAppBarCWMixin on Component {
|
||||||
|
$TopAppBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomSecondAppBarCWProxyImpl(this as CustomSecondAppBar);
|
||||||
|
}
|
@ -47,14 +47,22 @@ class Home extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: PreferredSize(
|
appBar: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(120),
|
||||||
child: context.components.topAppBarComponent
|
child: Column(
|
||||||
.title(const TextWrapper('Example title')),
|
children: [
|
||||||
|
context.components
|
||||||
|
.topAppBarComponent()
|
||||||
|
.title(const TextWrapper('Example title')),
|
||||||
|
context.components
|
||||||
|
.topAppBarComponent('second')
|
||||||
|
.title(const TextWrapper('Example title')),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: context.components.errorComponent.call(
|
child: context.components.errorComponent()(
|
||||||
message: const TextWrapper('Example error'),
|
message: const TextWrapper('Example error'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -62,12 +70,13 @@ class Home extends StatelessWidget {
|
|||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: context.components.loaderComponent.call(
|
child: context.components.loaderComponent()(
|
||||||
colors: const MultiColor.single(Colors.green),
|
colors: const MultiColor.single(Colors.green),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar: context.components.bottomNavigationBar,
|
bottomNavigationBar:
|
||||||
|
context.components.bottomNavigationBarComponent()(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,7 @@
|
|||||||
|
|
||||||
export 'enums/enums.dart';
|
export 'enums/enums.dart';
|
||||||
export 'extensions/build_context_extensions.dart';
|
export 'extensions/build_context_extensions.dart';
|
||||||
|
export 'extensions/component_extensions.dart';
|
||||||
export 'mixins/copy_with_mixin.dart';
|
export 'mixins/copy_with_mixin.dart';
|
||||||
|
export 'utils/component_registry.dart';
|
||||||
export 'utils/utils.dart';
|
export 'utils/utils.dart';
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
// 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:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
|
/// Extension on a map of components that creates a [ComponentRegistry]
|
||||||
|
/// using the map's content.
|
||||||
|
extension ComponentMapExtension<T extends Component> on Map<String, T> {
|
||||||
|
/// Creates and returns a [ComponentRegistry] based on the map's components.
|
||||||
|
ComponentRegistry<T> registry() => ComponentRegistry(components: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Extension on a single component that creates a [ComponentRegistry]
|
||||||
|
/// containing only that component.
|
||||||
|
extension ComponentExtension<T extends Component> on T {
|
||||||
|
/// Creates and returns a [ComponentRegistry] containing
|
||||||
|
/// only this component.
|
||||||
|
// ignore: use_to_and_as_if_applicable
|
||||||
|
ComponentRegistry<T> registry() => ComponentRegistry.solo(this);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
// 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:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
|
/// A registry for components of type [T], providing easy access and management.
|
||||||
|
class ComponentRegistry<T extends Component> {
|
||||||
|
/// Constructs a [ComponentRegistry] with the given [components].
|
||||||
|
const ComponentRegistry({required Map<String, T> components})
|
||||||
|
: _components = components;
|
||||||
|
|
||||||
|
/// Factory constructor to create a [ComponentRegistry]
|
||||||
|
/// containing only a single [component].
|
||||||
|
factory ComponentRegistry.solo(T component) => ComponentRegistry(
|
||||||
|
components: {
|
||||||
|
'solo': component,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
final Map<String, T> _components;
|
||||||
|
|
||||||
|
/// Returns a component by its [id], or the first
|
||||||
|
/// component if [id] is null or not found.
|
||||||
|
T? call([String? id]) => getComponent(id) ?? getFirstComponent();
|
||||||
|
|
||||||
|
/// Returns a component by its [id], or null if not found.
|
||||||
|
T? getComponent(String? id) => _components[id];
|
||||||
|
|
||||||
|
/// Returns the first component in the registry, or null
|
||||||
|
/// if the registry is empty.
|
||||||
|
T? getFirstComponent() => _components.values.firstOrNull;
|
||||||
|
|
||||||
|
/// Checks if the registry contains a component with the given [id].
|
||||||
|
bool containsComponent(String id) => _components.containsKey(id);
|
||||||
|
|
||||||
|
/// Returns the count of components in the registry.
|
||||||
|
int get count => _components.length;
|
||||||
|
|
||||||
|
/// Returns a list of all IDs of components in the registry.
|
||||||
|
List<String> get ids => _components.keys.toList();
|
||||||
|
|
||||||
|
/// Returns a string representation of the registry,
|
||||||
|
/// showing the count and IDs.
|
||||||
|
@override
|
||||||
|
String toString() => '$count - $ids';
|
||||||
|
}
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
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:flutter/material.dart';
|
||||||
|
import 'package:wyatt_ui_components/src/core/utils/component_registry.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';
|
||||||
|
|
||||||
@ -26,64 +27,64 @@ part 'component_theme_data.g.dart';
|
|||||||
class ComponentThemeData {
|
class ComponentThemeData {
|
||||||
/// {@macro component_theme_data}
|
/// {@macro component_theme_data}
|
||||||
factory ComponentThemeData({
|
factory ComponentThemeData({
|
||||||
TopAppBarComponent? topAppBar,
|
ComponentRegistry<TopAppBarComponent>? topAppBars,
|
||||||
TopNavigationBarComponent? topNavigationBar,
|
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars,
|
||||||
BottomNavigationBarComponent? bottomNavigationBar,
|
ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars,
|
||||||
ErrorComponent? error,
|
ComponentRegistry<ErrorComponent>? errors,
|
||||||
LoaderComponent? loader,
|
ComponentRegistry<LoaderComponent>? loaders,
|
||||||
RichTextBuilderComponent? richTextBuilder,
|
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders,
|
||||||
TextInputComponent? textInput,
|
ComponentRegistry<TextInputComponent>? textInputs,
|
||||||
FileSelectionButtonComponent? fileSelectionButton,
|
ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons,
|
||||||
FlatButtonComponent? flatButton,
|
ComponentRegistry<FlatButtonComponent>? flatButtons,
|
||||||
SimpleIconButtonComponent? simpleIconButton,
|
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons,
|
||||||
SymbolButtonComponent? symbolButton,
|
ComponentRegistry<SymbolButtonComponent>? symbolButtons,
|
||||||
InformationCardComponent? informationCard,
|
ComponentRegistry<InformationCardComponent>? informationCards,
|
||||||
PortfolioCardComponent? portfolioCard,
|
ComponentRegistry<PortfolioCardComponent>? portfolioCards,
|
||||||
QuoteCardComponent? quoteCard,
|
ComponentRegistry<QuoteCardComponent>? quoteCards,
|
||||||
SkillCardComponent? skillCard,
|
ComponentRegistry<SkillCardComponent>? skillCards,
|
||||||
PricingCardComponent? pricingCard,
|
ComponentRegistry<PricingCardComponent>? pricingCards,
|
||||||
FloatingActionButtonComponent? floatingActionButton,
|
ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons,
|
||||||
}) =>
|
}) =>
|
||||||
ComponentThemeData.raw(
|
ComponentThemeData.raw(
|
||||||
topAppBar: topAppBar,
|
topAppBars: topAppBars,
|
||||||
topNavigationBar: topNavigationBar,
|
topNavigationBars: topNavigationBars,
|
||||||
bottomNavigationBar: bottomNavigationBar,
|
bottomNavigationBars: bottomNavigationBars,
|
||||||
error: error,
|
errors: errors,
|
||||||
loader: loader,
|
loaders: loaders,
|
||||||
richTextBuilder: richTextBuilder,
|
richTextBuilders: richTextBuilders,
|
||||||
textInput: textInput,
|
textInputs: textInputs,
|
||||||
fileSelectionButton: fileSelectionButton,
|
fileSelectionButtons: fileSelectionButtons,
|
||||||
flatButton: flatButton,
|
flatButtons: flatButtons,
|
||||||
simpleIconButton: simpleIconButton,
|
simpleIconButtons: simpleIconButtons,
|
||||||
symbolButton: symbolButton,
|
symbolButtons: symbolButtons,
|
||||||
informationCard: informationCard,
|
informationCards: informationCards,
|
||||||
portfolioCard: portfolioCard,
|
portfolioCards: portfolioCards,
|
||||||
quoteCard: quoteCard,
|
quoteCards: quoteCards,
|
||||||
skillCard: skillCard,
|
skillCards: skillCards,
|
||||||
pricingCard: pricingCard,
|
pricingCards: pricingCards,
|
||||||
floatingActionButton: floatingActionButton,
|
floatingActionButtons: floatingActionButtons,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// {@macro component_theme_data}
|
// /// {@macro component_theme_data}
|
||||||
factory ComponentThemeData.fromOther(ComponentThemeData other) =>
|
factory ComponentThemeData.fromOther(ComponentThemeData other) =>
|
||||||
ComponentThemeData(
|
ComponentThemeData(
|
||||||
topAppBar: other.topAppBar,
|
topAppBars: other.topAppBars,
|
||||||
topNavigationBar: other.topNavigationBar,
|
topNavigationBars: other.topNavigationBars,
|
||||||
bottomNavigationBar: other.bottomNavigationBar,
|
bottomNavigationBars: other.bottomNavigationBars,
|
||||||
error: other.error,
|
errors: other.errors,
|
||||||
loader: other.loader,
|
loaders: other.loaders,
|
||||||
richTextBuilder: other.richTextBuilder,
|
richTextBuilders: other.richTextBuilders,
|
||||||
textInput: other.textInput,
|
textInputs: other.textInputs,
|
||||||
fileSelectionButton: other.fileSelectionButton,
|
fileSelectionButtons: other.fileSelectionButtons,
|
||||||
flatButton: other.flatButton,
|
flatButtons: other.flatButtons,
|
||||||
simpleIconButton: other.simpleIconButton,
|
simpleIconButtons: other.simpleIconButtons,
|
||||||
symbolButton: other.symbolButton,
|
symbolButtons: other.symbolButtons,
|
||||||
informationCard: other.informationCard,
|
informationCards: other.informationCards,
|
||||||
portfolioCard: other.portfolioCard,
|
portfolioCards: other.portfolioCards,
|
||||||
quoteCard: other.quoteCard,
|
quoteCards: other.quoteCards,
|
||||||
skillCard: other.skillCard,
|
skillCards: other.skillCards,
|
||||||
pricingCard: other.pricingCard,
|
pricingCards: other.pricingCards,
|
||||||
floatingActionButton: other.floatingActionButton,
|
floatingActionButtons: other.floatingActionButtons,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Create a [ComponentThemeData] given a set of exact values. Most values
|
/// Create a [ComponentThemeData] given a set of exact values. Most values
|
||||||
@ -93,23 +94,23 @@ class ComponentThemeData {
|
|||||||
/// create intermediate themes based on two themes created with the
|
/// create intermediate themes based on two themes created with the
|
||||||
/// [ComponentThemeData] constructor.
|
/// [ComponentThemeData] constructor.
|
||||||
const ComponentThemeData.raw({
|
const ComponentThemeData.raw({
|
||||||
this.topAppBar,
|
this.topAppBars,
|
||||||
this.topNavigationBar,
|
this.topNavigationBars,
|
||||||
this.bottomNavigationBar,
|
this.bottomNavigationBars,
|
||||||
this.error,
|
this.errors,
|
||||||
this.loader,
|
this.loaders,
|
||||||
this.richTextBuilder,
|
this.richTextBuilders,
|
||||||
this.textInput,
|
this.textInputs,
|
||||||
this.fileSelectionButton,
|
this.fileSelectionButtons,
|
||||||
this.flatButton,
|
this.flatButtons,
|
||||||
this.simpleIconButton,
|
this.simpleIconButtons,
|
||||||
this.symbolButton,
|
this.symbolButtons,
|
||||||
this.informationCard,
|
this.informationCards,
|
||||||
this.portfolioCard,
|
this.portfolioCards,
|
||||||
this.quoteCard,
|
this.quoteCards,
|
||||||
this.skillCard,
|
this.skillCards,
|
||||||
this.pricingCard,
|
this.pricingCards,
|
||||||
this.floatingActionButton,
|
this.floatingActionButtons,
|
||||||
});
|
});
|
||||||
|
|
||||||
R _get<T extends Component, R>(T? component, R? returned) {
|
R _get<T extends Component, R>(T? component, R? returned) {
|
||||||
@ -128,64 +129,90 @@ class ComponentThemeData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bars
|
// Bars
|
||||||
final TopAppBarComponent? topAppBar;
|
final ComponentRegistry<TopAppBarComponent>? topAppBars;
|
||||||
$TopAppBarComponentCWProxy get topAppBarComponent =>
|
$TopAppBarComponentCWProxy topAppBarComponent([String? id]) =>
|
||||||
_get(topAppBar, topAppBar?.copyWith);
|
_get(topAppBars?.call(id), topAppBars?.call(id)?.copyWith);
|
||||||
final TopNavigationBarComponent? topNavigationBar;
|
|
||||||
$TopNavigationBarComponentCWProxy get topNavigationBarComponent =>
|
final ComponentRegistry<TopNavigationBarComponent>? topNavigationBars;
|
||||||
_get(topNavigationBar, topNavigationBar?.copyWith);
|
$TopNavigationBarComponentCWProxy topNavigationBarComponent([String? id]) =>
|
||||||
final BottomNavigationBarComponent? bottomNavigationBar;
|
_get(topNavigationBars?.call(id), topNavigationBars?.call(id)?.copyWith);
|
||||||
$BottomNavigationBarComponentCWProxy get bottomNavigationBarComponent =>
|
|
||||||
_get(bottomNavigationBar, bottomNavigationBar?.copyWith);
|
final ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars;
|
||||||
|
$BottomNavigationBarComponentCWProxy bottomNavigationBarComponent([
|
||||||
|
String? id,
|
||||||
|
]) =>
|
||||||
|
_get(
|
||||||
|
bottomNavigationBars?.call(id),
|
||||||
|
bottomNavigationBars?.call(id)?.copyWith,
|
||||||
|
);
|
||||||
|
|
||||||
// CRUD Widgets
|
// CRUD Widgets
|
||||||
final ErrorComponent? error;
|
final ComponentRegistry<ErrorComponent>? errors;
|
||||||
$ErrorComponentCWProxy get errorComponent => _get(error, error?.copyWith);
|
$ErrorComponentCWProxy errorComponent([String? id]) =>
|
||||||
final LoaderComponent? loader;
|
_get(errors?.call(id), errors?.call(id)?.copyWith);
|
||||||
$LoaderComponentCWProxy get loaderComponent => _get(loader, loader?.copyWith);
|
|
||||||
|
final ComponentRegistry<LoaderComponent>? loaders;
|
||||||
|
$LoaderComponentCWProxy loaderComponent([String? id]) =>
|
||||||
|
_get(loaders?.call(id), loaders?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Cards
|
// Cards
|
||||||
final InformationCardComponent? informationCard;
|
final ComponentRegistry<InformationCardComponent>? informationCards;
|
||||||
$InformationCardComponentCWProxy get informationCardComponent =>
|
$InformationCardComponentCWProxy informationCardComponent([String? id]) =>
|
||||||
_get(informationCard, informationCard?.copyWith);
|
_get(informationCards?.call(id), informationCards?.call(id)?.copyWith);
|
||||||
final PortfolioCardComponent? portfolioCard;
|
|
||||||
$PortfolioCardComponentCWProxy get portfolioCardComponent =>
|
final ComponentRegistry<PortfolioCardComponent>? portfolioCards;
|
||||||
_get(portfolioCard, portfolioCard?.copyWith);
|
$PortfolioCardComponentCWProxy portfolioCardComponent([String? id]) =>
|
||||||
final QuoteCardComponent? quoteCard;
|
_get(portfolioCards?.call(id), portfolioCards?.call(id)?.copyWith);
|
||||||
$QuoteCardComponentCWProxy get quoteCardComponent =>
|
|
||||||
_get(quoteCard, quoteCard?.copyWith);
|
final ComponentRegistry<QuoteCardComponent>? quoteCards;
|
||||||
final SkillCardComponent? skillCard;
|
$QuoteCardComponentCWProxy quoteCardComponent([String? id]) =>
|
||||||
$SkillCardComponentCWProxy get skillCardComponent =>
|
_get(quoteCards?.call(id), quoteCards?.call(id)?.copyWith);
|
||||||
_get(skillCard, skillCard?.copyWith);
|
|
||||||
final PricingCardComponent? pricingCard;
|
final ComponentRegistry<SkillCardComponent>? skillCards;
|
||||||
$PricingCardComponentCWProxy get pricingCardComponent =>
|
$SkillCardComponentCWProxy skillCardComponent([String? id]) =>
|
||||||
_get(pricingCard, pricingCard?.copyWith);
|
_get(skillCards?.call(id), skillCards?.call(id)?.copyWith);
|
||||||
|
final ComponentRegistry<PricingCardComponent>? pricingCards;
|
||||||
|
$PricingCardComponentCWProxy pricingCardComponent([String? id]) =>
|
||||||
|
_get(pricingCards?.call(id), pricingCards?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Rich Text
|
// Rich Text
|
||||||
final RichTextBuilderComponent? richTextBuilder;
|
final ComponentRegistry<RichTextBuilderComponent>? richTextBuilders;
|
||||||
$RichTextBuilderComponentCWProxy get richTextBuilderComponent =>
|
$RichTextBuilderComponentCWProxy richTextBuilderComponent([String? id]) =>
|
||||||
_get(richTextBuilder, richTextBuilder?.copyWith);
|
_get(richTextBuilders?.call(id), richTextBuilders?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Text Inputs
|
// Text Inputs
|
||||||
final TextInputComponent? textInput;
|
final ComponentRegistry<TextInputComponent>? textInputs;
|
||||||
$TextInputComponentCWProxy get textInputComponent =>
|
$TextInputComponentCWProxy textInputComponent([String? id]) =>
|
||||||
_get(textInput, textInput?.copyWith);
|
_get(textInputs?.call(id), textInputs?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
final FileSelectionButtonComponent? fileSelectionButton;
|
final ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons;
|
||||||
$FileSelectionButtonComponentCWProxy get fileSelectionButtonComponent =>
|
$FileSelectionButtonComponentCWProxy fileSelectionButtonComponent([
|
||||||
_get(fileSelectionButton, fileSelectionButton?.copyWith);
|
String? id,
|
||||||
final FlatButtonComponent? flatButton;
|
]) =>
|
||||||
$FlatButtonComponentCWProxy get flatButtonComponent =>
|
_get(
|
||||||
_get(flatButton, flatButton?.copyWith);
|
fileSelectionButtons?.call(id),
|
||||||
final SimpleIconButtonComponent? simpleIconButton;
|
fileSelectionButtons?.call(id)?.copyWith,
|
||||||
$SimpleIconButtonComponentCWProxy get simpleIconButtonComponent =>
|
);
|
||||||
_get(simpleIconButton, simpleIconButton?.copyWith);
|
|
||||||
final SymbolButtonComponent? symbolButton;
|
|
||||||
$SymbolButtonComponentCWProxy get symbolButtonComponent =>
|
|
||||||
_get(symbolButton, symbolButton?.copyWith);
|
|
||||||
|
|
||||||
final FloatingActionButtonComponent? floatingActionButton;
|
final ComponentRegistry<FlatButtonComponent>? flatButtons;
|
||||||
$FloatingActionButtonComponentCWProxy get floatingActionButtonComponent =>
|
$FlatButtonComponentCWProxy flatButtonComponent([String? id]) =>
|
||||||
_get(floatingActionButton, floatingActionButton?.copyWith);
|
_get(flatButtons?.call(id), flatButtons?.call(id)?.copyWith);
|
||||||
|
|
||||||
|
final ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons;
|
||||||
|
$SimpleIconButtonComponentCWProxy simpleIconButtonComponent([String? id]) =>
|
||||||
|
_get(simpleIconButtons?.call(id), simpleIconButtons?.call(id)?.copyWith);
|
||||||
|
|
||||||
|
final ComponentRegistry<SymbolButtonComponent>? symbolButtons;
|
||||||
|
$SymbolButtonComponentCWProxy symbolButtonComponent([String? id]) =>
|
||||||
|
_get(symbolButtons?.call(id), symbolButtons?.call(id)?.copyWith);
|
||||||
|
|
||||||
|
final ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons;
|
||||||
|
$FloatingActionButtonComponentCWProxy floatingActionButtonComponent([
|
||||||
|
String? id,
|
||||||
|
]) =>
|
||||||
|
_get(
|
||||||
|
floatingActionButtons?.call(id),
|
||||||
|
floatingActionButtons?.call(id)?.copyWith,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -7,44 +7,54 @@ part of 'component_theme_data.dart';
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
abstract class _$ComponentThemeDataCWProxy {
|
abstract class _$ComponentThemeDataCWProxy {
|
||||||
ComponentThemeData topAppBar(TopAppBarComponent? topAppBar);
|
ComponentThemeData topAppBars(
|
||||||
|
ComponentRegistry<TopAppBarComponent>? topAppBars);
|
||||||
|
|
||||||
ComponentThemeData topNavigationBar(
|
ComponentThemeData topNavigationBars(
|
||||||
TopNavigationBarComponent? topNavigationBar);
|
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars);
|
||||||
|
|
||||||
ComponentThemeData bottomNavigationBar(
|
ComponentThemeData bottomNavigationBars(
|
||||||
BottomNavigationBarComponent? bottomNavigationBar);
|
ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars);
|
||||||
|
|
||||||
ComponentThemeData error(ErrorComponent? error);
|
ComponentThemeData errors(ComponentRegistry<ErrorComponent>? errors);
|
||||||
|
|
||||||
ComponentThemeData loader(LoaderComponent? loader);
|
ComponentThemeData loaders(ComponentRegistry<LoaderComponent>? loaders);
|
||||||
|
|
||||||
ComponentThemeData richTextBuilder(RichTextBuilderComponent? richTextBuilder);
|
ComponentThemeData richTextBuilders(
|
||||||
|
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders);
|
||||||
|
|
||||||
ComponentThemeData textInput(TextInputComponent? textInput);
|
ComponentThemeData textInputs(
|
||||||
|
ComponentRegistry<TextInputComponent>? textInputs);
|
||||||
|
|
||||||
ComponentThemeData fileSelectionButton(
|
ComponentThemeData fileSelectionButtons(
|
||||||
FileSelectionButtonComponent? fileSelectionButton);
|
ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons);
|
||||||
|
|
||||||
ComponentThemeData flatButton(FlatButtonComponent? flatButton);
|
ComponentThemeData flatButtons(
|
||||||
|
ComponentRegistry<FlatButtonComponent>? flatButtons);
|
||||||
|
|
||||||
ComponentThemeData simpleIconButton(
|
ComponentThemeData simpleIconButtons(
|
||||||
SimpleIconButtonComponent? simpleIconButton);
|
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons);
|
||||||
|
|
||||||
ComponentThemeData symbolButton(SymbolButtonComponent? symbolButton);
|
ComponentThemeData symbolButtons(
|
||||||
|
ComponentRegistry<SymbolButtonComponent>? symbolButtons);
|
||||||
|
|
||||||
ComponentThemeData informationCard(InformationCardComponent? informationCard);
|
ComponentThemeData informationCards(
|
||||||
|
ComponentRegistry<InformationCardComponent>? informationCards);
|
||||||
|
|
||||||
ComponentThemeData portfolioCard(PortfolioCardComponent? portfolioCard);
|
ComponentThemeData portfolioCards(
|
||||||
|
ComponentRegistry<PortfolioCardComponent>? portfolioCards);
|
||||||
|
|
||||||
ComponentThemeData quoteCard(QuoteCardComponent? quoteCard);
|
ComponentThemeData quoteCards(
|
||||||
|
ComponentRegistry<QuoteCardComponent>? quoteCards);
|
||||||
|
|
||||||
ComponentThemeData skillCard(SkillCardComponent? skillCard);
|
ComponentThemeData skillCards(
|
||||||
|
ComponentRegistry<SkillCardComponent>? skillCards);
|
||||||
|
|
||||||
ComponentThemeData pricingCard(PricingCardComponent? pricingCard);
|
ComponentThemeData pricingCards(
|
||||||
|
ComponentRegistry<PricingCardComponent>? pricingCards);
|
||||||
|
|
||||||
ComponentThemeData floatingActionButton(
|
ComponentThemeData floatingActionButtons(
|
||||||
FloatingActionButtonComponent? floatingActionButton);
|
ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons);
|
||||||
|
|
||||||
/// 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.
|
||||||
///
|
///
|
||||||
@ -53,23 +63,23 @@ abstract class _$ComponentThemeDataCWProxy {
|
|||||||
/// ComponentThemeData(...).copyWith(id: 12, name: "My name")
|
/// ComponentThemeData(...).copyWith(id: 12, name: "My name")
|
||||||
/// ````
|
/// ````
|
||||||
ComponentThemeData call({
|
ComponentThemeData call({
|
||||||
TopAppBarComponent? topAppBar,
|
ComponentRegistry<TopAppBarComponent>? topAppBars,
|
||||||
TopNavigationBarComponent? topNavigationBar,
|
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars,
|
||||||
BottomNavigationBarComponent? bottomNavigationBar,
|
ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars,
|
||||||
ErrorComponent? error,
|
ComponentRegistry<ErrorComponent>? errors,
|
||||||
LoaderComponent? loader,
|
ComponentRegistry<LoaderComponent>? loaders,
|
||||||
RichTextBuilderComponent? richTextBuilder,
|
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders,
|
||||||
TextInputComponent? textInput,
|
ComponentRegistry<TextInputComponent>? textInputs,
|
||||||
FileSelectionButtonComponent? fileSelectionButton,
|
ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons,
|
||||||
FlatButtonComponent? flatButton,
|
ComponentRegistry<FlatButtonComponent>? flatButtons,
|
||||||
SimpleIconButtonComponent? simpleIconButton,
|
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons,
|
||||||
SymbolButtonComponent? symbolButton,
|
ComponentRegistry<SymbolButtonComponent>? symbolButtons,
|
||||||
InformationCardComponent? informationCard,
|
ComponentRegistry<InformationCardComponent>? informationCards,
|
||||||
PortfolioCardComponent? portfolioCard,
|
ComponentRegistry<PortfolioCardComponent>? portfolioCards,
|
||||||
QuoteCardComponent? quoteCard,
|
ComponentRegistry<QuoteCardComponent>? quoteCards,
|
||||||
SkillCardComponent? skillCard,
|
ComponentRegistry<SkillCardComponent>? skillCards,
|
||||||
PricingCardComponent? pricingCard,
|
ComponentRegistry<PricingCardComponent>? pricingCards,
|
||||||
FloatingActionButtonComponent? floatingActionButton,
|
ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,77 +90,90 @@ class _$ComponentThemeDataCWProxyImpl implements _$ComponentThemeDataCWProxy {
|
|||||||
final ComponentThemeData _value;
|
final ComponentThemeData _value;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData topAppBar(TopAppBarComponent? topAppBar) =>
|
ComponentThemeData topAppBars(
|
||||||
this(topAppBar: topAppBar);
|
ComponentRegistry<TopAppBarComponent>? topAppBars) =>
|
||||||
|
this(topAppBars: topAppBars);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData topNavigationBar(
|
ComponentThemeData topNavigationBars(
|
||||||
TopNavigationBarComponent? topNavigationBar) =>
|
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars) =>
|
||||||
this(topNavigationBar: topNavigationBar);
|
this(topNavigationBars: topNavigationBars);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData bottomNavigationBar(
|
ComponentThemeData bottomNavigationBars(
|
||||||
BottomNavigationBarComponent? bottomNavigationBar) =>
|
ComponentRegistry<BottomNavigationBarComponent>?
|
||||||
this(bottomNavigationBar: bottomNavigationBar);
|
bottomNavigationBars) =>
|
||||||
|
this(bottomNavigationBars: bottomNavigationBars);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData error(ErrorComponent? error) => this(error: error);
|
ComponentThemeData errors(ComponentRegistry<ErrorComponent>? errors) =>
|
||||||
|
this(errors: errors);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData loader(LoaderComponent? loader) => this(loader: loader);
|
ComponentThemeData loaders(ComponentRegistry<LoaderComponent>? loaders) =>
|
||||||
|
this(loaders: loaders);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData richTextBuilder(
|
ComponentThemeData richTextBuilders(
|
||||||
RichTextBuilderComponent? richTextBuilder) =>
|
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders) =>
|
||||||
this(richTextBuilder: richTextBuilder);
|
this(richTextBuilders: richTextBuilders);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData textInput(TextInputComponent? textInput) =>
|
ComponentThemeData textInputs(
|
||||||
this(textInput: textInput);
|
ComponentRegistry<TextInputComponent>? textInputs) =>
|
||||||
|
this(textInputs: textInputs);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData fileSelectionButton(
|
ComponentThemeData fileSelectionButtons(
|
||||||
FileSelectionButtonComponent? fileSelectionButton) =>
|
ComponentRegistry<FileSelectionButtonComponent>?
|
||||||
this(fileSelectionButton: fileSelectionButton);
|
fileSelectionButtons) =>
|
||||||
|
this(fileSelectionButtons: fileSelectionButtons);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData flatButton(FlatButtonComponent? flatButton) =>
|
ComponentThemeData flatButtons(
|
||||||
this(flatButton: flatButton);
|
ComponentRegistry<FlatButtonComponent>? flatButtons) =>
|
||||||
|
this(flatButtons: flatButtons);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData simpleIconButton(
|
ComponentThemeData simpleIconButtons(
|
||||||
SimpleIconButtonComponent? simpleIconButton) =>
|
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons) =>
|
||||||
this(simpleIconButton: simpleIconButton);
|
this(simpleIconButtons: simpleIconButtons);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData symbolButton(SymbolButtonComponent? symbolButton) =>
|
ComponentThemeData symbolButtons(
|
||||||
this(symbolButton: symbolButton);
|
ComponentRegistry<SymbolButtonComponent>? symbolButtons) =>
|
||||||
|
this(symbolButtons: symbolButtons);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData informationCard(
|
ComponentThemeData informationCards(
|
||||||
InformationCardComponent? informationCard) =>
|
ComponentRegistry<InformationCardComponent>? informationCards) =>
|
||||||
this(informationCard: informationCard);
|
this(informationCards: informationCards);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData portfolioCard(PortfolioCardComponent? portfolioCard) =>
|
ComponentThemeData portfolioCards(
|
||||||
this(portfolioCard: portfolioCard);
|
ComponentRegistry<PortfolioCardComponent>? portfolioCards) =>
|
||||||
|
this(portfolioCards: portfolioCards);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData quoteCard(QuoteCardComponent? quoteCard) =>
|
ComponentThemeData quoteCards(
|
||||||
this(quoteCard: quoteCard);
|
ComponentRegistry<QuoteCardComponent>? quoteCards) =>
|
||||||
|
this(quoteCards: quoteCards);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData skillCard(SkillCardComponent? skillCard) =>
|
ComponentThemeData skillCards(
|
||||||
this(skillCard: skillCard);
|
ComponentRegistry<SkillCardComponent>? skillCards) =>
|
||||||
|
this(skillCards: skillCards);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData pricingCard(PricingCardComponent? pricingCard) =>
|
ComponentThemeData pricingCards(
|
||||||
this(pricingCard: pricingCard);
|
ComponentRegistry<PricingCardComponent>? pricingCards) =>
|
||||||
|
this(pricingCards: pricingCards);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ComponentThemeData floatingActionButton(
|
ComponentThemeData floatingActionButtons(
|
||||||
FloatingActionButtonComponent? floatingActionButton) =>
|
ComponentRegistry<FloatingActionButtonComponent>?
|
||||||
this(floatingActionButton: floatingActionButton);
|
floatingActionButtons) =>
|
||||||
|
this(floatingActionButtons: floatingActionButtons);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
||||||
@ -161,93 +184,97 @@ 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? topAppBars = const $CopyWithPlaceholder(),
|
||||||
Object? topNavigationBar = const $CopyWithPlaceholder(),
|
Object? topNavigationBars = const $CopyWithPlaceholder(),
|
||||||
Object? bottomNavigationBar = const $CopyWithPlaceholder(),
|
Object? bottomNavigationBars = const $CopyWithPlaceholder(),
|
||||||
Object? error = const $CopyWithPlaceholder(),
|
Object? errors = const $CopyWithPlaceholder(),
|
||||||
Object? loader = const $CopyWithPlaceholder(),
|
Object? loaders = const $CopyWithPlaceholder(),
|
||||||
Object? richTextBuilder = const $CopyWithPlaceholder(),
|
Object? richTextBuilders = const $CopyWithPlaceholder(),
|
||||||
Object? textInput = const $CopyWithPlaceholder(),
|
Object? textInputs = const $CopyWithPlaceholder(),
|
||||||
Object? fileSelectionButton = const $CopyWithPlaceholder(),
|
Object? fileSelectionButtons = const $CopyWithPlaceholder(),
|
||||||
Object? flatButton = const $CopyWithPlaceholder(),
|
Object? flatButtons = const $CopyWithPlaceholder(),
|
||||||
Object? simpleIconButton = const $CopyWithPlaceholder(),
|
Object? simpleIconButtons = const $CopyWithPlaceholder(),
|
||||||
Object? symbolButton = const $CopyWithPlaceholder(),
|
Object? symbolButtons = const $CopyWithPlaceholder(),
|
||||||
Object? informationCard = const $CopyWithPlaceholder(),
|
Object? informationCards = const $CopyWithPlaceholder(),
|
||||||
Object? portfolioCard = const $CopyWithPlaceholder(),
|
Object? portfolioCards = const $CopyWithPlaceholder(),
|
||||||
Object? quoteCard = const $CopyWithPlaceholder(),
|
Object? quoteCards = const $CopyWithPlaceholder(),
|
||||||
Object? skillCard = const $CopyWithPlaceholder(),
|
Object? skillCards = const $CopyWithPlaceholder(),
|
||||||
Object? pricingCard = const $CopyWithPlaceholder(),
|
Object? pricingCards = const $CopyWithPlaceholder(),
|
||||||
Object? floatingActionButton = const $CopyWithPlaceholder(),
|
Object? floatingActionButtons = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return ComponentThemeData(
|
return ComponentThemeData(
|
||||||
topAppBar: topAppBar == const $CopyWithPlaceholder()
|
topAppBars: topAppBars == const $CopyWithPlaceholder()
|
||||||
? _value.topAppBar
|
? _value.topAppBars
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: topAppBar as TopAppBarComponent?,
|
: topAppBars as ComponentRegistry<TopAppBarComponent>?,
|
||||||
topNavigationBar: topNavigationBar == const $CopyWithPlaceholder()
|
topNavigationBars: topNavigationBars == const $CopyWithPlaceholder()
|
||||||
? _value.topNavigationBar
|
? _value.topNavigationBars
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: topNavigationBar as TopNavigationBarComponent?,
|
: topNavigationBars as ComponentRegistry<TopNavigationBarComponent>?,
|
||||||
bottomNavigationBar: bottomNavigationBar == const $CopyWithPlaceholder()
|
bottomNavigationBars: bottomNavigationBars == const $CopyWithPlaceholder()
|
||||||
? _value.bottomNavigationBar
|
? _value.bottomNavigationBars
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: bottomNavigationBar as BottomNavigationBarComponent?,
|
: bottomNavigationBars
|
||||||
error: error == const $CopyWithPlaceholder()
|
as ComponentRegistry<BottomNavigationBarComponent>?,
|
||||||
? _value.error
|
errors: errors == const $CopyWithPlaceholder()
|
||||||
|
? _value.errors
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: error as ErrorComponent?,
|
: errors as ComponentRegistry<ErrorComponent>?,
|
||||||
loader: loader == const $CopyWithPlaceholder()
|
loaders: loaders == const $CopyWithPlaceholder()
|
||||||
? _value.loader
|
? _value.loaders
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: loader as LoaderComponent?,
|
: loaders as ComponentRegistry<LoaderComponent>?,
|
||||||
richTextBuilder: richTextBuilder == const $CopyWithPlaceholder()
|
richTextBuilders: richTextBuilders == const $CopyWithPlaceholder()
|
||||||
? _value.richTextBuilder
|
? _value.richTextBuilders
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: richTextBuilder as RichTextBuilderComponent?,
|
: richTextBuilders as ComponentRegistry<RichTextBuilderComponent>?,
|
||||||
textInput: textInput == const $CopyWithPlaceholder()
|
textInputs: textInputs == const $CopyWithPlaceholder()
|
||||||
? _value.textInput
|
? _value.textInputs
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: textInput as TextInputComponent?,
|
: textInputs as ComponentRegistry<TextInputComponent>?,
|
||||||
fileSelectionButton: fileSelectionButton == const $CopyWithPlaceholder()
|
fileSelectionButtons: fileSelectionButtons == const $CopyWithPlaceholder()
|
||||||
? _value.fileSelectionButton
|
? _value.fileSelectionButtons
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: fileSelectionButton as FileSelectionButtonComponent?,
|
: fileSelectionButtons
|
||||||
flatButton: flatButton == const $CopyWithPlaceholder()
|
as ComponentRegistry<FileSelectionButtonComponent>?,
|
||||||
? _value.flatButton
|
flatButtons: flatButtons == const $CopyWithPlaceholder()
|
||||||
|
? _value.flatButtons
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: flatButton as FlatButtonComponent?,
|
: flatButtons as ComponentRegistry<FlatButtonComponent>?,
|
||||||
simpleIconButton: simpleIconButton == const $CopyWithPlaceholder()
|
simpleIconButtons: simpleIconButtons == const $CopyWithPlaceholder()
|
||||||
? _value.simpleIconButton
|
? _value.simpleIconButtons
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: simpleIconButton as SimpleIconButtonComponent?,
|
: simpleIconButtons as ComponentRegistry<SimpleIconButtonComponent>?,
|
||||||
symbolButton: symbolButton == const $CopyWithPlaceholder()
|
symbolButtons: symbolButtons == const $CopyWithPlaceholder()
|
||||||
? _value.symbolButton
|
? _value.symbolButtons
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: symbolButton as SymbolButtonComponent?,
|
: symbolButtons as ComponentRegistry<SymbolButtonComponent>?,
|
||||||
informationCard: informationCard == const $CopyWithPlaceholder()
|
informationCards: informationCards == const $CopyWithPlaceholder()
|
||||||
? _value.informationCard
|
? _value.informationCards
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: informationCard as InformationCardComponent?,
|
: informationCards as ComponentRegistry<InformationCardComponent>?,
|
||||||
portfolioCard: portfolioCard == const $CopyWithPlaceholder()
|
portfolioCards: portfolioCards == const $CopyWithPlaceholder()
|
||||||
? _value.portfolioCard
|
? _value.portfolioCards
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: portfolioCard as PortfolioCardComponent?,
|
: portfolioCards as ComponentRegistry<PortfolioCardComponent>?,
|
||||||
quoteCard: quoteCard == const $CopyWithPlaceholder()
|
quoteCards: quoteCards == const $CopyWithPlaceholder()
|
||||||
? _value.quoteCard
|
? _value.quoteCards
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: quoteCard as QuoteCardComponent?,
|
: quoteCards as ComponentRegistry<QuoteCardComponent>?,
|
||||||
skillCard: skillCard == const $CopyWithPlaceholder()
|
skillCards: skillCards == const $CopyWithPlaceholder()
|
||||||
? _value.skillCard
|
? _value.skillCards
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: skillCard as SkillCardComponent?,
|
: skillCards as ComponentRegistry<SkillCardComponent>?,
|
||||||
pricingCard: pricingCard == const $CopyWithPlaceholder()
|
pricingCards: pricingCards == const $CopyWithPlaceholder()
|
||||||
? _value.pricingCard
|
? _value.pricingCards
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: pricingCard as PricingCardComponent?,
|
: pricingCards as ComponentRegistry<PricingCardComponent>?,
|
||||||
floatingActionButton: floatingActionButton == const $CopyWithPlaceholder()
|
floatingActionButtons:
|
||||||
? _value.floatingActionButton
|
floatingActionButtons == const $CopyWithPlaceholder()
|
||||||
// ignore: cast_nullable_to_non_nullable
|
? _value.floatingActionButtons
|
||||||
: floatingActionButton as FloatingActionButtonComponent?,
|
// ignore: cast_nullable_to_non_nullable
|
||||||
|
: floatingActionButtons
|
||||||
|
as ComponentRegistry<FloatingActionButtonComponent>?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ version: 0.2.2
|
|||||||
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.19.0 <3.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter: { sdk: flutter }
|
flutter: { sdk: flutter }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user