Compare commits
8 Commits
a6903ae432
...
0a950638db
Author | SHA1 | Date | |
---|---|---|---|
0a950638db | |||
2addc94405 | |||
2add09840d | |||
59fcd93aa5 | |||
1c47fa8e94 | |||
791a6d0f83 | |||
8be4efbb52 | |||
693e3398b6 |
@ -5,10 +5,10 @@ import 'package:bloc_layout_example/components/custom_loading_widget.dart';
|
|||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
abstract class AppThemeComponent {
|
abstract class AppThemeComponent {
|
||||||
static const ComponentThemeData components = ComponentThemeData.raw(
|
static ComponentThemeData components = ComponentThemeData.raw(
|
||||||
topAppBar: CustomAppBar(),
|
topAppBars: const CustomAppBar().registry(),
|
||||||
bottomNavigationBar: CustomBottomBar(),
|
bottomNavigationBars: const CustomBottomBar().registry(),
|
||||||
loader: CustomLoadingWidget(),
|
loaders: const CustomLoadingWidget().registry(),
|
||||||
error: CustomErrorWidget(),
|
errors: const CustomErrorWidget().registry(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,17 @@ import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
|||||||
|
|
||||||
mixin CrudMixin<Cubit extends bloc_base.Cubit<dynamic>,
|
mixin CrudMixin<Cubit extends bloc_base.Cubit<dynamic>,
|
||||||
SuccessState extends CrudSuccess> {
|
SuccessState extends CrudSuccess> {
|
||||||
|
String? get loaderComponentId => null;
|
||||||
|
String? get errorComponentId => null;
|
||||||
|
|
||||||
Widget errorBuilder(BuildContext context, CrudError state) =>
|
Widget errorBuilder(BuildContext context, CrudError state) =>
|
||||||
context.components.errorComponent.call(
|
context.components.errorComponent(errorComponentId).call(
|
||||||
message: (state.message != null) ? TextWrapper(state.message!) : null,
|
message:
|
||||||
);
|
(state.message != null) ? TextWrapper(state.message!) : null,
|
||||||
|
);
|
||||||
|
|
||||||
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
|
Widget loadingBuilder(BuildContext context, CrudLoading state) =>
|
||||||
context.components.loader ?? const SizedBox.shrink();
|
context.components.loaderComponent(loaderComponentId).call();
|
||||||
|
|
||||||
Widget initialBuilder(BuildContext context, CrudInitial state) =>
|
Widget initialBuilder(BuildContext context, CrudInitial state) =>
|
||||||
const SizedBox.shrink();
|
const SizedBox.shrink();
|
||||||
|
@ -24,7 +24,8 @@ abstract class BottomNavigationBarGridLayoutCubitScreenCrudList<
|
|||||||
with GridLayoutMixin<SuccessType> {
|
with GridLayoutMixin<SuccessType> {
|
||||||
const BottomNavigationBarGridLayoutCubitScreenCrudList({
|
const BottomNavigationBarGridLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,21 @@ abstract class BottomNavigationBarLayoutCubitScreen<
|
|||||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||||
const BottomNavigationBarLayoutCubitScreen({
|
const BottomNavigationBarLayoutCubitScreen({
|
||||||
this.custom,
|
this.custom,
|
||||||
this.height = 60,
|
this.barId,
|
||||||
|
this.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final double height;
|
final ComponentCallBack<BottomNavigationBarComponent>? custom;
|
||||||
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
custom;
|
final String? barId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget parent(BuildContext context, Widget child) =>
|
Widget parent(BuildContext context, Widget child) =>
|
||||||
BottomNavigationBarLayout(
|
StructuralLayout.withBottomNavBar(
|
||||||
custom: custom,
|
custom: custom,
|
||||||
|
barId: barId,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
body: child,
|
body: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@ abstract class BottomNavigationBarLayoutCubitScreenCrud<
|
|||||||
with CrudMixin<Cubit, CrudSuccessState> {
|
with CrudMixin<Cubit, CrudSuccessState> {
|
||||||
const BottomNavigationBarLayoutCubitScreenCrud({
|
const BottomNavigationBarLayoutCubitScreenCrud({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height,
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ abstract class BottomNavigationBarLayoutCubitScreenCrudItem<
|
|||||||
CrudLoaded<SuccessType>> {
|
CrudLoaded<SuccessType>> {
|
||||||
const BottomNavigationBarLayoutCubitScreenCrudItem({
|
const BottomNavigationBarLayoutCubitScreenCrudItem({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,8 @@ abstract class BottomNavigationBarLayoutCubitScreenCrudList<
|
|||||||
CrudListLoaded<SuccessType>> {
|
CrudListLoaded<SuccessType>> {
|
||||||
const BottomNavigationBarLayoutCubitScreenCrudList({
|
const BottomNavigationBarLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,7 @@ import 'package:wyatt_crud_bloc/wyatt_crud_bloc.dart';
|
|||||||
|
|
||||||
abstract class CubitScreenCrudItemBase<Cubit extends bloc_base.Cubit<CrudState>,
|
abstract class CubitScreenCrudItemBase<Cubit extends bloc_base.Cubit<CrudState>,
|
||||||
T extends Object?> extends CubitScreenCrudBase<Cubit, CrudLoaded<T>> {
|
T extends Object?> extends CubitScreenCrudBase<Cubit, CrudLoaded<T>> {
|
||||||
const CubitScreenCrudItemBase({super.key});
|
const CubitScreenCrudItemBase({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,11 @@ abstract class FrameLayoutGridCubitScreenCrudList<
|
|||||||
const FrameLayoutGridCubitScreenCrudList({
|
const FrameLayoutGridCubitScreenCrudList({
|
||||||
super.customAppBar,
|
super.customAppBar,
|
||||||
super.customBottomNavBar,
|
super.customBottomNavBar,
|
||||||
super.height = 60,
|
super.floatingActionButtonId,
|
||||||
|
super.height,
|
||||||
|
super.appBarId,
|
||||||
|
super.bottomNavBarId,
|
||||||
|
super.customFloatingActionButton,
|
||||||
super.scaffoldFieldsWrapper,
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
@ -26,21 +26,34 @@ abstract class FrameLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
|||||||
const FrameLayoutCubitScreen({
|
const FrameLayoutCubitScreen({
|
||||||
this.customAppBar,
|
this.customAppBar,
|
||||||
this.customBottomNavBar,
|
this.customBottomNavBar,
|
||||||
|
this.customFloatingActionButton,
|
||||||
|
this.appBarId,
|
||||||
|
this.bottomNavBarId,
|
||||||
|
this.floatingActionButtonId,
|
||||||
this.scaffoldFieldsWrapper,
|
this.scaffoldFieldsWrapper,
|
||||||
this.height = 60,
|
this.height = 60,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final TopAppBarComponent? Function(TopAppBarComponent?)? customAppBar;
|
final ComponentCallBack<TopAppBarComponent>? customAppBar;
|
||||||
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
final ComponentCallBack<BottomNavigationBarComponent>? customBottomNavBar;
|
||||||
customBottomNavBar;
|
final ComponentCallBack<FloatingActionButtonComponent>?
|
||||||
|
customFloatingActionButton;
|
||||||
|
final String? appBarId;
|
||||||
|
final String? bottomNavBarId;
|
||||||
|
final String? floatingActionButtonId;
|
||||||
final double height;
|
final double height;
|
||||||
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget parent(BuildContext context, Widget child) => FrameLayout(
|
Widget parent(BuildContext context, Widget child) =>
|
||||||
|
StructuralLayout.withFrame(
|
||||||
customAppBar: customAppBar,
|
customAppBar: customAppBar,
|
||||||
customBottomNavBar: customBottomNavBar,
|
customBottomNavBar: customBottomNavBar,
|
||||||
|
customFloatingActionButton: customFloatingActionButton,
|
||||||
|
appBarId: appBarId,
|
||||||
|
bottomNavBarId: bottomNavBarId,
|
||||||
|
floatingActionButtonId: floatingActionButtonId,
|
||||||
height: height,
|
height: height,
|
||||||
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
body: child,
|
body: child,
|
||||||
|
@ -27,9 +27,13 @@ abstract class FrameLayoutCubitScreenCrud<
|
|||||||
const FrameLayoutCubitScreenCrud({
|
const FrameLayoutCubitScreenCrud({
|
||||||
super.customAppBar,
|
super.customAppBar,
|
||||||
super.customBottomNavBar,
|
super.customBottomNavBar,
|
||||||
|
super.floatingActionButtonId,
|
||||||
super.height,
|
super.height,
|
||||||
super.key,
|
super.appBarId,
|
||||||
|
super.bottomNavBarId,
|
||||||
|
super.customFloatingActionButton,
|
||||||
super.scaffoldFieldsWrapper,
|
super.scaffoldFieldsWrapper,
|
||||||
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -24,7 +24,11 @@ abstract class FrameLayoutCubitScreenCrudItem<
|
|||||||
const FrameLayoutCubitScreenCrudItem({
|
const FrameLayoutCubitScreenCrudItem({
|
||||||
super.customAppBar,
|
super.customAppBar,
|
||||||
super.customBottomNavBar,
|
super.customBottomNavBar,
|
||||||
super.height = 60,
|
super.floatingActionButtonId,
|
||||||
|
super.height,
|
||||||
|
super.appBarId,
|
||||||
|
super.bottomNavBarId,
|
||||||
|
super.customFloatingActionButton,
|
||||||
super.scaffoldFieldsWrapper,
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
@ -24,7 +24,11 @@ abstract class FrameLayoutCubitScreenCrudList<
|
|||||||
const FrameLayoutCubitScreenCrudList({
|
const FrameLayoutCubitScreenCrudList({
|
||||||
super.customAppBar,
|
super.customAppBar,
|
||||||
super.customBottomNavBar,
|
super.customBottomNavBar,
|
||||||
super.height = 60,
|
super.floatingActionButtonId,
|
||||||
|
super.height,
|
||||||
|
super.appBarId,
|
||||||
|
super.bottomNavBarId,
|
||||||
|
super.customFloatingActionButton,
|
||||||
super.scaffoldFieldsWrapper,
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -25,6 +25,8 @@ abstract class TopAppBarGridLayoutCubitScreenCrudList<
|
|||||||
const TopAppBarGridLayoutCubitScreenCrudList({
|
const TopAppBarGridLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,17 +25,23 @@ abstract class TopAppBarLayoutCubitScreen<Cubit extends bloc_base.Cubit<State>,
|
|||||||
State extends Object> extends CubitScreenBase<Cubit, State> {
|
State extends Object> extends CubitScreenBase<Cubit, State> {
|
||||||
const TopAppBarLayoutCubitScreen({
|
const TopAppBarLayoutCubitScreen({
|
||||||
this.custom,
|
this.custom,
|
||||||
|
this.barId,
|
||||||
|
this.scaffoldFieldsWrapper,
|
||||||
this.height = 60,
|
this.height = 60,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final double height;
|
final double height;
|
||||||
final TopAppBarComponent? Function(TopAppBarComponent?)? custom;
|
final ComponentCallBack<TopAppBarComponent>? custom;
|
||||||
|
final String? barId;
|
||||||
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget parent(BuildContext context, Widget child) => TopAppBarLayout(
|
Widget parent(BuildContext context, Widget child) => TopAppBarLayout(
|
||||||
height: height,
|
height: height,
|
||||||
custom: custom,
|
custom: custom,
|
||||||
|
barId: barId,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
body: child,
|
body: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,8 @@ abstract class TopAppBarLayoutCubitScreenCrud<
|
|||||||
const TopAppBarLayoutCubitScreenCrud({
|
const TopAppBarLayoutCubitScreenCrud({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height,
|
super.height,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ abstract class TopAppBarLayoutCubitScreenCrudItem<
|
|||||||
const TopAppBarLayoutCubitScreenCrudItem({
|
const TopAppBarLayoutCubitScreenCrudItem({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@ abstract class TopAppBarLayoutCubitScreenCrudList<
|
|||||||
const TopAppBarLayoutCubitScreenCrudList({
|
const TopAppBarLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ abstract class TopNavigationBarGridLayoutCubitScreenCrudList<
|
|||||||
const TopNavigationBarGridLayoutCubitScreenCrudList({
|
const TopNavigationBarGridLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,23 @@ abstract class TopNavigationBarLayoutCubitScreen<
|
|||||||
const TopNavigationBarLayoutCubitScreen({
|
const TopNavigationBarLayoutCubitScreen({
|
||||||
this.custom,
|
this.custom,
|
||||||
this.height = 60,
|
this.height = 60,
|
||||||
|
this.barId,
|
||||||
|
this.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final double height;
|
final double height;
|
||||||
final TopNavigationBarComponent? Function(TopNavigationBarComponent?)? custom;
|
final ComponentCallBack<TopNavigationBarComponent>? custom;
|
||||||
|
final String? barId;
|
||||||
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget parent(BuildContext context, Widget child) => TopNavigationBarLayout(
|
Widget parent(BuildContext context, Widget child) =>
|
||||||
height: height,
|
StructuralLayout.withTopNavigationBar(
|
||||||
|
barId: barId,
|
||||||
custom: custom,
|
custom: custom,
|
||||||
|
height: height,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
body: child,
|
body: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,8 @@ abstract class TopNavigationBarLayoutCubitScreenCrud<
|
|||||||
const TopNavigationBarLayoutCubitScreenCrud({
|
const TopNavigationBarLayoutCubitScreenCrud({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height,
|
super.height,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ abstract class TopNavigationBarLayoutCubitScreenCrudItem<
|
|||||||
const TopNavigationBarLayoutCubitScreenCrudItem({
|
const TopNavigationBarLayoutCubitScreenCrudItem({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ abstract class TopNavigationBarLayoutCubitScreenCrudList<
|
|||||||
const TopNavigationBarLayoutCubitScreenCrudList({
|
const TopNavigationBarLayoutCubitScreenCrudList({
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height = 60,
|
super.height = 60,
|
||||||
|
super.barId,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
@startuml Class Model
|
@startuml _
|
||||||
set namespaceSeparator ::
|
set namespaceSeparator ::
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::core::mixins::gird_view_mixin.dart::GridLayoutMixin" {
|
abstract class "wyatt_bloc_layout::src::core::mixins::gird_view_mixin.dart::GridLayoutMixin" {
|
||||||
|
+double verticalGap
|
||||||
|
+double horizontalGap
|
||||||
+Widget gridChild()
|
+Widget gridChild()
|
||||||
+Widget successBuilder()
|
+Widget successBuilder()
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::core::crud_cubit_consumer_screen_mixin.dart::CrudMixin" {
|
abstract class "wyatt_bloc_layout::src::core::crud_cubit_consumer_screen_mixin.dart::CrudMixin" {
|
||||||
|
+String? loaderComponentId
|
||||||
|
+String? errorComponentId
|
||||||
+Widget errorBuilder()
|
+Widget errorBuilder()
|
||||||
+Widget loadingBuilder()
|
+Widget loadingBuilder()
|
||||||
+Widget initialBuilder()
|
+Widget initialBuilder()
|
||||||
@ -19,11 +23,26 @@ abstract class "wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::Cu
|
|||||||
|
|
||||||
"wyatt_bloc_helper::src::cubit.dart::CubitScreen" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase"
|
"wyatt_bloc_helper::src::cubit.dart::CubitScreen" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase"
|
||||||
|
|
||||||
|
abstract class "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_list_base.dart::CubitConsumerCrudListBase" {
|
||||||
|
}
|
||||||
|
|
||||||
|
"wyatt_bloc_layout::src::presentation::cubit_consumer_crud_base.dart::CubitConsumerCrudBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_list_base.dart::CubitConsumerCrudListBase"
|
||||||
|
|
||||||
|
abstract class "wyatt_bloc_layout::src::presentation::cubit_consumer_base.dart::CubitConsumerBase" {
|
||||||
|
}
|
||||||
|
|
||||||
|
"wyatt_bloc_helper::src::cubit.dart::CubitConsumerScreen" <|-- "wyatt_bloc_layout::src::presentation::cubit_consumer_base.dart::CubitConsumerBase"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::cubit_screen_crud_list_base.dart::CubitScreenCrudListBase" {
|
abstract class "wyatt_bloc_layout::src::presentation::cubit_screen_crud_list_base.dart::CubitScreenCrudListBase" {
|
||||||
}
|
}
|
||||||
|
|
||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_list_base.dart::CubitScreenCrudListBase"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_list_base.dart::CubitScreenCrudListBase"
|
||||||
|
|
||||||
|
abstract class "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_item_base.dart::CubitConsumerCrudItemBase" {
|
||||||
|
}
|
||||||
|
|
||||||
|
"wyatt_bloc_layout::src::presentation::cubit_consumer_crud_base.dart::CubitConsumerCrudBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_item_base.dart::CubitConsumerCrudItemBase"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen_crud.dart::FrameLayoutCubitScreenCrud" {
|
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen_crud.dart::FrameLayoutCubitScreenCrud" {
|
||||||
+Widget onBuild()
|
+Widget onBuild()
|
||||||
}
|
}
|
||||||
@ -39,12 +58,19 @@ abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_l
|
|||||||
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" {
|
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" {
|
||||||
+TopAppBarComponent? Function(TopAppBarComponent?)? customAppBar
|
+TopAppBarComponent? Function(TopAppBarComponent?)? customAppBar
|
||||||
+BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)? customBottomNavBar
|
+BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)? customBottomNavBar
|
||||||
|
+FloatingActionButtonComponent? Function(FloatingActionButtonComponent?)? customFloatingActionButton
|
||||||
|
+String? appBarId
|
||||||
|
+String? bottomNavBarId
|
||||||
|
+String? floatingActionButtonId
|
||||||
+double height
|
+double height
|
||||||
|
+ScaffoldFieldsWrapper? scaffoldFieldsWrapper
|
||||||
+Widget parent()
|
+Widget parent()
|
||||||
}
|
}
|
||||||
|
|
||||||
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "null::TopAppBarComponent Function(TopAppBarComponent)"
|
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::TopAppBarComponent Function(TopAppBarComponent)"
|
||||||
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "null::BottomNavigationBarComponent Function(BottomNavigationBarComponent)"
|
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::BottomNavigationBarComponent Function(BottomNavigationBarComponent)"
|
||||||
|
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::FloatingActionButtonComponent Function(FloatingActionButtonComponent)"
|
||||||
|
"wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen" o-- "wyatt_ui_layout::src::core::scaffold_fields_wrapper.dart::ScaffoldFieldsWrapper"
|
||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_layout_cubit_screen.dart::FrameLayoutCubitScreen"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_grid_layout_cubit_screen_crud_list.dart::FrameLayoutGridCubitScreenCrudList" {
|
abstract class "wyatt_bloc_layout::src::presentation::frame_bloc_layout::frame_grid_layout_cubit_screen_crud_list.dart::FrameLayoutGridCubitScreenCrudList" {
|
||||||
@ -71,10 +97,13 @@ abstract class "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::t
|
|||||||
abstract class "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen" {
|
abstract class "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen" {
|
||||||
+double height
|
+double height
|
||||||
+TopAppBarComponent? Function(TopAppBarComponent?)? custom
|
+TopAppBarComponent? Function(TopAppBarComponent?)? custom
|
||||||
|
+String? barId
|
||||||
|
+ScaffoldFieldsWrapper? scaffoldFieldsWrapper
|
||||||
+Widget parent()
|
+Widget parent()
|
||||||
}
|
}
|
||||||
|
|
||||||
"wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen" o-- "null::TopAppBarComponent Function(TopAppBarComponent)"
|
"wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::TopAppBarComponent Function(TopAppBarComponent)"
|
||||||
|
"wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::core::scaffold_fields_wrapper.dart::ScaffoldFieldsWrapper"
|
||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen.dart::TopAppBarLayoutCubitScreen"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen_crud.dart::TopAppBarLayoutCubitScreenCrud" {
|
abstract class "wyatt_bloc_layout::src::presentation::top_app_bar_bloc_layout::top_app_bar_layout_cubit_screen_crud.dart::TopAppBarLayoutCubitScreenCrud" {
|
||||||
@ -108,13 +137,22 @@ abstract class "wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dar
|
|||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase"
|
||||||
"wyatt_bloc_layout::src::core::crud_cubit_consumer_screen_mixin.dart::CrudMixin" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase"
|
"wyatt_bloc_layout::src::core::crud_cubit_consumer_screen_mixin.dart::CrudMixin" <|-- "wyatt_bloc_layout::src::presentation::cubit_screen_crud_base.dart::CubitScreenCrudBase"
|
||||||
|
|
||||||
|
abstract class "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_base.dart::CubitConsumerCrudBase" {
|
||||||
|
+Widget onBuild()
|
||||||
|
}
|
||||||
|
|
||||||
|
"wyatt_bloc_layout::src::presentation::cubit_consumer_base.dart::CubitConsumerBase" <|-- "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_base.dart::CubitConsumerCrudBase"
|
||||||
|
"wyatt_bloc_layout::src::core::crud_cubit_consumer_screen_mixin.dart::CrudMixin" <|-- "wyatt_bloc_layout::src::presentation::cubit_consumer_crud_base.dart::CubitConsumerCrudBase"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen" {
|
abstract class "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen" {
|
||||||
+double height
|
|
||||||
+BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)? custom
|
+BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)? custom
|
||||||
|
+ScaffoldFieldsWrapper? scaffoldFieldsWrapper
|
||||||
|
+String? barId
|
||||||
+Widget parent()
|
+Widget parent()
|
||||||
}
|
}
|
||||||
|
|
||||||
"wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen" o-- "null::BottomNavigationBarComponent Function(BottomNavigationBarComponent)"
|
"wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::BottomNavigationBarComponent Function(BottomNavigationBarComponent)"
|
||||||
|
"wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::core::scaffold_fields_wrapper.dart::ScaffoldFieldsWrapper"
|
||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen.dart::BottomNavigationBarLayoutCubitScreen"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen_crud_item.dart::BottomNavigationBarLayoutCubitScreenCrudItem" {
|
abstract class "wyatt_bloc_layout::src::presentation::bottom_navigation_bar_bloc_layout::bottom_navigation_bar_layout_cubit_screen_crud_item.dart::BottomNavigationBarLayoutCubitScreenCrudItem" {
|
||||||
@ -154,10 +192,13 @@ abstract class "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_la
|
|||||||
abstract class "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen" {
|
abstract class "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen" {
|
||||||
+double height
|
+double height
|
||||||
+TopNavigationBarComponent? Function(TopNavigationBarComponent?)? custom
|
+TopNavigationBarComponent? Function(TopNavigationBarComponent?)? custom
|
||||||
|
+String? barId
|
||||||
|
+ScaffoldFieldsWrapper? scaffoldFieldsWrapper
|
||||||
+Widget parent()
|
+Widget parent()
|
||||||
}
|
}
|
||||||
|
|
||||||
"wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen" o-- "null::TopNavigationBarComponent Function(TopNavigationBarComponent)"
|
"wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::presentation::layouts::structural_layouts::structural_layout.dart::TopNavigationBarComponent Function(TopNavigationBarComponent)"
|
||||||
|
"wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen" o-- "wyatt_ui_layout::src::core::scaffold_fields_wrapper.dart::ScaffoldFieldsWrapper"
|
||||||
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen"
|
"wyatt_bloc_layout::src::presentation::cubit_screen_base.dart::CubitScreenBase" <|-- "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen.dart::TopNavigationBarLayoutCubitScreen"
|
||||||
|
|
||||||
abstract class "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen_crud_item.dart::TopNavigationBarLayoutCubitScreenCrudItem" {
|
abstract class "wyatt_bloc_layout::src::presentation::top_navigation_bar_bloc_layout::top_navigation_bar_layout_cubit_screen_crud_item.dart::TopNavigationBarLayoutCubitScreenCrudItem" {
|
||||||
|
@ -68,23 +68,23 @@ class ComponentThemeData {
|
|||||||
// /// {@macro component_theme_data}
|
// /// {@macro component_theme_data}
|
||||||
factory ComponentThemeData.fromOther(ComponentThemeData other) =>
|
factory ComponentThemeData.fromOther(ComponentThemeData other) =>
|
||||||
ComponentThemeData(
|
ComponentThemeData(
|
||||||
topAppBars: other.topAppBars,
|
topAppBars: other._topAppBars,
|
||||||
topNavigationBars: other.topNavigationBars,
|
topNavigationBars: other._topNavigationBars,
|
||||||
bottomNavigationBars: other.bottomNavigationBars,
|
bottomNavigationBars: other._bottomNavigationBars,
|
||||||
errors: other.errors,
|
errors: other._errors,
|
||||||
loaders: other.loaders,
|
loaders: other._loaders,
|
||||||
richTextBuilders: other.richTextBuilders,
|
richTextBuilders: other._richTextBuilders,
|
||||||
textInputs: other.textInputs,
|
textInputs: other._textInputs,
|
||||||
fileSelectionButtons: other.fileSelectionButtons,
|
fileSelectionButtons: other._fileSelectionButtons,
|
||||||
flatButtons: other.flatButtons,
|
flatButtons: other._flatButtons,
|
||||||
simpleIconButtons: other.simpleIconButtons,
|
simpleIconButtons: other._simpleIconButtons,
|
||||||
symbolButtons: other.symbolButtons,
|
symbolButtons: other._symbolButtons,
|
||||||
informationCards: other.informationCards,
|
informationCards: other._informationCards,
|
||||||
portfolioCards: other.portfolioCards,
|
portfolioCards: other._portfolioCards,
|
||||||
quoteCards: other.quoteCards,
|
quoteCards: other._quoteCards,
|
||||||
skillCards: other.skillCards,
|
skillCards: other._skillCards,
|
||||||
pricingCards: other.pricingCards,
|
pricingCards: other._pricingCards,
|
||||||
floatingActionButtons: other.floatingActionButtons,
|
floatingActionButtons: other._floatingActionButtons,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Create a [ComponentThemeData] given a set of exact values. Most values
|
/// Create a [ComponentThemeData] given a set of exact values. Most values
|
||||||
@ -94,24 +94,40 @@ class ComponentThemeData {
|
|||||||
/// create intermediate themes based on two themes created with the
|
/// create intermediate themes based on two themes created with the
|
||||||
/// [ComponentThemeData] constructor.
|
/// [ComponentThemeData] constructor.
|
||||||
const ComponentThemeData.raw({
|
const ComponentThemeData.raw({
|
||||||
this.topAppBars,
|
ComponentRegistry<TopAppBarComponent>? topAppBars,
|
||||||
this.topNavigationBars,
|
ComponentRegistry<TopNavigationBarComponent>? topNavigationBars,
|
||||||
this.bottomNavigationBars,
|
ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars,
|
||||||
this.errors,
|
ComponentRegistry<ErrorComponent>? errors,
|
||||||
this.loaders,
|
ComponentRegistry<LoaderComponent>? loaders,
|
||||||
this.richTextBuilders,
|
ComponentRegistry<RichTextBuilderComponent>? richTextBuilders,
|
||||||
this.textInputs,
|
ComponentRegistry<TextInputComponent>? textInputs,
|
||||||
this.fileSelectionButtons,
|
ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons,
|
||||||
this.flatButtons,
|
ComponentRegistry<FlatButtonComponent>? flatButtons,
|
||||||
this.simpleIconButtons,
|
ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons,
|
||||||
this.symbolButtons,
|
ComponentRegistry<SymbolButtonComponent>? symbolButtons,
|
||||||
this.informationCards,
|
ComponentRegistry<InformationCardComponent>? informationCards,
|
||||||
this.portfolioCards,
|
ComponentRegistry<PortfolioCardComponent>? portfolioCards,
|
||||||
this.quoteCards,
|
ComponentRegistry<QuoteCardComponent>? quoteCards,
|
||||||
this.skillCards,
|
ComponentRegistry<SkillCardComponent>? skillCards,
|
||||||
this.pricingCards,
|
ComponentRegistry<PricingCardComponent>? pricingCards,
|
||||||
this.floatingActionButtons,
|
ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons,
|
||||||
});
|
}) : _floatingActionButtons = floatingActionButtons,
|
||||||
|
_symbolButtons = symbolButtons,
|
||||||
|
_simpleIconButtons = simpleIconButtons,
|
||||||
|
_flatButtons = flatButtons,
|
||||||
|
_fileSelectionButtons = fileSelectionButtons,
|
||||||
|
_textInputs = textInputs,
|
||||||
|
_richTextBuilders = richTextBuilders,
|
||||||
|
_pricingCards = pricingCards,
|
||||||
|
_skillCards = skillCards,
|
||||||
|
_quoteCards = quoteCards,
|
||||||
|
_portfolioCards = portfolioCards,
|
||||||
|
_informationCards = informationCards,
|
||||||
|
_loaders = loaders,
|
||||||
|
_errors = errors,
|
||||||
|
_bottomNavigationBars = bottomNavigationBars,
|
||||||
|
_topNavigationBars = topNavigationBars,
|
||||||
|
_topAppBars = topAppBars;
|
||||||
|
|
||||||
R _get<T extends Component, R>(T? component, R? returned) {
|
R _get<T extends Component, R>(T? component, R? returned) {
|
||||||
if (component == null) {
|
if (component == null) {
|
||||||
@ -129,90 +145,97 @@ class ComponentThemeData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bars
|
// Bars
|
||||||
final ComponentRegistry<TopAppBarComponent>? topAppBars;
|
final ComponentRegistry<TopAppBarComponent>? _topAppBars;
|
||||||
$TopAppBarComponentCWProxy topAppBarComponent([String? id]) =>
|
$TopAppBarComponentCWProxy topAppBarComponent([String? id]) =>
|
||||||
_get(topAppBars?.call(id), topAppBars?.call(id)?.copyWith);
|
_get(_topAppBars?.call(id), _topAppBars?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<TopNavigationBarComponent>? topNavigationBars;
|
final ComponentRegistry<TopNavigationBarComponent>? _topNavigationBars;
|
||||||
$TopNavigationBarComponentCWProxy topNavigationBarComponent([String? id]) =>
|
$TopNavigationBarComponentCWProxy topNavigationBarComponent([String? id]) =>
|
||||||
_get(topNavigationBars?.call(id), topNavigationBars?.call(id)?.copyWith);
|
_get(
|
||||||
|
_topNavigationBars?.call(id),
|
||||||
|
_topNavigationBars?.call(id)?.copyWith,
|
||||||
|
);
|
||||||
|
|
||||||
final ComponentRegistry<BottomNavigationBarComponent>? bottomNavigationBars;
|
final ComponentRegistry<BottomNavigationBarComponent>? _bottomNavigationBars;
|
||||||
$BottomNavigationBarComponentCWProxy bottomNavigationBarComponent([
|
$BottomNavigationBarComponentCWProxy bottomNavigationBarComponent([
|
||||||
String? id,
|
String? id,
|
||||||
]) =>
|
]) =>
|
||||||
_get(
|
_get(
|
||||||
bottomNavigationBars?.call(id),
|
_bottomNavigationBars?.call(id),
|
||||||
bottomNavigationBars?.call(id)?.copyWith,
|
_bottomNavigationBars?.call(id)?.copyWith,
|
||||||
);
|
);
|
||||||
|
|
||||||
// CRUD Widgets
|
// CRUD Widgets
|
||||||
final ComponentRegistry<ErrorComponent>? errors;
|
final ComponentRegistry<ErrorComponent>? _errors;
|
||||||
$ErrorComponentCWProxy errorComponent([String? id]) =>
|
$ErrorComponentCWProxy errorComponent([String? id]) =>
|
||||||
_get(errors?.call(id), errors?.call(id)?.copyWith);
|
_get(_errors?.call(id), _errors?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<LoaderComponent>? loaders;
|
final ComponentRegistry<LoaderComponent>? _loaders;
|
||||||
$LoaderComponentCWProxy loaderComponent([String? id]) =>
|
$LoaderComponentCWProxy loaderComponent([String? id]) =>
|
||||||
_get(loaders?.call(id), loaders?.call(id)?.copyWith);
|
_get(_loaders?.call(id), _loaders?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Cards
|
// Cards
|
||||||
final ComponentRegistry<InformationCardComponent>? informationCards;
|
final ComponentRegistry<InformationCardComponent>? _informationCards;
|
||||||
$InformationCardComponentCWProxy informationCardComponent([String? id]) =>
|
$InformationCardComponentCWProxy informationCardComponent([String? id]) =>
|
||||||
_get(informationCards?.call(id), informationCards?.call(id)?.copyWith);
|
_get(_informationCards?.call(id), _informationCards?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<PortfolioCardComponent>? portfolioCards;
|
final ComponentRegistry<PortfolioCardComponent>? _portfolioCards;
|
||||||
$PortfolioCardComponentCWProxy portfolioCardComponent([String? id]) =>
|
$PortfolioCardComponentCWProxy portfolioCardComponent([String? id]) =>
|
||||||
_get(portfolioCards?.call(id), portfolioCards?.call(id)?.copyWith);
|
_get(_portfolioCards?.call(id), _portfolioCards?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<QuoteCardComponent>? quoteCards;
|
final ComponentRegistry<QuoteCardComponent>? _quoteCards;
|
||||||
$QuoteCardComponentCWProxy quoteCardComponent([String? id]) =>
|
$QuoteCardComponentCWProxy quoteCardComponent([String? id]) =>
|
||||||
_get(quoteCards?.call(id), quoteCards?.call(id)?.copyWith);
|
_get(_quoteCards?.call(id), _quoteCards?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<SkillCardComponent>? skillCards;
|
final ComponentRegistry<SkillCardComponent>? _skillCards;
|
||||||
$SkillCardComponentCWProxy skillCardComponent([String? id]) =>
|
$SkillCardComponentCWProxy skillCardComponent([String? id]) =>
|
||||||
_get(skillCards?.call(id), skillCards?.call(id)?.copyWith);
|
_get(_skillCards?.call(id), _skillCards?.call(id)?.copyWith);
|
||||||
final ComponentRegistry<PricingCardComponent>? pricingCards;
|
final ComponentRegistry<PricingCardComponent>? _pricingCards;
|
||||||
$PricingCardComponentCWProxy pricingCardComponent([String? id]) =>
|
$PricingCardComponentCWProxy pricingCardComponent([String? id]) =>
|
||||||
_get(pricingCards?.call(id), pricingCards?.call(id)?.copyWith);
|
_get(_pricingCards?.call(id), _pricingCards?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Rich Text
|
// Rich Text
|
||||||
final ComponentRegistry<RichTextBuilderComponent>? richTextBuilders;
|
final ComponentRegistry<RichTextBuilderComponent>? _richTextBuilders;
|
||||||
$RichTextBuilderComponentCWProxy richTextBuilderComponent([String? id]) =>
|
$RichTextBuilderComponentCWProxy richTextBuilderComponent([String? id]) =>
|
||||||
_get(richTextBuilders?.call(id), richTextBuilders?.call(id)?.copyWith);
|
_get(_richTextBuilders?.call(id), _richTextBuilders?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Text Inputs
|
// Text Inputs
|
||||||
final ComponentRegistry<TextInputComponent>? textInputs;
|
final ComponentRegistry<TextInputComponent>? _textInputs;
|
||||||
$TextInputComponentCWProxy textInputComponent([String? id]) =>
|
$TextInputComponentCWProxy textInputComponent([String? id]) =>
|
||||||
_get(textInputs?.call(id), textInputs?.call(id)?.copyWith);
|
_get(_textInputs?.call(id), _textInputs?.call(id)?.copyWith);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
final ComponentRegistry<FileSelectionButtonComponent>? fileSelectionButtons;
|
final ComponentRegistry<FileSelectionButtonComponent>? _fileSelectionButtons;
|
||||||
$FileSelectionButtonComponentCWProxy fileSelectionButtonComponent([
|
$FileSelectionButtonComponentCWProxy fileSelectionButtonComponent([
|
||||||
String? id,
|
String? id,
|
||||||
]) =>
|
]) =>
|
||||||
_get(
|
_get(
|
||||||
fileSelectionButtons?.call(id),
|
_fileSelectionButtons?.call(id),
|
||||||
fileSelectionButtons?.call(id)?.copyWith,
|
_fileSelectionButtons?.call(id)?.copyWith,
|
||||||
);
|
);
|
||||||
|
|
||||||
final ComponentRegistry<FlatButtonComponent>? flatButtons;
|
final ComponentRegistry<FlatButtonComponent>? _flatButtons;
|
||||||
$FlatButtonComponentCWProxy flatButtonComponent([String? id]) =>
|
$FlatButtonComponentCWProxy flatButtonComponent([String? id]) =>
|
||||||
_get(flatButtons?.call(id), flatButtons?.call(id)?.copyWith);
|
_get(_flatButtons?.call(id), _flatButtons?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<SimpleIconButtonComponent>? simpleIconButtons;
|
final ComponentRegistry<SimpleIconButtonComponent>? _simpleIconButtons;
|
||||||
$SimpleIconButtonComponentCWProxy simpleIconButtonComponent([String? id]) =>
|
$SimpleIconButtonComponentCWProxy simpleIconButtonComponent([String? id]) =>
|
||||||
_get(simpleIconButtons?.call(id), simpleIconButtons?.call(id)?.copyWith);
|
_get(
|
||||||
|
_simpleIconButtons?.call(id),
|
||||||
|
_simpleIconButtons?.call(id)?.copyWith,
|
||||||
|
);
|
||||||
|
|
||||||
final ComponentRegistry<SymbolButtonComponent>? symbolButtons;
|
final ComponentRegistry<SymbolButtonComponent>? _symbolButtons;
|
||||||
$SymbolButtonComponentCWProxy symbolButtonComponent([String? id]) =>
|
$SymbolButtonComponentCWProxy symbolButtonComponent([String? id]) =>
|
||||||
_get(symbolButtons?.call(id), symbolButtons?.call(id)?.copyWith);
|
_get(_symbolButtons?.call(id), _symbolButtons?.call(id)?.copyWith);
|
||||||
|
|
||||||
final ComponentRegistry<FloatingActionButtonComponent>? floatingActionButtons;
|
final ComponentRegistry<FloatingActionButtonComponent>?
|
||||||
|
_floatingActionButtons;
|
||||||
$FloatingActionButtonComponentCWProxy floatingActionButtonComponent([
|
$FloatingActionButtonComponentCWProxy floatingActionButtonComponent([
|
||||||
String? id,
|
String? id,
|
||||||
]) =>
|
]) =>
|
||||||
_get(
|
_get(
|
||||||
floatingActionButtons?.call(id),
|
_floatingActionButtons?.call(id),
|
||||||
floatingActionButtons?.call(id)?.copyWith,
|
_floatingActionButtons?.call(id)?.copyWith,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -30,13 +30,13 @@ class PortfolioCards extends StatelessWidget {
|
|||||||
'quis elit ut amet velit. Incididunt fugiat proident '
|
'quis elit ut amet velit. Incididunt fugiat proident '
|
||||||
'proident deserunt tempor Lorem cillum qui do '),
|
'proident deserunt tempor Lorem cillum qui do '),
|
||||||
ctas: [
|
ctas: [
|
||||||
context.components.flatButtonComponent.call(
|
context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper('En savoir plus'),
|
label: const TextWrapper('En savoir plus'),
|
||||||
suffix: const Icon(
|
suffix: const Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
assets: [
|
assets: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
@ -65,13 +65,13 @@ class PortfolioCards extends StatelessWidget {
|
|||||||
'quis elit ut amet velit. Incididunt fugiat proident '
|
'quis elit ut amet velit. Incididunt fugiat proident '
|
||||||
'proident deserunt tempor Lorem cillum qui do '),
|
'proident deserunt tempor Lorem cillum qui do '),
|
||||||
ctas: [
|
ctas: [
|
||||||
context.components.flatButtonComponent.call(
|
context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper('En savoir plus'),
|
label: const TextWrapper('En savoir plus'),
|
||||||
suffix: const Icon(
|
suffix: const Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
assets: [
|
assets: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
@ -100,13 +100,13 @@ class PortfolioCards extends StatelessWidget {
|
|||||||
'quis elit ut amet velit. Incididunt fugiat proident '
|
'quis elit ut amet velit. Incididunt fugiat proident '
|
||||||
'proident deserunt tempor Lorem cillum qui do '),
|
'proident deserunt tempor Lorem cillum qui do '),
|
||||||
ctas: [
|
ctas: [
|
||||||
context.components.flatButtonComponent.call(
|
context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper('En savoir plus'),
|
label: const TextWrapper('En savoir plus'),
|
||||||
suffix: const Icon(
|
suffix: const Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
assets: [
|
assets: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
@ -145,13 +145,13 @@ class PortfolioCards extends StatelessWidget {
|
|||||||
'quis elit ut amet velit. Incididunt fugiat proident '
|
'quis elit ut amet velit. Incididunt fugiat proident '
|
||||||
'proident deserunt tempor Lorem cillum qui do '),
|
'proident deserunt tempor Lorem cillum qui do '),
|
||||||
ctas: [
|
ctas: [
|
||||||
context.components.flatButtonComponent.call(
|
context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper('En savoir plus'),
|
label: const TextWrapper('En savoir plus'),
|
||||||
suffix: const Icon(
|
suffix: const Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
assets: [
|
assets: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
|
@ -73,20 +73,20 @@ class PricingCards extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
cta: context.components.flatButtonComponent.call(
|
cta: context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper(
|
label: const TextWrapper(
|
||||||
'Contactez-nous',
|
'Contactez-nous',
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
|
||||||
normalStyle: FlatButtonThemeExtensionImpl.dark(
|
|
||||||
theme: Theme.of(context),
|
|
||||||
).normalStyle?.copyWith(
|
|
||||||
backgroundColors:
|
|
||||||
const MultiColor(Constants.blueBtnGradient),
|
|
||||||
borderColors:
|
|
||||||
const MultiColor(Constants.blueBtnGradient),
|
|
||||||
),
|
),
|
||||||
),
|
normalStyle: FlatButtonThemeExtensionImpl.dark(
|
||||||
|
theme: Theme.of(context),
|
||||||
|
).normalStyle?.copyWith(
|
||||||
|
backgroundColors:
|
||||||
|
const MultiColor(Constants.blueBtnGradient),
|
||||||
|
borderColors:
|
||||||
|
const MultiColor(Constants.blueBtnGradient),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const Gap(20),
|
const Gap(20),
|
||||||
PricingCard(
|
PricingCard(
|
||||||
@ -130,20 +130,20 @@ class PricingCards extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
cta: context.components.flatButtonComponent.call(
|
cta: context.components.flatButtonComponent().call(
|
||||||
label: const TextWrapper(
|
label: const TextWrapper(
|
||||||
'Contactez-nous',
|
'Contactez-nous',
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
|
||||||
normalStyle: FlatButtonThemeExtensionImpl.dark(
|
|
||||||
theme: Theme.of(context),
|
|
||||||
).normalStyle?.copyWith(
|
|
||||||
backgroundColors:
|
|
||||||
const MultiColor(Constants.purpleGradient),
|
|
||||||
borderColors:
|
|
||||||
const MultiColor(Constants.purpleGradient),
|
|
||||||
),
|
),
|
||||||
),
|
normalStyle: FlatButtonThemeExtensionImpl.dark(
|
||||||
|
theme: Theme.of(context),
|
||||||
|
).normalStyle?.copyWith(
|
||||||
|
backgroundColors:
|
||||||
|
const MultiColor(Constants.purpleGradient),
|
||||||
|
borderColors:
|
||||||
|
const MultiColor(Constants.purpleGradient),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -22,23 +22,22 @@ import 'package:wyatt_ui_kit/wyatt_ui_kit.dart';
|
|||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
abstract class WyattComponentThemeData {
|
abstract class WyattComponentThemeData {
|
||||||
/// {@macro wyatt_component_theme_data}
|
/// {@macro wyatt_component_theme_data}
|
||||||
static const ComponentThemeData wyattComponentThemeData =
|
static ComponentThemeData wyattComponentThemeData = ComponentThemeData.raw(
|
||||||
ComponentThemeData.raw(
|
topAppBars: const TopAppBar().registry(),
|
||||||
topAppBar: TopAppBar(),
|
topNavigationBars: const TopNavigationBar().registry(),
|
||||||
topNavigationBar: TopNavigationBar(),
|
// bottomNavigationBars: ,
|
||||||
// bottomNavigationBar: ,
|
// errors: ,
|
||||||
// error: ,
|
loaders: const Loader().registry(),
|
||||||
loader: Loader(),
|
richTextBuilders: const RichTextBuilder().registry(),
|
||||||
richTextBuilder: RichTextBuilder(),
|
textInputs: const TextInput().registry(),
|
||||||
textInput: TextInput(),
|
fileSelectionButtons: const FileSelectionButton().registry(),
|
||||||
fileSelectionButton: FileSelectionButton(),
|
flatButtons: const FlatButton().registry(),
|
||||||
flatButton: FlatButton(),
|
simpleIconButtons: const SimpleIconButton().registry(),
|
||||||
simpleIconButton: SimpleIconButton(),
|
symbolButtons: const SymbolButton().registry(),
|
||||||
symbolButton: SymbolButton(),
|
informationCards: const InformationCard().registry(),
|
||||||
informationCard: InformationCard(),
|
portfolioCards: const PortfolioCard().registry(),
|
||||||
portfolioCard: PortfolioCard(),
|
quoteCards: const QuoteCard().registry(),
|
||||||
quoteCard: QuoteCard(),
|
skillCards: const SkillCard().registry(),
|
||||||
skillCard: SkillCard(),
|
pricingCards: const PricingCard().registry(),
|
||||||
pricingCard: PricingCard(),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,15 @@ class $CustomBottomNavigationBarCWProxyImpl
|
|||||||
CustomBottomNavigationBar currentIndex(int? currentIndex) =>
|
CustomBottomNavigationBar currentIndex(int? currentIndex) =>
|
||||||
this(currentIndex: currentIndex);
|
this(currentIndex: currentIndex);
|
||||||
@override
|
@override
|
||||||
|
CustomBottomNavigationBar items(List<BottomNavigationBarItem>? items) =>
|
||||||
|
this(items: items);
|
||||||
|
@override
|
||||||
CustomBottomNavigationBar key(Key? key) => this(key: key);
|
CustomBottomNavigationBar key(Key? key) => this(key: key);
|
||||||
@override
|
@override
|
||||||
CustomBottomNavigationBar call({
|
CustomBottomNavigationBar call({
|
||||||
void Function(BuildContext, int)? onTap,
|
void Function(BuildContext, int)? onTap,
|
||||||
int? currentIndex,
|
int? currentIndex,
|
||||||
|
List<BottomNavigationBarItem>? items,
|
||||||
Key? key,
|
Key? key,
|
||||||
}) =>
|
}) =>
|
||||||
CustomBottomNavigationBar(
|
CustomBottomNavigationBar(
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
||||||
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
|
part 'custom_desktop_app_bar.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomDesktopAppBar extends TopAppBarComponent
|
||||||
|
with $CustomDesktopAppBarCWMixin {
|
||||||
|
const CustomDesktopAppBar({
|
||||||
|
super.title,
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => AppBar(
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
title: Text(title?.data ?? ''),
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_desktop_app_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomDesktopAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||||
|
const $CustomDesktopAppBarCWProxyImpl(this._value);
|
||||||
|
final CustomDesktopAppBar _value;
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar title(TextWrapper? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar centerTitle(bool? centerTitle) =>
|
||||||
|
this(centerTitle: centerTitle);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar systemOverlayStyle(
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||||
|
this(systemOverlayStyle: systemOverlayStyle);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar automaticallyImplyLeading(
|
||||||
|
bool? automaticallyImplyLeading) =>
|
||||||
|
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar flexibleSpace(Widget? flexibleSpace) =>
|
||||||
|
this(flexibleSpace: flexibleSpace);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar bottom(PreferredSizeWidget? bottom) =>
|
||||||
|
this(bottom: bottom);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar elevation(double? elevation) =>
|
||||||
|
this(elevation: elevation);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
|
||||||
|
this(scrolledUnderElevation: scrolledUnderElevation);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar shadowColor(Color? shadowColor) =>
|
||||||
|
this(shadowColor: shadowColor);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar surfaceTintColor(Color? surfaceTintColor) =>
|
||||||
|
this(surfaceTintColor: surfaceTintColor);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar backgroundColor(MultiColor? backgroundColor) =>
|
||||||
|
this(backgroundColor: backgroundColor);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar iconTheme(IconThemeData? iconTheme) =>
|
||||||
|
this(iconTheme: iconTheme);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar primary(bool? primary) => this(primary: primary);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
||||||
|
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar toolbarHeight(double? toolbarHeight) =>
|
||||||
|
this(toolbarHeight: toolbarHeight);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar leadingWidth(double? leadingWidth) =>
|
||||||
|
this(leadingWidth: leadingWidth);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
||||||
|
this(expandedWidget: expandedWidget);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomDesktopAppBar call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
|
ShapeBorder? shape,
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
|
bool? automaticallyImplyLeading,
|
||||||
|
Widget? flexibleSpace,
|
||||||
|
PreferredSizeWidget? bottom,
|
||||||
|
double? elevation,
|
||||||
|
double? scrolledUnderElevation,
|
||||||
|
Color? shadowColor,
|
||||||
|
Color? surfaceTintColor,
|
||||||
|
MultiColor? backgroundColor,
|
||||||
|
IconThemeData? iconTheme,
|
||||||
|
bool? primary,
|
||||||
|
bool? excludeHeaderSemantics,
|
||||||
|
double? toolbarHeight,
|
||||||
|
double? leadingWidth,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
List<Widget>? expandedWidget,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomDesktopAppBar(
|
||||||
|
title: title ?? _value.title,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomDesktopAppBarCWMixin on Component {
|
||||||
|
$TopAppBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomDesktopAppBarCWProxyImpl(this as CustomDesktopAppBar);
|
||||||
|
}
|
@ -3,17 +3,19 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
import 'package:wyatt_component_copy_with_extension/wyatt_component_copy_with_extension.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
|
||||||
part 'custom_app_bar.g.dart';
|
part 'custom_mobile_app_bar.g.dart';
|
||||||
|
|
||||||
@ComponentCopyWithExtension()
|
@ComponentCopyWithExtension()
|
||||||
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
|
class CustomMobileAppBar extends TopAppBarComponent
|
||||||
const CustomAppBar({
|
with $CustomMobileAppBarCWMixin {
|
||||||
|
const CustomMobileAppBar({
|
||||||
super.title,
|
super.title,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AppBar(
|
Widget build(BuildContext context) => AppBar(
|
||||||
|
backgroundColor: Colors.red,
|
||||||
title: Text(title?.data ?? ''),
|
title: Text(title?.data ?? ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_mobile_app_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomMobileAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||||
|
const $CustomMobileAppBarCWProxyImpl(this._value);
|
||||||
|
final CustomMobileAppBar _value;
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar title(TextWrapper? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar centerTitle(bool? centerTitle) =>
|
||||||
|
this(centerTitle: centerTitle);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar systemOverlayStyle(
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||||
|
this(systemOverlayStyle: systemOverlayStyle);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar automaticallyImplyLeading(
|
||||||
|
bool? automaticallyImplyLeading) =>
|
||||||
|
this(automaticallyImplyLeading: automaticallyImplyLeading);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar flexibleSpace(Widget? flexibleSpace) =>
|
||||||
|
this(flexibleSpace: flexibleSpace);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar bottom(PreferredSizeWidget? bottom) =>
|
||||||
|
this(bottom: bottom);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar elevation(double? elevation) => this(elevation: elevation);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar scrolledUnderElevation(double? scrolledUnderElevation) =>
|
||||||
|
this(scrolledUnderElevation: scrolledUnderElevation);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar shadowColor(Color? shadowColor) =>
|
||||||
|
this(shadowColor: shadowColor);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar surfaceTintColor(Color? surfaceTintColor) =>
|
||||||
|
this(surfaceTintColor: surfaceTintColor);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar backgroundColor(MultiColor? backgroundColor) =>
|
||||||
|
this(backgroundColor: backgroundColor);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar iconTheme(IconThemeData? iconTheme) =>
|
||||||
|
this(iconTheme: iconTheme);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar primary(bool? primary) => this(primary: primary);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar excludeHeaderSemantics(bool? excludeHeaderSemantics) =>
|
||||||
|
this(excludeHeaderSemantics: excludeHeaderSemantics);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar toolbarHeight(double? toolbarHeight) =>
|
||||||
|
this(toolbarHeight: toolbarHeight);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar leadingWidth(double? leadingWidth) =>
|
||||||
|
this(leadingWidth: leadingWidth);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
||||||
|
this(expandedWidget: expandedWidget);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomMobileAppBar call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
|
ShapeBorder? shape,
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
|
bool? automaticallyImplyLeading,
|
||||||
|
Widget? flexibleSpace,
|
||||||
|
PreferredSizeWidget? bottom,
|
||||||
|
double? elevation,
|
||||||
|
double? scrolledUnderElevation,
|
||||||
|
Color? shadowColor,
|
||||||
|
Color? surfaceTintColor,
|
||||||
|
MultiColor? backgroundColor,
|
||||||
|
IconThemeData? iconTheme,
|
||||||
|
bool? primary,
|
||||||
|
bool? excludeHeaderSemantics,
|
||||||
|
double? toolbarHeight,
|
||||||
|
double? leadingWidth,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
List<Widget>? expandedWidget,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomMobileAppBar(
|
||||||
|
title: title ?? _value.title,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomMobileAppBarCWMixin on Component {
|
||||||
|
$TopAppBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomMobileAppBarCWProxyImpl(this as CustomMobileAppBar);
|
||||||
|
}
|
@ -1,14 +1,18 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
import 'package:wyatt_ui_layout_example/components/custom_app_bar.dart';
|
|
||||||
import 'package:wyatt_ui_layout_example/components/custom_bottom_navigation_bar.dart';
|
import 'package:wyatt_ui_layout_example/components/custom_bottom_navigation_bar.dart';
|
||||||
|
import 'package:wyatt_ui_layout_example/components/custom_desktop_app_bar.dart';
|
||||||
|
import 'package:wyatt_ui_layout_example/components/custom_mobile_app_bar.dart';
|
||||||
import 'package:wyatt_ui_layout_example/pages/bottom_navigation_bar_layout_page_1.dart';
|
import 'package:wyatt_ui_layout_example/pages/bottom_navigation_bar_layout_page_1.dart';
|
||||||
import 'package:wyatt_ui_layout_example/pages/bottom_navigation_bar_layout_page_2.dart';
|
import 'package:wyatt_ui_layout_example/pages/bottom_navigation_bar_layout_page_2.dart';
|
||||||
|
|
||||||
class AppThemeComponent {
|
class AppThemeComponent {
|
||||||
static ComponentThemeData get components => ComponentThemeData.raw(
|
static ComponentThemeData get components => ComponentThemeData.raw(
|
||||||
topAppBar: const CustomAppBar(),
|
topAppBars: {
|
||||||
bottomNavigationBar: CustomBottomNavigationBar(
|
'mobile': const CustomMobileAppBar(),
|
||||||
|
'desktop': const CustomDesktopAppBar(),
|
||||||
|
}.registry(),
|
||||||
|
bottomNavigationBars: CustomBottomNavigationBar(
|
||||||
onTap: (context, index) {
|
onTap: (context, index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -37,6 +41,6 @@ class AppThemeComponent {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
).registry(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,15 @@ class AppBarLayoutPage extends StatelessWidget {
|
|||||||
const AppBarLayoutPage({super.key});
|
const AppBarLayoutPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => TopAppBarLayout(
|
Widget build(BuildContext context) => LayoutBuilder(
|
||||||
custom: (topBar) =>
|
builder: (context, constraint) => StructuralLayout.withTopAppBar(
|
||||||
topBar?.copyWith.title(const TextWrapper('New Title')),
|
barId: constraint.maxWidth < 600 ? 'mobile' : 'desktop',
|
||||||
body: const Center(
|
custom: (topBar) =>
|
||||||
child: Text(
|
topBar?.copyWith.title(const TextWrapper('New Title')),
|
||||||
'Body',
|
body: const Center(
|
||||||
|
child: Text(
|
||||||
|
'Body',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -5,7 +5,7 @@ class BottomNavigationBarLayoutPage1 extends StatelessWidget {
|
|||||||
const BottomNavigationBarLayoutPage1({super.key});
|
const BottomNavigationBarLayoutPage1({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => BottomNavigationBarLayout(
|
Widget build(BuildContext context) => StructuralLayout.withBottomNavBar(
|
||||||
custom: (p0) => p0?.copyWith.call(currentIndex: 0),
|
custom: (p0) => p0?.copyWith.call(currentIndex: 0),
|
||||||
body: const TopAppBarLayout(
|
body: const TopAppBarLayout(
|
||||||
body: Center(
|
body: Center(
|
||||||
|
@ -5,7 +5,7 @@ class BottomNavigationBarLayoutPage2 extends StatelessWidget {
|
|||||||
const BottomNavigationBarLayoutPage2({super.key});
|
const BottomNavigationBarLayoutPage2({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => BottomNavigationBarLayout(
|
Widget build(BuildContext context) => StructuralLayout.withBottomNavBar(
|
||||||
custom: (p0) => p0?.copyWith.currentIndex(1),
|
custom: (p0) => p0?.copyWith.currentIndex(1),
|
||||||
body: const TopAppBarLayout(
|
body: const TopAppBarLayout(
|
||||||
body: Center(
|
body: Center(
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Flutter-related
|
# Flutter-related
|
||||||
**/Flutter/ephemeral/
|
Flutter/ephemeral/
|
||||||
|
Flutter/Generated.xcconfig
|
||||||
**/Pods/
|
**/Pods/
|
||||||
|
|
||||||
# Xcode-related
|
# Xcode-related
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
// This is a generated file; do not edit or check into version control.
|
|
||||||
FLUTTER_ROOT=/Users/maloleon/Library/flutter
|
|
||||||
FLUTTER_APPLICATION_PATH=/Users/maloleon/Studio/wyatt-packages/packages/wyatt_ui_layout/example
|
|
||||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
|
||||||
FLUTTER_BUILD_DIR=build
|
|
||||||
FLUTTER_BUILD_NAME=1.0.0
|
|
||||||
FLUTTER_BUILD_NUMBER=1
|
|
||||||
DART_OBFUSCATION=false
|
|
||||||
TRACK_WIDGET_CREATION=true
|
|
||||||
TREE_SHAKE_ICONS=false
|
|
||||||
PACKAGE_CONFIG=.dart_tool/package_config.json
|
|
@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# This is a generated file; do not edit or check into version control.
|
|
||||||
export "FLUTTER_ROOT=/Users/maloleon/Library/flutter"
|
|
||||||
export "FLUTTER_APPLICATION_PATH=/Users/maloleon/Studio/wyatt-packages/packages/wyatt_ui_layout/example"
|
|
||||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
|
||||||
export "FLUTTER_BUILD_DIR=build"
|
|
||||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
|
||||||
export "FLUTTER_BUILD_NUMBER=1"
|
|
||||||
export "DART_OBFUSCATION=false"
|
|
||||||
export "TRACK_WIDGET_CREATION=true"
|
|
||||||
export "TREE_SHAKE_ICONS=false"
|
|
||||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
|
@ -182,7 +182,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0920;
|
LastSwiftUpdateCheck = 0920;
|
||||||
LastUpgradeCheck = 1300;
|
LastUpgradeCheck = 1430;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
33CC10EC2044A3C60003C045 = {
|
33CC10EC2044A3C60003C045 = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1300"
|
LastUpgradeVersion = "1430"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||||||
version: 1.0.0+1
|
version: 1.0.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.0 <3.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
// 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_ui_layout/src/presentation/layouts/layout.dart';
|
||||||
|
import 'package:wyatt_ui_layout/wyatt_ui_layout.dart';
|
||||||
|
|
||||||
|
/// {@template content_layout}
|
||||||
|
/// An abstract class that provides a base for creating custom content layout
|
||||||
|
/// widgets.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class ContentLayout extends Layout {
|
||||||
|
/// {@macro content_layout}
|
||||||
|
const ContentLayout({super.key});
|
||||||
|
|
||||||
|
factory ContentLayout.withGrid({
|
||||||
|
required List<Widget> children,
|
||||||
|
double verticalGap = 30,
|
||||||
|
double horizontalGap = 30,
|
||||||
|
}) =>
|
||||||
|
GridLayout(
|
||||||
|
verticalGap: verticalGap,
|
||||||
|
horizontalGap: horizontalGap,
|
||||||
|
children: children,
|
||||||
|
);
|
||||||
|
}
|
@ -14,4 +14,5 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
export './content_layout.dart';
|
||||||
export './grid_layout.dart';
|
export './grid_layout.dart';
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/content_layouts/content_layout.dart';
|
||||||
|
|
||||||
/// {@template grid_layout}
|
/// {@template grid_layout}
|
||||||
/// A concrete implementation of the [ContentLayout] abstract class for a layout
|
/// A concrete implementation of the [ContentLayout] abstract class for a layout
|
||||||
|
@ -28,21 +28,3 @@ abstract class Layout extends StatelessWidget {
|
|||||||
/// {@macro layout}
|
/// {@macro layout}
|
||||||
const Layout({super.key});
|
const Layout({super.key});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// {@template structural_layout}
|
|
||||||
/// An abstract class that provides a base for creating custom structural layout
|
|
||||||
/// widgets.
|
|
||||||
/// {@endtemplate}
|
|
||||||
abstract class StructuralLayout extends Layout {
|
|
||||||
/// {@macro structural_layout}
|
|
||||||
const StructuralLayout({super.key});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// {@template content_layout}
|
|
||||||
/// An abstract class that provides a base for creating custom content layout
|
|
||||||
/// widgets.
|
|
||||||
/// {@endtemplate}
|
|
||||||
abstract class ContentLayout extends Layout {
|
|
||||||
/// {@macro content_layout}
|
|
||||||
const ContentLayout({super.key});
|
|
||||||
}
|
|
||||||
|
@ -19,6 +19,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
||||||
|
import 'package:wyatt_ui_layout/src/presentation/layouts/structural_layouts/structural_layout.dart';
|
||||||
|
|
||||||
/// {@template bottom_navigation_bar_layout}
|
/// {@template bottom_navigation_bar_layout}
|
||||||
/// A concrete implementation of the [Layout] abstract class for a layout which
|
/// A concrete implementation of the [Layout] abstract class for a layout which
|
||||||
@ -29,6 +30,7 @@ class BottomNavigationBarLayout extends StructuralLayout {
|
|||||||
const BottomNavigationBarLayout({
|
const BottomNavigationBarLayout({
|
||||||
required this.body,
|
required this.body,
|
||||||
this.custom,
|
this.custom,
|
||||||
|
this.barId,
|
||||||
this.scaffoldFieldsWrapper,
|
this.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
@ -41,15 +43,23 @@ class BottomNavigationBarLayout extends StructuralLayout {
|
|||||||
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
final BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
||||||
custom;
|
custom;
|
||||||
|
|
||||||
|
/// The parameter [barId] enables to specify the particular
|
||||||
|
/// bottom bar to utilize.
|
||||||
|
final String? barId;
|
||||||
|
|
||||||
|
/// The [scaffoldFieldsWrapper] is a final variable that serves as a wrapper
|
||||||
|
/// for customizing the scaffold.
|
||||||
|
/// It allows for tailored modifications and enhancements to the standard
|
||||||
|
/// scaffold functionality.
|
||||||
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
body: body,
|
body: body,
|
||||||
bottomNavigationBar: custom?.call(
|
bottomNavigationBar: custom?.call(
|
||||||
context.components.bottomNavigationBar,
|
context.components.bottomNavigationBarComponent(barId).call(),
|
||||||
) ??
|
) ??
|
||||||
context.components.bottomNavigationBar,
|
context.components.bottomNavigationBarComponent(barId).call(),
|
||||||
floatingActionButtonLocation:
|
floatingActionButtonLocation:
|
||||||
scaffoldFieldsWrapper?.floatingActionButtonLocation,
|
scaffoldFieldsWrapper?.floatingActionButtonLocation,
|
||||||
floatingActionButtonAnimator:
|
floatingActionButtonAnimator:
|
||||||
|
@ -18,7 +18,7 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/structural_layouts/structural_layout.dart';
|
||||||
|
|
||||||
/// {@template frame_layout}
|
/// {@template frame_layout}
|
||||||
/// A layout that contains a top app bar, a body and a bottom navigation bar.
|
/// A layout that contains a top app bar, a body and a bottom navigation bar.
|
||||||
@ -36,6 +36,9 @@ class FrameLayout extends StructuralLayout {
|
|||||||
this.customAppBar,
|
this.customAppBar,
|
||||||
this.customBottomNavBar,
|
this.customBottomNavBar,
|
||||||
this.customFloatingActionButton,
|
this.customFloatingActionButton,
|
||||||
|
this.appBarId,
|
||||||
|
this.bottomNavBarId,
|
||||||
|
this.floatingActionButtonId,
|
||||||
this.height = 60,
|
this.height = 60,
|
||||||
this.scaffoldFieldsWrapper,
|
this.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
@ -53,6 +56,18 @@ class FrameLayout extends StructuralLayout {
|
|||||||
final FloatingActionButtonComponent? Function(FloatingActionButtonComponent?)?
|
final FloatingActionButtonComponent? Function(FloatingActionButtonComponent?)?
|
||||||
customFloatingActionButton;
|
customFloatingActionButton;
|
||||||
|
|
||||||
|
/// The parameter [appBarId] enables to specify the particular
|
||||||
|
/// app bar to utilize.
|
||||||
|
final String? appBarId;
|
||||||
|
|
||||||
|
/// The parameter [bottomNavBarId] enables to specify the particular
|
||||||
|
/// bottom bar to utilize.
|
||||||
|
final String? bottomNavBarId;
|
||||||
|
|
||||||
|
/// The parameter [floatingActionButtonId] enables to specify
|
||||||
|
/// the particular floating action button to utilize.
|
||||||
|
final String? floatingActionButtonId;
|
||||||
|
|
||||||
/// The main content of the layout.
|
/// The main content of the layout.
|
||||||
final Widget body;
|
final Widget body;
|
||||||
|
|
||||||
@ -63,20 +78,27 @@ class FrameLayout extends StructuralLayout {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: (customAppBar?.call(context.components.topAppBar) != null ||
|
appBar: (customAppBar
|
||||||
context.components.topAppBar != null)
|
?.call(context.components.topAppBarComponent(appBarId)()) !=
|
||||||
|
null)
|
||||||
? PreferredSize(
|
? PreferredSize(
|
||||||
preferredSize: Size.fromHeight(height),
|
preferredSize: Size.fromHeight(height),
|
||||||
child: customAppBar?.call(context.components.topAppBar) ??
|
child: customAppBar?.call(
|
||||||
context.components.topAppBar!,
|
context.components.topAppBarComponent(appBarId)(),
|
||||||
|
) ??
|
||||||
|
context.components.topAppBarComponent(appBarId)(),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
floatingActionButton: customFloatingActionButton
|
floatingActionButton: customFloatingActionButton?.call(
|
||||||
?.call(context.components.floatingActionButton) ??
|
context.components
|
||||||
context.components.floatingActionButton,
|
.floatingActionButtonComponent(floatingActionButtonId)(),
|
||||||
bottomNavigationBar:
|
) ??
|
||||||
customBottomNavBar?.call(context.components.bottomNavigationBar) ??
|
context.components
|
||||||
context.components.bottomNavigationBar,
|
.floatingActionButtonComponent(floatingActionButtonId)(),
|
||||||
|
bottomNavigationBar: customBottomNavBar?.call(
|
||||||
|
context.components.bottomNavigationBarComponent(bottomNavBarId)(),
|
||||||
|
) ??
|
||||||
|
context.components.bottomNavigationBarComponent(bottomNavBarId)(),
|
||||||
body: body,
|
body: body,
|
||||||
floatingActionButtonLocation:
|
floatingActionButtonLocation:
|
||||||
scaffoldFieldsWrapper?.floatingActionButtonLocation,
|
scaffoldFieldsWrapper?.floatingActionButtonLocation,
|
||||||
|
@ -0,0 +1,99 @@
|
|||||||
|
// 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:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
|
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
||||||
|
import 'package:wyatt_ui_layout/wyatt_ui_layout.dart';
|
||||||
|
|
||||||
|
typedef ComponentCallBack<T extends Component> = T? Function(T? component);
|
||||||
|
|
||||||
|
/// {@template structural_layout}
|
||||||
|
/// An abstract class that provides a base for creating custom structural layout
|
||||||
|
/// widgets.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class StructuralLayout extends Layout {
|
||||||
|
/// {@macro structural_layout}
|
||||||
|
const StructuralLayout({super.key});
|
||||||
|
|
||||||
|
factory StructuralLayout.withTopAppBar({
|
||||||
|
required Widget body,
|
||||||
|
ComponentCallBack<TopAppBarComponent>? custom,
|
||||||
|
String? barId,
|
||||||
|
double height = 60,
|
||||||
|
ScaffoldFieldsWrapper? scaffoldFieldsWrapper,
|
||||||
|
}) =>
|
||||||
|
TopAppBarLayout(
|
||||||
|
body: body,
|
||||||
|
barId: barId,
|
||||||
|
custom: custom,
|
||||||
|
height: height,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
|
);
|
||||||
|
|
||||||
|
factory StructuralLayout.withTopNavigationBar({
|
||||||
|
required Widget body,
|
||||||
|
ComponentCallBack<TopNavigationBarComponent>? custom,
|
||||||
|
String? barId,
|
||||||
|
double height = 60,
|
||||||
|
ScaffoldFieldsWrapper? scaffoldFieldsWrapper,
|
||||||
|
}) =>
|
||||||
|
TopNavigationBarLayout(
|
||||||
|
body: body,
|
||||||
|
barId: barId,
|
||||||
|
custom: custom,
|
||||||
|
height: height,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
|
);
|
||||||
|
|
||||||
|
factory StructuralLayout.withFrame({
|
||||||
|
required Widget body,
|
||||||
|
ComponentCallBack<TopAppBarComponent>? customAppBar,
|
||||||
|
ComponentCallBack<BottomNavigationBarComponent>? customBottomNavBar,
|
||||||
|
ComponentCallBack<FloatingActionButtonComponent>?
|
||||||
|
customFloatingActionButton,
|
||||||
|
String? appBarId,
|
||||||
|
String? bottomNavBarId,
|
||||||
|
String? floatingActionButtonId,
|
||||||
|
double height = 60,
|
||||||
|
ScaffoldFieldsWrapper? scaffoldFieldsWrapper,
|
||||||
|
}) =>
|
||||||
|
FrameLayout(
|
||||||
|
body: body,
|
||||||
|
customAppBar: customAppBar,
|
||||||
|
customBottomNavBar: customBottomNavBar,
|
||||||
|
customFloatingActionButton: customFloatingActionButton,
|
||||||
|
appBarId: appBarId,
|
||||||
|
bottomNavBarId: bottomNavBarId,
|
||||||
|
floatingActionButtonId: floatingActionButtonId,
|
||||||
|
height: height,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
|
);
|
||||||
|
|
||||||
|
factory StructuralLayout.withBottomNavBar({
|
||||||
|
required Widget? body,
|
||||||
|
BottomNavigationBarComponent? Function(BottomNavigationBarComponent?)?
|
||||||
|
custom,
|
||||||
|
String? barId,
|
||||||
|
ScaffoldFieldsWrapper? scaffoldFieldsWrapper,
|
||||||
|
}) =>
|
||||||
|
BottomNavigationBarLayout(
|
||||||
|
body: body,
|
||||||
|
custom: custom,
|
||||||
|
barId: barId,
|
||||||
|
scaffoldFieldsWrapper: scaffoldFieldsWrapper,
|
||||||
|
);
|
||||||
|
}
|
@ -16,4 +16,5 @@
|
|||||||
|
|
||||||
export './bottom_navigation_bar_layout.dart';
|
export './bottom_navigation_bar_layout.dart';
|
||||||
export './frame_layout.dart';
|
export './frame_layout.dart';
|
||||||
|
export './structural_layout.dart';
|
||||||
export './top_app_bar_layout.dart';
|
export './top_app_bar_layout.dart';
|
||||||
|
@ -18,7 +18,7 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_ui_components.dart';
|
||||||
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
import 'package:wyatt_ui_layout/src/core/scaffold_fields_wrapper.dart';
|
||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/structural_layouts/structural_layout.dart';
|
||||||
|
|
||||||
/// {@template top_bar_layout}
|
/// {@template top_bar_layout}
|
||||||
/// An abstract class for creating layouts with a top bar component.
|
/// An abstract class for creating layouts with a top bar component.
|
||||||
@ -27,7 +27,7 @@ import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
|||||||
/// component, such as an app bar or navigation bar.
|
/// component, such as an app bar or navigation bar.
|
||||||
///
|
///
|
||||||
/// Implementations of this class must provide a concrete implementation of
|
/// Implementations of this class must provide a concrete implementation of
|
||||||
/// the [child] method, which returns the specific top bar component for the
|
/// the [appBar] method, which returns the specific top bar component for the
|
||||||
/// given [BuildContext].
|
/// given [BuildContext].
|
||||||
///
|
///
|
||||||
/// [T] represents the type of the top bar component.
|
/// [T] represents the type of the top bar component.
|
||||||
@ -38,6 +38,7 @@ abstract class TopBarLayout<T extends TopBarComponent>
|
|||||||
const TopBarLayout({
|
const TopBarLayout({
|
||||||
required this.body,
|
required this.body,
|
||||||
this.custom,
|
this.custom,
|
||||||
|
this.barId,
|
||||||
this.height = 60,
|
this.height = 60,
|
||||||
this.scaffoldFieldsWrapper,
|
this.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
@ -51,20 +52,31 @@ abstract class TopBarLayout<T extends TopBarComponent>
|
|||||||
/// a customized top bar component.
|
/// a customized top bar component.
|
||||||
final T? Function(T?)? custom;
|
final T? Function(T?)? custom;
|
||||||
|
|
||||||
|
/// The parameter [barId] enables to specify the particular app bar to use.
|
||||||
|
final String? barId;
|
||||||
|
|
||||||
/// The height of the top bar.
|
/// The height of the top bar.
|
||||||
final double height;
|
final double height;
|
||||||
|
|
||||||
/// Returns the top bar component for the given [BuildContext].
|
/// Returns the top bar component for the given [BuildContext].
|
||||||
T? child(BuildContext context);
|
T appBar(BuildContext context, String? barId);
|
||||||
|
|
||||||
|
/// The [scaffoldFieldsWrapper] is a final variable that serves as a wrapper
|
||||||
|
/// for customizing the scaffold.
|
||||||
|
/// It allows for tailored modifications and enhancements to the standard
|
||||||
|
/// scaffold functionality.
|
||||||
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
final ScaffoldFieldsWrapper? scaffoldFieldsWrapper;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: (custom?.call(child(context)) != null || child(context) != null)
|
appBar: (custom?.call(
|
||||||
|
appBar(context, barId),
|
||||||
|
) !=
|
||||||
|
null)
|
||||||
? PreferredSize(
|
? PreferredSize(
|
||||||
preferredSize: Size.fromHeight(height),
|
preferredSize: Size.fromHeight(height),
|
||||||
child: custom?.call(child(context)) ?? child(context)!,
|
child: custom?.call(appBar(context, barId)) ??
|
||||||
|
appBar(context, barId),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
body: body,
|
body: body,
|
||||||
@ -111,14 +123,16 @@ class TopAppBarLayout extends TopBarLayout<TopAppBarComponent> {
|
|||||||
/// [height] represents the height of the top bar.
|
/// [height] represents the height of the top bar.
|
||||||
const TopAppBarLayout({
|
const TopAppBarLayout({
|
||||||
required super.body,
|
required super.body,
|
||||||
|
super.barId,
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height,
|
super.height,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TopAppBarComponent? child(BuildContext context) =>
|
TopAppBarComponent appBar(BuildContext context, String? barId) =>
|
||||||
context.components.topAppBar;
|
context.components.topAppBarComponent(barId).call();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A concrete implementation of [TopBarLayout] for a navigation bar.
|
/// A concrete implementation of [TopBarLayout] for a navigation bar.
|
||||||
@ -131,12 +145,14 @@ class TopNavigationBarLayout extends TopBarLayout<TopNavigationBarComponent> {
|
|||||||
/// [height] represents the height of the top bar.
|
/// [height] represents the height of the top bar.
|
||||||
const TopNavigationBarLayout({
|
const TopNavigationBarLayout({
|
||||||
required super.body,
|
required super.body,
|
||||||
|
super.barId,
|
||||||
super.custom,
|
super.custom,
|
||||||
super.height,
|
super.height,
|
||||||
|
super.scaffoldFieldsWrapper,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TopNavigationBarComponent? child(BuildContext context) =>
|
TopNavigationBarComponent appBar(BuildContext context, String? barId) =>
|
||||||
context.components.topNavigationBar;
|
context.components.topNavigationBarComponent(barId).call();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ version: 0.1.1
|
|||||||
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.0 <3.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter: { sdk: flutter }
|
flutter: { sdk: flutter }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user