master #81
@ -27,10 +27,11 @@ abstract class CrudCubitConsumerScreenBase<
|
||||
const CrudCubitConsumerScreenBase({super.key});
|
||||
|
||||
Widget errorBuilder(BuildContext context, CrudError state) =>
|
||||
context.components.errorWidget.configure(error: state.message);
|
||||
context.components.errorWidget?.configure(error: state.message) ??
|
||||
const SizedBox.shrink();
|
||||
|
||||
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
|
||||
context.components.loadingWidget;
|
||||
context.components.loadingWidget ?? const SizedBox.shrink();
|
||||
|
||||
Widget initialBuilder(BuildContext context, CrudInitial state) =>
|
||||
const SizedBox.shrink();
|
||||
|
@ -16,17 +16,17 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class CrudCubitScreenBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
SuccessState extends CrudSuccess> extends CubitScreen<Cubit, CrudState> {
|
||||
const CrudCubitScreenBase();
|
||||
Widget errorBuilder(BuildContext context, CrudError state) =>
|
||||
context.components.errorWidget;
|
||||
context.components.errorWidget?.configure(error: state.message) ??
|
||||
const SizedBox.shrink();
|
||||
|
||||
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
|
||||
context.components.loadingWidget;
|
||||
context.components.loadingWidget ?? const SizedBox.shrink();
|
||||
|
||||
Widget initialBuilder(BuildContext context, CrudInitial state) =>
|
||||
const SizedBox.shrink();
|
||||
|
Loading…
x
Reference in New Issue
Block a user