From cef313b3566fef8bd79ee97c82c2a3de0ae28997 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 25 Jun 2025 23:03:55 +0800 Subject: [PATCH] :wastebasket: Clean up code --- lib/widgets/share/share_sheet.dart | 65 ------------------------------ 1 file changed, 65 deletions(-) diff --git a/lib/widgets/share/share_sheet.dart b/lib/widgets/share/share_sheet.dart index 78262e8..d6c8941 100644 --- a/lib/widgets/share/share_sheet.dart +++ b/lib/widgets/share/share_sheet.dart @@ -133,14 +133,6 @@ class _ShareSheetState extends ConsumerState { super.dispose(); } - void _handleClose() { - if (widget.onClose != null) { - widget.onClose!(); - } else { - Navigator.of(context).pop(); - } - } - Future _shareToPost() async { setState(() => _isLoading = true); try { @@ -813,63 +805,6 @@ class _CompactShareOption extends StatelessWidget { } } -class _ShareOption extends StatelessWidget { - final IconData icon; - final String title; - final String subtitle; - final VoidCallback? onTap; - - const _ShareOption({ - required this.icon, - required this.title, - required this.subtitle, - this.onTap, - }); - - @override - Widget build(BuildContext context) { - return Card( - margin: EdgeInsets.zero, - child: ListTile( - leading: Icon( - icon, - color: - onTap != null - ? Theme.of(context).colorScheme.primary - : Theme.of( - context, - ).colorScheme.onSurfaceVariant.withOpacity(0.5), - ), - title: Text( - title, - style: TextStyle( - color: - onTap != null - ? null - : Theme.of( - context, - ).colorScheme.onSurfaceVariant.withOpacity(0.5), - ), - ), - subtitle: Text( - subtitle, - style: TextStyle( - color: - onTap != null - ? Theme.of(context).colorScheme.onSurfaceVariant - : Theme.of( - context, - ).colorScheme.onSurfaceVariant.withOpacity(0.5), - ), - ), - trailing: onTap != null ? const Icon(Symbols.chevron_right) : null, - onTap: onTap, - enabled: onTap != null, - ), - ); - } -} - class _ContentPreview extends StatelessWidget { final ShareContent content;