diff --git a/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_base.dart b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_base.dart new file mode 100644 index 00000000..5b01e789 --- /dev/null +++ b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_base.dart @@ -0,0 +1,23 @@ +// Copyright (C) 2022 WYATT GROUP +// Please see the AUTHORS file for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base; +import 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart'; + +abstract class CubitConsumerBase, + State extends Object> extends CubitConsumerScreen { + const CubitConsumerBase({super.key}); +} diff --git a/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_base.dart b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_base.dart new file mode 100644 index 00000000..a9063d49 --- /dev/null +++ b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_base.dart @@ -0,0 +1,31 @@ +// Copyright (C) 2022 WYATT GROUP +// Please see the AUTHORS file for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base; +import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart'; +import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart'; + +abstract class CubitConsumerCrudBase, + CrudSuccessState extends CrudSuccess> + extends CubitConsumerBase + with CrudMixin { + const CubitConsumerCrudBase({super.key}); + + @override + Widget onBuild(BuildContext context, CrudState state) => + crudBuilder(context, state); +} diff --git a/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_item_base.dart b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_item_base.dart new file mode 100644 index 00000000..523ac073 --- /dev/null +++ b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_item_base.dart @@ -0,0 +1,25 @@ +// Copyright (C) 2022 WYATT GROUP +// Please see the AUTHORS file for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base; +import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart'; +import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart'; + +abstract class CubitConsumerCrudItemBase< + Cubit extends bloc_base.Cubit, + T extends Object?> extends CubitConsumerCrudBase> { + const CubitConsumerCrudItemBase({super.key}); +} diff --git a/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_list_base.dart b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_list_base.dart new file mode 100644 index 00000000..56c7eb36 --- /dev/null +++ b/packages/wyatt_bloc_layout/lib/src/presentation/cubit_consumer_crud_list_base.dart @@ -0,0 +1,25 @@ +// Copyright (C) 2022 WYATT GROUP +// Please see the AUTHORS file for details. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base; +import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart'; +import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart'; + +abstract class CubitConsumerCrudListBase< + Cubit extends bloc_base.Cubit, + T extends Object?> extends CubitConsumerCrudBase> { + const CubitConsumerCrudListBase({super.key}); +} diff --git a/packages/wyatt_bloc_layout/lib/src/presentation/presentation.dart b/packages/wyatt_bloc_layout/lib/src/presentation/presentation.dart index 61e6c26b..7fbda27e 100644 --- a/packages/wyatt_bloc_layout/lib/src/presentation/presentation.dart +++ b/packages/wyatt_bloc_layout/lib/src/presentation/presentation.dart @@ -15,6 +15,10 @@ // along with this program. If not, see . export './bottom_navigation_bar_bloc_layout/bottom_navigation_bar_bloc_layout.dart'; +export './cubit_consumer_base.dart'; +export './cubit_consumer_crud_base.dart'; +export './cubit_consumer_crud_item_base.dart'; +export './cubit_consumer_crud_list_base.dart'; export './cubit_screen_base.dart'; export './cubit_screen_crud_base.dart'; export './cubit_screen_crud_item_base.dart';