refactor(ui_layouts): Refactored block using the UI components package, introducing breaking changes

This commit is contained in:
2023-08-28 14:47:15 +02:00
parent 8be4efbb52
commit 791a6d0f83
24 changed files with 477 additions and 62 deletions
@@ -6,12 +6,15 @@ class AppBarLayoutPage extends StatelessWidget {
const AppBarLayoutPage({super.key});
@override
Widget build(BuildContext context) => TopAppBarLayout(
custom: (topBar) =>
topBar?.copyWith.title(const TextWrapper('New Title')),
body: const Center(
child: Text(
'Body',
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraint) => StructuralLayout.withTopAppBar(
barId: constraint.maxWidth < 600 ? 'mobile' : 'desktop',
custom: (topBar) =>
topBar?.copyWith.title(const TextWrapper('New Title')),
body: const Center(
child: Text(
'Body',
),
),
),
);
@@ -5,7 +5,7 @@ class BottomNavigationBarLayoutPage1 extends StatelessWidget {
const BottomNavigationBarLayoutPage1({super.key});
@override
Widget build(BuildContext context) => BottomNavigationBarLayout(
Widget build(BuildContext context) => StructuralLayout.withBottomNavBar(
custom: (p0) => p0?.copyWith.call(currentIndex: 0),
body: const TopAppBarLayout(
body: Center(
@@ -5,7 +5,7 @@ class BottomNavigationBarLayoutPage2 extends StatelessWidget {
const BottomNavigationBarLayoutPage2({super.key});
@override
Widget build(BuildContext context) => BottomNavigationBarLayout(
Widget build(BuildContext context) => StructuralLayout.withBottomNavBar(
custom: (p0) => p0?.copyWith.currentIndex(1),
body: const TopAppBarLayout(
body: Center(