wrap only one widget into Material

This commit is contained in:
Adam Velebil 2023-09-22 11:28:19 +02:00
parent 6be42ba0b3
commit 3d01d7867e
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10
2 changed files with 12 additions and 13 deletions

View File

@ -131,7 +131,9 @@ class AppPage extends StatelessWidget {
const SizedBox(width: 48),
],
),
NavigationContent(key: _navExpandedKey, extended: true),
Material(
type: MaterialType.transparency,
child: NavigationContent(key: _navExpandedKey, extended: true)),
],
),
),

View File

@ -71,18 +71,15 @@ class NavigationItem extends StatelessWidget {
),
);
} else {
return Material(
type: MaterialType.transparency,
child: ListTile(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(48)),
leading: leading,
title: Text(title),
minVerticalPadding: 16,
onTap: onTap,
tileColor: selected ? colorScheme.secondaryContainer : null,
textColor: selected ? colorScheme.onSecondaryContainer : null,
iconColor: selected ? colorScheme.onSecondaryContainer : null,
),
return ListTile(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(48)),
leading: leading,
title: Text(title),
minVerticalPadding: 16,
onTap: onTap,
tileColor: selected ? colorScheme.secondaryContainer : null,
textColor: selected ? colorScheme.onSecondaryContainer : null,
iconColor: selected ? colorScheme.onSecondaryContainer : null,
);
}
}