master #81
@ -20,18 +20,26 @@ import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
|||||||
|
|
||||||
class AppBarLayout extends Layout {
|
class AppBarLayout extends Layout {
|
||||||
const AppBarLayout({
|
const AppBarLayout({
|
||||||
required this.title,
|
|
||||||
required this.body,
|
required this.body,
|
||||||
|
this.title,
|
||||||
|
this.leading,
|
||||||
|
this.actions,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
final String title;
|
final String? title;
|
||||||
|
final Widget? leading;
|
||||||
|
final List<Widget>? actions;
|
||||||
final Widget body;
|
final Widget body;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: PreferredSize(
|
appBar: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(60),
|
||||||
child: context.components.appBar?.configure(title: title) ??
|
child: context.components.appBar?.configure(
|
||||||
|
title: title,
|
||||||
|
leading: leading,
|
||||||
|
actions: actions,
|
||||||
|
) ??
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
body: body,
|
body: body,
|
||||||
|
@ -3,19 +3,18 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
|||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
||||||
|
|
||||||
class BottomNavigationBarLayout extends Layout {
|
class BottomNavigationBarLayout extends Layout {
|
||||||
|
|
||||||
const BottomNavigationBarLayout({
|
const BottomNavigationBarLayout({
|
||||||
required this.currentIndex,
|
this.currentIndex,
|
||||||
required this.body,
|
this.body,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
final Widget body;
|
final Widget? body;
|
||||||
final int currentIndex;
|
final int? currentIndex;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
body: body,
|
body: body,
|
||||||
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
||||||
currentIndex: currentIndex,
|
currentIndex: currentIndex ?? 0,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -19,27 +19,34 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
|||||||
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
|
||||||
|
|
||||||
class FrameLayout extends Layout {
|
class FrameLayout extends Layout {
|
||||||
|
|
||||||
const FrameLayout({
|
const FrameLayout({
|
||||||
required this.title,
|
|
||||||
required this.body,
|
required this.body,
|
||||||
required this.currentIndex,
|
this.title,
|
||||||
|
this.leading,
|
||||||
|
this.actions,
|
||||||
|
this.currentIndex,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
final String title;
|
final String? title;
|
||||||
|
final Widget? leading;
|
||||||
|
final List<Widget>? actions;
|
||||||
final Widget body;
|
final Widget body;
|
||||||
final int currentIndex;
|
final int? currentIndex;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: PreferredSize(
|
appBar: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(60),
|
||||||
child: context.components.appBar?.configure(title: title) ??
|
child: context.components.appBar?.configure(
|
||||||
|
title: title,
|
||||||
|
leading: leading,
|
||||||
|
actions: actions,
|
||||||
|
) ??
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
body: body,
|
body: body,
|
||||||
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
||||||
currentIndex: currentIndex,
|
currentIndex: currentIndex ?? 0,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user