refactor(ui_layouts): Refactored block using the UI components package, introducing breaking changes
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user