diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart index 64223350..0cb81c93 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart @@ -9,6 +9,6 @@ class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin { const CustomAppBar({super.title}); @override Widget build(BuildContext context) => AppBar( - title: Text(title ?? 'Title'), + title: Text(title?.text ?? 'Title'), ); } diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart index 4f4d5343..f64c8fee 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart @@ -10,7 +10,7 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy { const $CustomAppBarCWProxyImpl(this._value); final CustomAppBar _value; @override - CustomAppBar title(String? title) => this(title: title); + CustomAppBar title(TextWrapper? title) => this(title: title); @override CustomAppBar leading(Widget? leading) => this(leading: leading); @override @@ -19,7 +19,7 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy { CustomAppBar key(Key? key) => this(key: key); @override CustomAppBar call({ - String? title, + TextWrapper? title, Widget? leading, List? actions, Key? key, diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart index 799214e3..8890f785 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart @@ -12,6 +12,6 @@ class CustomErrorWidget extends ErrorWidgetComponent @override Widget build(BuildContext context) => ColoredBox( color: Colors.red, - child: Center(child: Text(error ?? 'Error')), + child: Center(child: Text(error?.text ?? 'Error')), ); } diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart index ed5b8c5b..64db5487 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart @@ -10,12 +10,12 @@ class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy { const $CustomErrorWidgetCWProxyImpl(this._value); final CustomErrorWidget _value; @override - CustomErrorWidget error(String? error) => this(error: error); + CustomErrorWidget error(TextWrapper? error) => this(error: error); @override CustomErrorWidget key(Key? key) => this(key: key); @override CustomErrorWidget call({ - String? error, + TextWrapper? error, Key? key, }) => CustomErrorWidget( diff --git a/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart b/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart index f3b1133c..62d9ea8b 100644 --- a/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart +++ b/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart @@ -23,7 +23,7 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart'; mixin CrudMixin { Widget errorBuilder(BuildContext context, CrudError state) => - context.components.errorWidget?.copyWith(error: state.message) ?? + context.components.errorWidget?.copyWith(error: state.message.wrap()) ?? const SizedBox.shrink(); Widget loadingBuilder(BuildContext context, CrudLoading state) =>