import 'package:flutter/material.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: Colors.transparent, builder: (sheetContext) { 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: AppColors.white, borderRadius: BorderRadius.circular(AppRadius.xl), border: Border.all(color: AppColors.borderSecondary), ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text( title, textAlign: TextAlign.center, style: const TextStyle( fontSize: 18, fontWeight: FontWeight.w700, color: AppColors.slate900, ), ), const SizedBox(height: AppSpacing.xs), Text( message, textAlign: TextAlign.center, style: const TextStyle(fontSize: 14, color: AppColors.slate500), ), const SizedBox(height: AppSpacing.lg), SizedBox( height: 52, child: GestureDetector( onTap: () => Navigator.of(sheetContext).pop(true), child: Container( alignment: Alignment.center, decoration: BoxDecoration( color: AppColors.feedbackErrorIcon, borderRadius: BorderRadius.circular(AppRadius.full), ), child: Text( confirmText, style: const TextStyle( fontSize: 15, fontWeight: FontWeight.w700, color: AppColors.white, ), ), ), ), ), const SizedBox(height: AppSpacing.sm), SizedBox( height: 52, child: AppButton( text: '取消', isOutlined: true, onPressed: () => Navigator.of(sheetContext).pop(false), ), ), ], ), ), ); }, ); return result == true; }