refactor(ui_kit): adapt ui_kit

This commit is contained in:
Malo Léon 2023-02-22 16:13:07 +01:00
parent b9dac32143
commit 317eb56d66
3 changed files with 76 additions and 15 deletions

View File

@ -22,7 +22,7 @@ import 'package:wyatt_ui_kit/wyatt_ui_kit.dart';
part 'top_app_bar.g.dart';
@ComponentCopyWithExtension()
class TopAppBar extends AppBarComponent with $TopAppBarCWMixin {
class TopAppBar extends TopAppBarComponent with $TopAppBarCWMixin {
const TopAppBar({
super.systemOverlayStyle,
super.automaticallyImplyLeading,

View File

@ -6,10 +6,14 @@ part of 'top_app_bar.dart';
// ComponentCopyWithGenerator
// **************************************************************************
class $TopAppBarCWProxyImpl implements $AppBarComponentCWProxy {
class $TopAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
const $TopAppBarCWProxyImpl(this._value);
final TopAppBar _value;
@override
TopAppBar title(TextWrapper? title) => this(title: title);
@override
TopAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
@override
TopAppBar shape(ShapeBorder? shape) => this(shape: shape);
@override
TopAppBar systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle) =>
@ -49,20 +53,18 @@ class $TopAppBarCWProxyImpl implements $AppBarComponentCWProxy {
TopAppBar leadingWidth(double? leadingWidth) =>
this(leadingWidth: leadingWidth);
@override
TopAppBar title(TextWrapper? title) => this(title: title);
@override
TopAppBar leading(Widget? leading) => this(leading: leading);
@override
TopAppBar actions(List<Widget>? actions) => this(actions: actions);
@override
TopAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
@override
TopAppBar expandedWidget(List<Widget>? expandedWidget) =>
this(expandedWidget: expandedWidget);
@override
TopAppBar key(Key? key) => this(key: key);
@override
TopAppBar call({
TextWrapper? title,
bool? centerTitle,
ShapeBorder? shape,
SystemUiOverlayStyle? systemOverlayStyle,
bool? automaticallyImplyLeading,
@ -78,10 +80,8 @@ class $TopAppBarCWProxyImpl implements $AppBarComponentCWProxy {
bool? excludeHeaderSemantics,
double? toolbarHeight,
double? leadingWidth,
TextWrapper? title,
Widget? leading,
List<Widget>? actions,
bool? centerTitle,
List<Widget>? expandedWidget,
Key? key,
}) =>
@ -114,6 +114,6 @@ class $TopAppBarCWProxyImpl implements $AppBarComponentCWProxy {
}
mixin $TopAppBarCWMixin on Component {
$AppBarComponentCWProxy get copyWith =>
$TopAppBarComponentCWProxy get copyWith =>
$TopAppBarCWProxyImpl(this as TopAppBar);
}

View File

@ -11,23 +11,84 @@ class $TopNavigationBarCWProxyImpl
const $TopNavigationBarCWProxyImpl(this._value);
final TopNavigationBar _value;
@override
TopNavigationBar leading(Widget? leading) => this(leading: leading);
@override
TopNavigationBar actions(List<Widget>? actions) => this(actions: actions);
@override
TopNavigationBar onTap(void Function(BuildContext, int)? onTap) =>
this(onTap: onTap);
@override
TopNavigationBar currentIndex(int? currentIndex) =>
this(currentIndex: currentIndex);
@override
TopNavigationBar shape(ShapeBorder? shape) => this(shape: shape);
@override
TopNavigationBar systemOverlayStyle(
SystemUiOverlayStyle? systemOverlayStyle) =>
this(systemOverlayStyle: systemOverlayStyle);
@override
TopNavigationBar automaticallyImplyLeading(bool? automaticallyImplyLeading) =>
this(automaticallyImplyLeading: automaticallyImplyLeading);
@override
TopNavigationBar flexibleSpace(Widget? flexibleSpace) =>
this(flexibleSpace: flexibleSpace);
@override
TopNavigationBar bottom(PreferredSizeWidget? bottom) => this(bottom: bottom);
@override
TopNavigationBar elevation(double? elevation) => this(elevation: elevation);
@override
TopNavigationBar scrolledUnderElevation(double? scrolledUnderElevation) =>
this(scrolledUnderElevation: scrolledUnderElevation);
@override
TopNavigationBar shadowColor(Color? shadowColor) =>
this(shadowColor: shadowColor);
@override
TopNavigationBar surfaceTintColor(Color? surfaceTintColor) =>
this(surfaceTintColor: surfaceTintColor);
@override
TopNavigationBar backgroundColor(MultiColor? backgroundColor) =>
this(backgroundColor: backgroundColor);
@override
TopNavigationBar iconTheme(IconThemeData? iconTheme) =>
this(iconTheme: iconTheme);
@override
TopNavigationBar primary(bool? primary) => this(primary: primary);
@override
TopNavigationBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
this(excludeHeaderSemantics: excludeHeaderSemantics);
@override
TopNavigationBar toolbarHeight(double? toolbarHeight) =>
this(toolbarHeight: toolbarHeight);
@override
TopNavigationBar leadingWidth(double? leadingWidth) =>
this(leadingWidth: leadingWidth);
@override
TopNavigationBar leading(Widget? leading) => this(leading: leading);
@override
TopNavigationBar actions(List<Widget>? actions) => this(actions: actions);
@override
TopNavigationBar expandedWidget(List<Widget>? expandedWidget) =>
this(expandedWidget: expandedWidget);
@override
TopNavigationBar key(Key? key) => this(key: key);
@override
TopNavigationBar call({
Widget? leading,
List<Widget>? actions,
void Function(BuildContext, int)? onTap,
int? currentIndex,
ShapeBorder? shape,
SystemUiOverlayStyle? systemOverlayStyle,
bool? automaticallyImplyLeading,
Widget? flexibleSpace,
PreferredSizeWidget? bottom,
double? elevation,
double? scrolledUnderElevation,
Color? shadowColor,
Color? surfaceTintColor,
MultiColor? backgroundColor,
IconThemeData? iconTheme,
bool? primary,
bool? excludeHeaderSemantics,
double? toolbarHeight,
double? leadingWidth,
Widget? leading,
List<Widget>? actions,
List<Widget>? expandedWidget,
Key? key,
}) =>
TopNavigationBar(