refactor(ui_layout): migrate layouts using copywith component method (#116)
This commit is contained in:
@@ -35,7 +35,7 @@ class AppBarLayout extends Layout {
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(60),
|
||||
child: context.components.appBar?.configure(
|
||||
child: context.components.appBar?.copyWith(
|
||||
title: title,
|
||||
leading: leading,
|
||||
actions: actions,
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ class BottomNavigationBarLayout extends Layout {
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
body: body,
|
||||
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
||||
bottomNavigationBar: context.components.bottomNavigationBar?.copyWith(
|
||||
currentIndex: currentIndex ?? 0,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -37,7 +37,7 @@ class FrameLayout extends Layout {
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(60),
|
||||
child: context.components.appBar?.configure(
|
||||
child: context.components.appBar?.copyWith(
|
||||
title: title,
|
||||
leading: leading,
|
||||
actions: actions,
|
||||
@@ -45,7 +45,7 @@ class FrameLayout extends Layout {
|
||||
const SizedBox.shrink(),
|
||||
),
|
||||
body: body,
|
||||
bottomNavigationBar: context.components.bottomNavigationBar?.configure(
|
||||
bottomNavigationBar: context.components.bottomNavigationBar?.copyWith(
|
||||
currentIndex: currentIndex ?? 0,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user