master #81
@ -62,13 +62,13 @@ class MyApp extends StatelessWidget {
|
||||
Expanded(
|
||||
child: BlocProvider(
|
||||
create: (_) => ExampleCubit()..run(),
|
||||
child: const ExampleFrameLayoutCrudConsumer(),
|
||||
child: ExampleFrameLayoutCrudConsumer(),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: BlocProvider(
|
||||
create: (_) => ExampleCubit()..runList(),
|
||||
child: const ExampleFrameLayoutCrudListConsumer(),
|
||||
child: ExampleFrameLayoutCrudListConsumer(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -82,7 +82,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ExampleCrudStateManagement
|
||||
extends CrudCubitConsumerScreen<ExampleCubit, String> {
|
||||
extends CubitScreenCrudItemBase<ExampleCubit, String> {
|
||||
const ExampleCrudStateManagement({super.key});
|
||||
|
||||
@override
|
||||
@ -91,10 +91,13 @@ class ExampleCrudStateManagement
|
||||
@override
|
||||
Widget successBuilder(BuildContext context, CrudLoaded<String> state) =>
|
||||
Center(child: Text(state.data ?? 'errors'));
|
||||
|
||||
@override
|
||||
ExampleCubit create(BuildContext context) => ExampleCubit()..run();
|
||||
}
|
||||
|
||||
class ExampleListCrudStateManagement
|
||||
extends CrudListCubitConsumerScreen<ExampleCubit, String> {
|
||||
extends CubitScreenCrudListBase<ExampleCubit, String> {
|
||||
const ExampleListCrudStateManagement({super.key});
|
||||
|
||||
@override
|
||||
@ -106,27 +109,35 @@ class ExampleListCrudStateManagement
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: state.data.map((e) => Text(e ?? 'error')).toList(),
|
||||
);
|
||||
|
||||
@override
|
||||
ExampleCubit create(BuildContext context) => ExampleCubit()..run();
|
||||
}
|
||||
|
||||
class ExampleFrameLayoutCrudConsumer
|
||||
extends FrameLayoutCrudCubitConsumerScreen<ExampleCubit, String> {
|
||||
const ExampleFrameLayoutCrudConsumer({super.key})
|
||||
extends FrameLayoutCubitScreenCrudItem<ExampleCubit, String> {
|
||||
ExampleFrameLayoutCrudConsumer({super.key})
|
||||
: super(
|
||||
title: 'Example Title',
|
||||
currentIndex: 0,
|
||||
customAppBar: (bar) => bar?.copyWith.title(
|
||||
'Example Title'.wrap(),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
Widget successBuilder(BuildContext context, CrudLoaded<String> state) =>
|
||||
Center(child: Text(state.data ?? 'errors'));
|
||||
|
||||
@override
|
||||
ExampleCubit create(BuildContext context) => ExampleCubit()..run();
|
||||
}
|
||||
|
||||
class ExampleFrameLayoutCrudListConsumer
|
||||
extends FrameLayoutCrudListCubitConsumerScreen<ExampleCubit, String> {
|
||||
const ExampleFrameLayoutCrudListConsumer({super.key})
|
||||
extends FrameLayoutCubitScreenCrudList<ExampleCubit, String> {
|
||||
ExampleFrameLayoutCrudListConsumer({super.key})
|
||||
: super(
|
||||
title: 'Example Title',
|
||||
currentIndex: 0,
|
||||
customAppBar: (bar) => bar?.copyWith.title(
|
||||
'Example Title'.wrap(),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
@ -135,4 +146,7 @@ class ExampleFrameLayoutCrudListConsumer
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: state.data.map((e) => Text(e ?? 'error')).toList(),
|
||||
);
|
||||
|
||||
@override
|
||||
ExampleCubit create(BuildContext context) => ExampleCubit()..run();
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
// 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 './bottom_navigation_bar_bloc_layout.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';
|
||||
export './bottom_navigation_bar_layout_cubit_screen_crud_list.dart';
|
@ -16,23 +16,27 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/cubit_screen_base.dart';
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomBarLayoutCubitConsumerScreen<
|
||||
abstract class BottomNavigationBarLayoutCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitConsumerScreen<Cubit, State> {
|
||||
const BottomBarLayoutCubitConsumerScreen({
|
||||
this.currentIndex,
|
||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||
const BottomNavigationBarLayoutCubitScreen({
|
||||
this.custom,
|
||||
this.height = 60,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final int? currentIndex;
|
||||
final double height;
|
||||
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
||||
custom;
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) =>
|
||||
BottomNavigationBarLayout(
|
||||
currentIndex: currentIndex,
|
||||
custom: custom,
|
||||
body: child,
|
||||
);
|
||||
}
|
@ -16,23 +16,19 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/bottom_navigation_bar_bloc_layout/bottom_navigation_bar_layout_cubit_screen.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class CrudCubitConsumerScreen<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const CrudCubitConsumerScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class CrudListCubitConsumerScreen<
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const CrudListCubitConsumerScreen({super.key});
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
extends BottomNavigationBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
@ -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/src/presentation/bottom_navigation_bar_bloc_layout/bottom_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends BottomNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -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/src/presentation/bottom_navigation_bar_bloc_layout/bottom_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomNavigationBarLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends BottomNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
const BottomNavigationBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
// 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/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class AppBarLayoutCrudCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends AppBarLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const AppBarLayoutCrudCubitConsumerScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class AppBarLayoutCrudListCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends AppBarLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const AppBarLayoutCrudListCubitConsumerScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomBarLayoutCrudCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends BottomBarLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const BottomBarLayoutCrudCubitConsumerScreen({
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class BottomBarLayoutCrudListCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends BottomBarLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const BottomBarLayoutCrudListCubitConsumerScreen({
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCrudCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends FrameLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const FrameLayoutCrudCubitConsumerScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class FrameLayoutCrudListCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, T extends Object?>
|
||||
extends FrameLayoutCubitConsumerScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const FrameLayoutCrudListCubitConsumerScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -14,6 +14,10 @@
|
||||
// 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 'app_bar_layout_cubit_screen.dart';
|
||||
export 'bottom_bar_layout_cubit_screen.dart';
|
||||
export 'frame_layout_cubit_screen.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class CubitScreenBase<Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitScreen<Cubit, State> {
|
||||
const CubitScreenBase({super.key});
|
||||
}
|
@ -16,22 +16,15 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitScreen<Cubit, State> {
|
||||
const BottomBarLayoutCubitScreen({
|
||||
this.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final int? currentIndex;
|
||||
abstract class CubitScreenCrudBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
extends CubitScreenBase<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
const CubitScreenCrudBase({super.key});
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) =>
|
||||
BottomNavigationBarLayout(
|
||||
currentIndex: currentIndex,
|
||||
body: child,
|
||||
);
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -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 <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 CubitScreenCrudItemBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitScreenCrudBase<Cubit, CrudLoaded<T>> {
|
||||
const CubitScreenCrudItemBase({super.key});
|
||||
}
|
@ -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 <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 CubitScreenCrudListBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitScreenCrudBase<Cubit, CrudListLoaded<T>> {
|
||||
const CubitScreenCrudListBase({super.key});
|
||||
}
|
@ -14,7 +14,8 @@
|
||||
// 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 './app_bar_layout_crud_cubit_consumer_screen.dart';
|
||||
export './bottom_bar_layout_crud_cubit_consumer_screen.dart';
|
||||
export './crud_cubit_consumer_screen.dart';
|
||||
export './frame_layout_crud_cubit_consumer_screen.dart';
|
||||
export './frame_bloc_layout.dart';
|
||||
export './frame_layout_cubit_screen.dart';
|
||||
export './frame_layout_cubit_screen_crud.dart';
|
||||
export './frame_layout_cubit_screen_crud_item.dart';
|
||||
export './frame_layout_cubit_screen_crud_list.dart';
|
@ -16,28 +16,29 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/cubit_screen_base.dart';
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitScreen<Cubit, State> {
|
||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||
const FrameLayoutCubitScreen({
|
||||
this.title,
|
||||
this.leading,
|
||||
this.actions,
|
||||
this.currentIndex,
|
||||
this.customAppBar,
|
||||
this.customBottomNavBar,
|
||||
this.height = 60,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final int? currentIndex;
|
||||
final String? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
final TopAppBarComponent? Function(TopAppBarComponent?)? customAppBar;
|
||||
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
||||
customBottomNavBar;
|
||||
final double height;
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) => FrameLayout(
|
||||
title: title,
|
||||
currentIndex: currentIndex,
|
||||
customAppBar: customAppBar,
|
||||
customBottomNavBar: customBottomNavBar,
|
||||
height: height,
|
||||
body: child,
|
||||
);
|
||||
}
|
@ -16,22 +16,20 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/frame_bloc_layout/frame_layout_cubit_screen.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class CrudCubitScreen<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const CrudCubitScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class CrudListCubitScreen<Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends CubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const CrudListCubitScreen({super.key});
|
||||
abstract class FrameLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
extends FrameLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
const FrameLayoutCubitScreenCrud({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
super.height,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
@ -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 FrameLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudLoaded<SuccessItem>> {
|
||||
const FrameLayoutCubitScreenCrudItem({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -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 FrameLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends FrameLayoutCubitScreenCrud<Cubit, CrudListLoaded<SuccessItem>> {
|
||||
const FrameLayoutCubitScreenCrudList({
|
||||
super.customAppBar,
|
||||
super.customBottomNavBar,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -14,5 +14,11 @@
|
||||
// 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 'consumers/consumers.dart';
|
||||
export 'screens/screens.dart';
|
||||
export './bottom_navigation_bar_bloc_layout/bottom_navigation_bar_bloc_layout.dart';
|
||||
export './cubit_screen_base.dart';
|
||||
export './cubit_screen_crud_base.dart';
|
||||
export './cubit_screen_crud_item_base.dart';
|
||||
export './cubit_screen_crud_list_base.dart';
|
||||
export './frame_bloc_layout/frame_bloc_layout.dart';
|
||||
export './top_app_bar_bloc_layout/top_app_bar_bloc_layout.dart';
|
||||
export './top_navigation_bar_bloc_layout/top_navigation_bar_bloc_layout.dart';
|
||||
|
@ -1,51 +0,0 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class AppBarLayoutCrudCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends AppBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const AppBarLayoutCrudCubitScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class AppBarLayoutCrudListCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends AppBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const AppBarLayoutCrudListCubitScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class BottomBarLayoutCrudCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends BottomBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const BottomBarLayoutCrudCubitScreen({
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class BottomBarLayoutCrudListCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends BottomBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const BottomBarLayoutCrudListCubitScreen({
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
// 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 './crud_cubit_screen.dart';
|
||||
export 'app_bar_layout_crud_cubit_screen.dart';
|
||||
export 'bottom_bar_layout_crud_cubit_screen.dart';
|
||||
export 'frame_layout_crud_cubit_screen.dart';
|
@ -1,53 +0,0 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCrudCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends FrameLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudLoaded<T>> {
|
||||
const FrameLayoutCrudCubitScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
||||
|
||||
abstract class FrameLayoutCrudListCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
T extends Object?> extends FrameLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudListLoaded<T>> {
|
||||
const FrameLayoutCrudListCubitScreen({
|
||||
super.title,
|
||||
super.leading,
|
||||
super.actions,
|
||||
super.currentIndex,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
// 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 './bases/bases.dart';
|
||||
export './crud/crud.dart';
|
@ -14,6 +14,8 @@
|
||||
// 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 './app_bar_layout_cubit_consumer_screen.dart';
|
||||
export './bottom_bar_layout_cubit_consumer_screen.dart';
|
||||
export './frame_layout_cubit_consumer_screen.dart';
|
||||
export './top_app_bar_bloc_layout.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';
|
||||
export './top_app_bar_layout_cubit_screen_crud_list.dart';
|
@ -16,29 +16,25 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/cubit_screen_base.dart';
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class FrameLayoutCubitConsumerScreen<
|
||||
Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitConsumerScreen<Cubit, State> {
|
||||
const FrameLayoutCubitConsumerScreen({
|
||||
this.title,
|
||||
this.leading,
|
||||
this.actions,
|
||||
this.currentIndex,
|
||||
abstract class TopAppBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||
const TopAppBarLayoutCubitScreen({
|
||||
this.custom,
|
||||
this.height = 60,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final int? currentIndex;
|
||||
final String? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
final double height;
|
||||
final TopAppBarComponent? Function(TopAppBarComponent?)? custom;
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) => FrameLayout(
|
||||
title: title,
|
||||
currentIndex: currentIndex,
|
||||
Widget parent(BuildContext context, Widget child) => TopAppBarLayout(
|
||||
height: height,
|
||||
custom: custom,
|
||||
body: child,
|
||||
);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// 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:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/top_app_bar_bloc_layout/top_app_bar_layout_cubit_screen.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopAppBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
extends TopAppBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
const TopAppBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -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/src/presentation/top_app_bar_bloc_layout/top_app_bar_layout_cubit_screen_crud.dart';
|
||||
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>> {
|
||||
const TopAppBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -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/src/presentation/top_app_bar_bloc_layout/top_app_bar_layout_cubit_screen_crud.dart';
|
||||
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>> {
|
||||
const TopAppBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -14,5 +14,8 @@
|
||||
// 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 'bases/bases.dart';
|
||||
export 'crud/crud.dart';
|
||||
export './top_navigation_bar_bloc_layout.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';
|
||||
export './top_navigation_bar_layout_cubit_screen_crud_list.dart';
|
@ -16,26 +16,26 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
import 'package:wyatt_bloc_layout/src/presentation/cubit_screen_base.dart';
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class AppBarLayoutCubitConsumerScreen<
|
||||
abstract class TopNavigationBarLayoutCubitScreen<
|
||||
Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitConsumerScreen<Cubit, State> {
|
||||
const AppBarLayoutCubitConsumerScreen({
|
||||
this.title,
|
||||
this.leading,
|
||||
this.actions,
|
||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||
const TopNavigationBarLayoutCubitScreen({
|
||||
this.custom,
|
||||
this.height = 60,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final String? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
final double height;
|
||||
final TopNavigationBarComponent? Function(TopNavigationBarComponent?)? custom;
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) => AppBarLayout(
|
||||
title: title,
|
||||
Widget parent(BuildContext context, Widget child) => TopNavigationBarLayout(
|
||||
height: height,
|
||||
custom: custom,
|
||||
body: child,
|
||||
);
|
||||
}
|
@ -16,25 +16,20 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' as bloc_base;
|
||||
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class AppBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
||||
State extends Object> extends CubitScreen<Cubit, State> {
|
||||
const AppBarLayoutCubitScreen({
|
||||
this.title,
|
||||
this.leading,
|
||||
this.actions,
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrud<
|
||||
Cubit extends bloc_base.Cubit<CrudState>,
|
||||
CrudSuccessType extends CrudSuccess>
|
||||
extends TopNavigationBarLayoutCubitScreen<Cubit, CrudState>
|
||||
with CrudMixin<Cubit, CrudSuccessType> {
|
||||
const TopNavigationBarLayoutCubitScreenCrud({
|
||||
super.custom,
|
||||
super.height,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final String? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
|
||||
@override
|
||||
Widget parent(BuildContext context, Widget child) => AppBarLayout(
|
||||
title: title,
|
||||
body: child,
|
||||
);
|
||||
Widget onBuild(BuildContext context, CrudState state) =>
|
||||
crudBuilder(context, state);
|
||||
}
|
@ -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/src/presentation/top_navigation_bar_bloc_layout/top_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrudItem<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends TopNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
const TopNavigationBarLayoutCubitScreenCrudItem({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -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/src/presentation/top_navigation_bar_bloc_layout/top_navigation_bar_layout_cubit_screen_crud.dart';
|
||||
import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
|
||||
abstract class TopNavigationBarLayoutCubitScreenCrudList<
|
||||
Cubit extends bloc_base.Cubit<CrudState>, SuccessItem extends Object?>
|
||||
extends TopNavigationBarLayoutCubitScreenCrud<Cubit,
|
||||
CrudLoaded<SuccessItem>> {
|
||||
const TopNavigationBarLayoutCubitScreenCrudList({
|
||||
super.custom,
|
||||
super.height = 60,
|
||||
super.key,
|
||||
});
|
||||
}
|
@ -15,6 +15,6 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './bottom_navigation_bar_component.dart';
|
||||
export './top_navigation_bar_component.dart';
|
||||
export './top_app_bar_component.dart';
|
||||
export './top_bar_component.dart';
|
||||
export './top_navigation_bar_component.dart';
|
||||
|
@ -17,7 +17,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/bars/top_bar_component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'top_navigation_bar_component.g.dart';
|
||||
|
Loading…
x
Reference in New Issue
Block a user