Skip to content

Commit

Permalink
fixes delete issue(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
anima-regem committed Dec 15, 2024
1 parent 3defd5f commit bda5a9d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:hugeicons/hugeicons.dart';
import 'package:share_plus/share_plus.dart';
Expand Down Expand Up @@ -585,16 +584,18 @@ class _HomeScreenState extends State<HomeScreen> {
child: const Text('Cancel'),
),
ElevatedButton(
onPressed: () => Navigator.of(context).pop(true),
onPressed: () {
Navigator.of(context).pop(true);
_dbService.deleteLink(link.id);
},
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
child: const Text('Delete'),
),
],
),
),
onDismissed: (_) => _dbService.deleteLink(link.id),
child:
ListTile(
child: ListTile(
// contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
leading: Container(
width: 72,
Expand Down Expand Up @@ -652,7 +653,10 @@ class _HomeScreenState extends State<HomeScreen> {
SizedBox(
width: 20,
child: IconButton(
icon: const Icon(HugeIcons.strokeRoundedShare01, size: 18,),
icon: const Icon(
HugeIcons.strokeRoundedShare01,
size: 18,
),
onPressed: () => _shareLinkAndMetadata(context, link),
),
),
Expand Down

0 comments on commit bda5a9d

Please sign in to comment.