packages/uikit/create #129
@ -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'),
|
||||
);
|
||||
}
|
||||
|
@ -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<Widget>? actions,
|
||||
Key? key,
|
||||
|
@ -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')),
|
||||
);
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -23,7 +23,7 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
mixin CrudMixin<Cubit extends bloc_base.Cubit,
|
||||
SuccessState extends CrudSuccess> {
|
||||
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) =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user