import 'package:flutter/material.dart'; import '../../core/l10n/l10n.dart'; import '../../core/theme/design_tokens.dart'; import 'app_button.dart'; Future showDestructiveActionSheet( BuildContext context, { required String title, required String message, required String confirmText, }) async { final result = await showModalBottomSheet( context: context, isScrollControlled: true, backgroundColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0), builder: (sheetContext) { final colorScheme = Theme.of(sheetContext).colorScheme; return SafeArea( top: false, child: Container( margin: const EdgeInsets.fromLTRB( AppSpacing.md, AppSpacing.none, AppSpacing.md, AppSpacing.md, ), padding: const EdgeInsets.all(AppSpacing.lg), decoration: BoxDecoration( color: colorScheme.surface, borderRadius: BorderRadius.circular(AppRadius.xl), border: Border.all(color: colorScheme.outlineVariant), ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text( title, textAlign: TextAlign.center, style: TextStyle( fontSize: 18, fontWeight: FontWeight.w700, color: colorScheme.onSurface, ), ), const SizedBox(height: AppSpacing.xs), Text( message, textAlign: TextAlign.center, style: TextStyle( fontSize: 14, color: colorScheme.onSurfaceVariant, ), ), const SizedBox(height: AppSpacing.lg), SizedBox( height: 52, child: GestureDetector( onTap: () => Navigator.of(sheetContext).pop(true), child: Container( alignment: Alignment.center, decoration: BoxDecoration( color: colorScheme.error, borderRadius: BorderRadius.circular(AppRadius.full), ), child: Text( confirmText, style: TextStyle( fontSize: 15, fontWeight: FontWeight.w700, color: colorScheme.onError, ), ), ), ), ), const SizedBox(height: AppSpacing.sm), SizedBox( height: 52, child: AppButton( text: context.l10n.commonCancel, isOutlined: true, onPressed: () => Navigator.of(sheetContext).pop(false), ), ), ], ), ), ); }, ); return result == true; }