feat(bloc_layout): add grid content implementations
This commit is contained in:
@@ -15,3 +15,4 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './crud_cubit_consumer_screen_mixin.dart';
|
||||
export './mixins/mixins.dart';
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
mixin GridLayoutMixin<SuccessType extends Object?> {
|
||||
Widget gridChild(BuildContext context, SuccessType? successType);
|
||||
|
||||
Widget successBuilder(
|
||||
BuildContext context,
|
||||
CrudListLoaded<SuccessType> state,
|
||||
) =>
|
||||
GridLayout(
|
||||
children: state.data.map((e) => gridChild(context, e)).toList(),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './gird_view_mixin.dart';
|
||||
+1
@@ -15,6 +15,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './bottom_navigation_bar_bloc_layout.dart';
|
||||
export './bottom_navigation_bar_grid_layout_cubit_screen_crud_list.dart';
|
||||
export './bottom_navigation_bar_layout_cubit_screen.dart';
|
||||
export './bottom_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
export './bottom_navigation_bar_layout_cubit_screen_crud_item.dart';
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarGridLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends BottomNavigationBarLayoutCubitScreenCrudList<Cubit, SuccessType>
|
||||
with GridLayoutMixin<SuccessType> {
|
||||
const BottomNavigationBarGridLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
||||
+2
-2
@@ -20,9 +20,9 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
CrudSuccessState extends CrudSuccess>
|
||||
extends BottomNavigationBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
with CrudMixin<Cubit, CrudSuccessState> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends BottomNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
CrudLoaded<SuccessType>> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends BottomNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
CrudListLoaded<SuccessType>> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
@@ -19,9 +19,9 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class CubitScreenCrudBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
CrudSuccessState extends CrudSuccess>
|
||||
extends CubitScreenBase<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
with CrudMixin<Cubit, CrudSuccessState> {
|
||||
const CubitScreenCrudBase({super.key});
|
||||
|
||||
@override
|
||||
|
||||
+1
@@ -15,6 +15,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './frame_bloc_layout.dart';
|
||||
export './frame_grid_layout_cubit_screen_crud_list.dart';
|
||||
export './frame_layout_cubit_screen.dart';
|
||||
export './frame_layout_cubit_screen_crud.dart';
|
||||
export './frame_layout_cubit_screen_crud_item.dart';
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutGridCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends FrameLayoutCubitScreenCrudList<Cubit, SuccessType>
|
||||
with GridLayoutMixin<SuccessType> {
|
||||
const FrameLayoutGridCubitScreenCrudList({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
||||
+2
-2
@@ -20,9 +20,9 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
CrudSuccessState extends CrudSuccess>
|
||||
extends FrameLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
with CrudMixin<Cubit, CrudSuccessState> {
|
||||
const FrameLayoutCubitScreenCrud({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessItem>> {
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessType>> {
|
||||
const FrameLayoutCubitScreenCrudItem({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudListLoaded<SuccessItem>> {
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudListLoaded<SuccessType>> {
|
||||
const FrameLayoutCubitScreenCrudList({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class GridCubitScreenCrudListBase<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends CubitScreenCrudListBase<Cubit, T> with GridLayoutMixin<T> {
|
||||
const GridCubitScreenCrudListBase({super.key});
|
||||
}
|
||||
+1
@@ -15,6 +15,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './top_app_bar_bloc_layout.dart';
|
||||
export './top_app_bar_grid_layout_cubit_screen_crud_list.dart';
|
||||
export './top_app_bar_layout_cubit_screen.dart';
|
||||
export './top_app_bar_layout_cubit_screen_crud.dart';
|
||||
export './top_app_bar_layout_cubit_screen_crud_item.dart';
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopAppBarGridLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopAppBarLayoutCubitScreenCrudList<Cubit, SuccessType>
|
||||
with GridLayoutMixin<SuccessType> {
|
||||
const TopAppBarGridLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
||||
+2
-2
@@ -20,9 +20,9 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopAppBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
CrudSuccessState extends CrudSuccess>
|
||||
extends TopAppBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
with CrudMixin<Cubit, CrudSuccessState> {
|
||||
const TopAppBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopAppBarLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends TopAppBarLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessItem>> {
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopAppBarLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessType>> {
|
||||
const TopAppBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopAppBarLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends TopAppBarLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessItem>> {
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopAppBarLayoutCubitScreenCrud<Cubit, CrudListLoaded<SuccessType>> {
|
||||
const TopAppBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
+1
@@ -15,6 +15,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './top_navigation_bar_bloc_layout.dart';
|
||||
export './top_navigation_bar_grid_layout_cubit_screen_crud_list.dart';
|
||||
export './top_navigation_bar_layout_cubit_screen.dart';
|
||||
export './top_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
export './top_navigation_bar_layout_cubit_screen_crud_item.dart';
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarGridLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopNavigationBarLayoutCubitScreenCrudList<Cubit, SuccessType>
|
||||
with GridLayoutMixin<SuccessType> {
|
||||
const TopNavigationBarGridLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
||||
+2
-2
@@ -20,9 +20,9 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
CrudSuccessState extends CrudSuccess>
|
||||
extends TopNavigationBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
with CrudMixin<Cubit, CrudSuccessState> {
|
||||
const TopNavigationBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
CrudLoaded<SuccessType>> {
|
||||
const TopNavigationBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@ import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessType extends Object?>
|
||||
extends TopNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
CrudListLoaded<SuccessType>> {
|
||||
const TopNavigationBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
|
||||
Reference in New Issue
Block a user