fix(home): Оптимизация работы навигационного бара
This commit is contained in:
@@ -21,31 +21,24 @@ class HomeScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
logger.logBuild('build home screen');
|
||||
|
||||
return SafeArea(
|
||||
top: false,
|
||||
child: AutoTabsScaffold(
|
||||
routes: <PageRouteInfo>[
|
||||
SettingsRoute(),
|
||||
StatistickRoute(),
|
||||
CreateRoute(),
|
||||
CollectionRoute(),
|
||||
],
|
||||
bottomNavigationBuilder: (_, TabsRouter tabsRouter) {
|
||||
return ColoredBox(
|
||||
color: AppColors.bg,
|
||||
child: SizedBox(
|
||||
height: 73.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: <Widget>[
|
||||
_buildBackgroundBar(tabsRouter),
|
||||
_buildCentralButton(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
return Stack(
|
||||
children: [
|
||||
SafeArea(
|
||||
top: false,
|
||||
child: AutoTabsScaffold(
|
||||
routes: <PageRouteInfo>[
|
||||
SettingsRoute(),
|
||||
StatistickRoute(),
|
||||
CreateRoute(),
|
||||
CollectionRoute(),
|
||||
],
|
||||
bottomNavigationBuilder: (_, TabsRouter tabsRouter) {
|
||||
return _buildBackgroundBar(tabsRouter);
|
||||
},
|
||||
),
|
||||
),
|
||||
_buildCentralButton(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -89,7 +82,7 @@ class HomeScreen extends StatelessWidget {
|
||||
/// Построение центральной кнопки
|
||||
Widget _buildCentralButton() {
|
||||
return Align(
|
||||
alignment: Alignment.topCenter,
|
||||
alignment: Alignment(0, 0.91),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// Логика нажатия на центральную кнопку
|
||||
|
||||
Reference in New Issue
Block a user