delete like from liked screens
This commit is contained in:
@@ -87,7 +87,7 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.0.h()),
|
||||
child: Dismissible(
|
||||
key: ValueKey(item.id ?? index),
|
||||
key: ValueKey(item.tenderId ?? index),
|
||||
direction: DismissDirection.endToStart,
|
||||
background: Container(
|
||||
alignment: Alignment.centerRight,
|
||||
@@ -99,8 +99,10 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
||||
),
|
||||
),
|
||||
onDismissed: (_) {
|
||||
if (item.id != null) {
|
||||
viewModel.removeTenderById(item.id!);
|
||||
if (item.tenderId != null) {
|
||||
viewModel.removeTenderById(
|
||||
item.tenderId!,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: LikedListItem(tender: item.tender!),
|
||||
|
||||
@@ -94,7 +94,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(bottom: 20.0.h()),
|
||||
child: Dismissible(
|
||||
key: ValueKey(item.id ?? index),
|
||||
key: ValueKey(item.tenderId ?? index),
|
||||
direction: DismissDirection.endToStart,
|
||||
background: Container(
|
||||
alignment: Alignment.centerRight,
|
||||
@@ -106,8 +106,10 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
||||
),
|
||||
),
|
||||
onDismissed: (_) {
|
||||
if (item.id != null) {
|
||||
viewModel.removeTenderById(item.id!);
|
||||
if (item.tenderId != null) {
|
||||
viewModel.removeTenderById(
|
||||
item.tenderId!,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: LikedListItem(tender: item.tender!),
|
||||
|
||||
Reference in New Issue
Block a user