ChannelPreview: Minor refactoring

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-15 19:02:15 +05:30
committed by xsahil03x
parent 769258bb53
commit 6f8dbf7e00
@@ -81,20 +81,9 @@ class ChannelPreview extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
horizontal: 8, horizontal: 8,
), ),
onTap: () { onTap: () => onTap?.call(channel),
if (onTap != null) { onLongPress: () => onLongPress?.call(channel),
onTap!(channel); leading: leading ?? ChannelImage(onTap: onImageTap),
}
},
onLongPress: () {
if (onLongPress != null) {
onLongPress!(channel);
}
},
leading: leading ??
ChannelImage(
onTap: onImageTap,
),
title: Row( title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[