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,9 +71,7 @@ class NavigationItem extends StatelessWidget {
),
);
} else {
return Material(
type: MaterialType.transparency,
child: ListTile(
return ListTile(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(48)),
leading: leading,
title: Text(title),
@ -82,7 +80,6 @@ class NavigationItem extends StatelessWidget {
tileColor: selected ? colorScheme.secondaryContainer : null,
textColor: selected ? colorScheme.onSecondaryContainer : null,
iconColor: selected ? colorScheme.onSecondaryContainer : null,
),
);
}
}