Refactoring

This commit is contained in:
Ming Ming 2021-07-05 17:53:12 +08:00
parent 500ec4ab43
commit d729834185

View file

@ -325,10 +325,6 @@ class _SelectableItemWidget extends StatelessWidget {
Positioned.fill( Positioned.fill(
child: Container( child: Container(
color: AppTheme.getSelectionOverlayColor(context), color: AppTheme.getSelectionOverlayColor(context),
),
),
if (isSelected)
Positioned.fill(
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Icon( child: Icon(
@ -338,6 +334,8 @@ class _SelectableItemWidget extends StatelessWidget {
), ),
), ),
), ),
),
if (onTap != null || onLongPress != null)
Positioned.fill( Positioned.fill(
child: Material( child: Material(
type: MaterialType.transparency, type: MaterialType.transparency,
@ -346,7 +344,7 @@ class _SelectableItemWidget extends StatelessWidget {
onLongPress: onLongPress, onLongPress: onLongPress,
), ),
), ),
) ),
], ],
); );
} }