This commit is contained in:
1 parent
7509cf2ecd
commit
2f4593a46e
3 files changed
+74
-11
No files matched your search
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
||||
import '../theme/app_colors.dart';
|
||||
import '../theme/app_dimens.dart';
|
||||
|
||||
const double _maxNavigationTextScale = 1.3;
|
||||
|
||||
/// 底部导航普通目的地。
|
||||
class AppBottomNavItem {
|
||||
const AppBottomNavItem({
|
||||
@@ -41,14 +43,17 @@ class AppBottomNav extends StatelessWidget {
|
||||
key: barKey,
|
||||
height: AppDimens.navHeight,
|
||||
color: AppColors.navBackground,
|
||||
child: Row(
|
||||
children: [
|
||||
for (final item in items)
|
||||
_NavDestination(
|
||||
item: item,
|
||||
unselectedColor: AppColors.navUnselected,
|
||||
),
|
||||
],
|
||||
child: MediaQuery.withClampedTextScaling(
|
||||
maxScaleFactor: _maxNavigationTextScale,
|
||||
child: Row(
|
||||
children: [
|
||||
for (final item in items)
|
||||
_NavDestination(
|
||||
item: item,
|
||||
unselectedColor: AppColors.navUnselected,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
return ColoredBox(
|
||||
|
||||
Reference in new issue
Block a user