Files
SpotiFLAC-Mobile/lib/widgets/discard_changes_dialog.dart
T
zarzet 77ea16dc23 refactor(settings): share confirm dialog, choice sheet and section helpers
Two-button confirmations, single-choice settings sheets and header plus
group slivers were hand-written at every call site. showAppConfirmDialog,
showAppChoiceSheet and settingsSectionSlivers build the same trees, and
SettingsGroup's four inset wrappers become one.
2026-10-23 22:45:10 +07:00

18 lines
557 B
Dart

import 'package:flutter/material.dart';
import 'package:mornye/widgets/app_alert_dialog.dart';
import 'package:mornye/l10n/l10n.dart';
/// Shared discard-unsaved-changes confirmation dialog used by priority /
/// selection settings pages.
Future<bool> showDiscardChangesDialog(
BuildContext context, {
String? content,
}) => showAppConfirmDialog(
context,
title: context.l10n.dialogDiscardChanges,
message: content ?? context.l10n.dialogUnsavedChanges,
confirmLabel: context.l10n.dialogDiscard,
cancelIsDefault: true,
destructive: true,
);