fix:UI对齐demo
This commit is contained in:
@@ -101,7 +101,7 @@ class _TabShellState extends State<TabShell> {
|
||||
),
|
||||
bottomNavigationBar: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: cs.background,
|
||||
color: Colors.white,
|
||||
border: Border(top: BorderSide(color: cs.border, width: 1)),
|
||||
),
|
||||
child: SafeArea(
|
||||
@@ -155,12 +155,26 @@ class _TabButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cs = ShadTheme.of(context).colorScheme;
|
||||
final color = selected ? cs.foreground : cs.mutedForeground;
|
||||
final color = selected ? cs.primary : cs.mutedForeground;
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (selected)
|
||||
Container(
|
||||
width: 22,
|
||||
height: 2.5,
|
||||
margin: const EdgeInsets.only(bottom: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: cs.primary,
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
bottom: Radius.circular(3),
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
const SizedBox(height: 8.5),
|
||||
Icon(icon, size: 22, color: color),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user