master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
3 changed files with 30 additions and 16 deletions
Showing only changes of commit e667aa06d0 - Show all commits

View File

@ -20,18 +20,26 @@ import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
class AppBarLayout extends Layout {
const AppBarLayout({
required this.title,
required this.body,
this.title,
this.leading,
this.actions,
super.key,
});
final String title;
final String? title;
final Widget? leading;
final List<Widget>? actions;
final Widget body;
@override
Widget build(BuildContext context) => Scaffold(
appBar: PreferredSize(
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(),
),
body: body,

View File

@ -3,19 +3,18 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
class BottomNavigationBarLayout extends Layout {
const BottomNavigationBarLayout({
required this.currentIndex,
required this.body,
this.currentIndex,
this.body,
super.key,
});
final Widget body;
final int currentIndex;
final Widget? body;
final int? currentIndex;
@override
Widget build(BuildContext context) => Scaffold(
body: body,
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
currentIndex: currentIndex,
currentIndex: currentIndex ?? 0,
),
);
}

View File

@ -19,27 +19,34 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
import 'package:wyatt_ui_layout/src/presentation/layouts/layout.dart';
class FrameLayout extends Layout {
const FrameLayout({
required this.title,
required this.body,
required this.currentIndex,
this.title,
this.leading,
this.actions,
this.currentIndex,
super.key,
});
final String title;
final String? title;
final Widget? leading;
final List<Widget>? actions;
final Widget body;
final int currentIndex;
final int? currentIndex;
@override
Widget build(BuildContext context) => Scaffold(
appBar: PreferredSize(
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(),
),
body: body,
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
currentIndex: currentIndex,
currentIndex: currentIndex ?? 0,
),
);
}