master #81
@ -1,14 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
|
||||
part 'custom_app_bar.g.dart';
|
||||
|
||||
@ComponentCopyWithExtension()
|
||||
class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
||||
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
|
||||
const CustomAppBar({super.title});
|
||||
@override
|
||||
Widget build(BuildContext context) => AppBar(
|
||||
title: Text(title?.text ?? 'Title'),
|
||||
title: Text(title?.data ?? 'Title'),
|
||||
);
|
||||
}
|
||||
|
@ -6,22 +6,85 @@ part of 'custom_app_bar.dart';
|
||||
// ComponentCopyWithGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
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(
|
||||
@ -30,6 +93,6 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
}
|
||||
|
||||
mixin $CustomAppBarCWMixin on Component {
|
||||
$AppBarComponentCWProxy get copyWith =>
|
||||
$TopAppBarComponentCWProxy get copyWith =>
|
||||
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
||||
}
|
||||
|
@ -12,6 +12,6 @@ class CustomErrorWidget extends ErrorWidgetComponent
|
||||
@override
|
||||
Widget build(BuildContext context) => ColoredBox(
|
||||
color: Colors.red,
|
||||
child: Center(child: Text(error?.text ?? 'Error')),
|
||||
child: Center(child: Text(error?.data ?? 'Error')),
|
||||
);
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'custom_app_bar_example.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentCopyWithGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class $CustomAppBarExampleCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
const $CustomAppBarExampleCWProxyImpl(this._value);
|
||||
final CustomAppBarExample _value;
|
||||
@override
|
||||
CustomAppBarExample title(String? title) => this(title: title);
|
||||
@override
|
||||
CustomAppBarExample leading(Widget? leading) => this(leading: leading);
|
||||
@override
|
||||
CustomAppBarExample actions(List<Widget>? actions) => this(actions: actions);
|
||||
@override
|
||||
CustomAppBarExample key(Key? key) => this(key: key);
|
||||
@override
|
||||
CustomAppBarExample call({
|
||||
String? title,
|
||||
Widget? leading,
|
||||
List<Widget>? actions,
|
||||
Key? key,
|
||||
}) =>
|
||||
CustomAppBarExample(
|
||||
title: title ?? _value.title,
|
||||
key: key ?? _value.key,
|
||||
);
|
||||
}
|
||||
|
||||
mixin $CustomAppBarExampleCWMixin on Component {
|
||||
$AppBarComponentCWProxy get copyWith =>
|
||||
$CustomAppBarExampleCWProxyImpl(this as CustomAppBarExample);
|
||||
}
|
@ -15,18 +15,19 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'custom_app_bar_example.g.dart';
|
||||
part 'custom_top_bar_example.g.dart';
|
||||
|
||||
@ComponentCopyWithExtension()
|
||||
class CustomAppBarExample extends AppBarComponent
|
||||
with $CustomAppBarExampleCWMixin {
|
||||
const CustomAppBarExample({super.title, super.key});
|
||||
class CustomTopAppBarExample extends TopAppBarComponent
|
||||
with $CustomTopAppBarExampleCWMixin {
|
||||
const CustomTopAppBarExample({super.title, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => AppBar(
|
||||
title: Text(super.title?.text ?? ''),
|
||||
title: Text(super.title?.data ?? ''),
|
||||
);
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'custom_top_bar_example.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentCopyWithGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class $CustomTopAppBarExampleCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||
const $CustomTopAppBarExampleCWProxyImpl(this._value);
|
||||
final CustomTopAppBarExample _value;
|
||||
@override
|
||||
CustomTopAppBarExample title(TextWrapper? title) => this(title: title);
|
||||
@override
|
||||
CustomTopAppBarExample centerTitle(bool? centerTitle) =>
|
||||
this(centerTitle: centerTitle);
|
||||
@override
|
||||
CustomTopAppBarExample shape(ShapeBorder? shape) => this(shape: shape);
|
||||
@override
|
||||
CustomTopAppBarExample systemOverlayStyle(
|
||||
SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||
this(systemOverlayStyle: systemOverlayStyle);
|
||||
@override
|
||||
CustomTopAppBarExample automaticallyImplyLeading(
|
||||
bool? automaticallyImplyLeading) =>
|
||||
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
||||
@override
|
||||
CustomTopAppBarExample flexibleSpace(Widget? flexibleSpace) =>
|
||||
this(flexibleSpace: flexibleSpace);
|
||||
@override
|
||||
CustomTopAppBarExample bottom(PreferredSizeWidget? bottom) =>
|
||||
this(bottom: bottom);
|
||||
@override
|
||||
CustomTopAppBarExample elevation(double? elevation) =>
|
||||
this(elevation: elevation);
|
||||
@override
|
||||
CustomTopAppBarExample scrolledUnderElevation(
|
||||
double? scrolledUnderElevation) =>
|
||||
this(scrolledUnderElevation: scrolledUnderElevation);
|
||||
@override
|
||||
CustomTopAppBarExample shadowColor(Color? shadowColor) =>
|
||||
this(shadowColor: shadowColor);
|
||||
@override
|
||||
CustomTopAppBarExample surfaceTintColor(Color? surfaceTintColor) =>
|
||||
this(surfaceTintColor: surfaceTintColor);
|
||||
@override
|
||||
CustomTopAppBarExample backgroundColor(MultiColor? backgroundColor) =>
|
||||
this(backgroundColor: backgroundColor);
|
||||
@override
|
||||
CustomTopAppBarExample iconTheme(IconThemeData? iconTheme) =>
|
||||
this(iconTheme: iconTheme);
|
||||
@override
|
||||
CustomTopAppBarExample primary(bool? primary) => this(primary: primary);
|
||||
@override
|
||||
CustomTopAppBarExample excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
||||
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
||||
@override
|
||||
CustomTopAppBarExample toolbarHeight(double? toolbarHeight) =>
|
||||
this(toolbarHeight: toolbarHeight);
|
||||
@override
|
||||
CustomTopAppBarExample leadingWidth(double? leadingWidth) =>
|
||||
this(leadingWidth: leadingWidth);
|
||||
@override
|
||||
CustomTopAppBarExample leading(Widget? leading) => this(leading: leading);
|
||||
@override
|
||||
CustomTopAppBarExample actions(List<Widget>? actions) =>
|
||||
this(actions: actions);
|
||||
@override
|
||||
CustomTopAppBarExample expandedWidget(List<Widget>? expandedWidget) =>
|
||||
this(expandedWidget: expandedWidget);
|
||||
@override
|
||||
CustomTopAppBarExample key(Key? key) => this(key: key);
|
||||
@override
|
||||
CustomTopAppBarExample 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,
|
||||
}) =>
|
||||
CustomTopAppBarExample(
|
||||
title: title ?? _value.title,
|
||||
key: key ?? _value.key,
|
||||
);
|
||||
}
|
||||
|
||||
mixin $CustomTopAppBarExampleCWMixin on Component {
|
||||
$TopAppBarComponentCWProxy get copyWith =>
|
||||
$CustomTopAppBarExampleCWProxyImpl(this as CustomTopAppBarExample);
|
||||
}
|
@ -5,7 +5,7 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
part 'custom_app_bar.g.dart';
|
||||
|
||||
@ComponentCopyWithExtension()
|
||||
class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
||||
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
|
||||
const CustomAppBar({
|
||||
super.title,
|
||||
super.key,
|
||||
@ -13,6 +13,6 @@ class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => AppBar(
|
||||
title: Text(title?.text ?? ''),
|
||||
title: Text(title?.data ?? ''),
|
||||
);
|
||||
}
|
||||
|
@ -6,22 +6,85 @@ part of 'custom_app_bar.dart';
|
||||
// ComponentCopyWithGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||
const $CustomAppBarCWProxyImpl(this._value);
|
||||
final CustomAppBar _value;
|
||||
@override
|
||||
CustomAppBar title(String? title) => this(title: title);
|
||||
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({
|
||||
String? title,
|
||||
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(
|
||||
@ -31,6 +94,6 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
}
|
||||
|
||||
mixin $CustomAppBarCWMixin on Component {
|
||||
$AppBarComponentCWProxy get copyWith =>
|
||||
$TopAppBarComponentCWProxy get copyWith =>
|
||||
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user