chore: pre-commit ci hook, dart format
This commit is contained in:
+21
-11
@@ -126,10 +126,7 @@ Future<({bool confirmed, bool checked})> showConfirmDialogWithCheckbox(
|
||||
),
|
||||
FocusableButton(
|
||||
onPressed: () => Navigator.pop(dialogContext, true),
|
||||
child: FilledButton(
|
||||
onPressed: () => Navigator.pop(dialogContext, true),
|
||||
child: Text(confirmText),
|
||||
),
|
||||
child: FilledButton(onPressed: () => Navigator.pop(dialogContext, true), child: Text(confirmText)),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -143,8 +140,19 @@ Future<({bool confirmed, bool checked})> showConfirmDialogWithCheckbox(
|
||||
|
||||
/// Shows a delete confirmation dialog.
|
||||
/// Convenience wrapper around [showConfirmDialog] with destructive styling.
|
||||
Future<bool> showDeleteConfirmation(BuildContext context, {required String title, required String message, String? confirmText}) {
|
||||
return showConfirmDialog(context, title: title, message: message, confirmText: confirmText ?? t.common.delete, isDestructive: true);
|
||||
Future<bool> showDeleteConfirmation(
|
||||
BuildContext context, {
|
||||
required String title,
|
||||
required String message,
|
||||
String? confirmText,
|
||||
}) {
|
||||
return showConfirmDialog(
|
||||
context,
|
||||
title: title,
|
||||
message: message,
|
||||
confirmText: confirmText ?? t.common.delete,
|
||||
isDestructive: true,
|
||||
);
|
||||
}
|
||||
|
||||
/// Shows a text input dialog for creating/naming items
|
||||
@@ -240,10 +248,7 @@ class _MultilineTextInputDialogState extends State<_MultilineTextInputDialog> {
|
||||
FocusableButton(
|
||||
focusNode: _saveFocusNode,
|
||||
onPressed: () => Navigator.pop(context, _controller.text),
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context, _controller.text),
|
||||
child: Text(t.common.save),
|
||||
),
|
||||
child: TextButton(onPressed: () => Navigator.pop(context, _controller.text), child: Text(t.common.save)),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -353,7 +358,12 @@ class _OptionPickerDialog<T> extends StatefulWidget {
|
||||
final bool focusFirstItem;
|
||||
final Future<T?> Function(T value)? onBeforeClose;
|
||||
|
||||
const _OptionPickerDialog({required this.title, required this.options, this.focusFirstItem = false, this.onBeforeClose});
|
||||
const _OptionPickerDialog({
|
||||
required this.title,
|
||||
required this.options,
|
||||
this.focusFirstItem = false,
|
||||
this.onBeforeClose,
|
||||
});
|
||||
|
||||
@override
|
||||
State<_OptionPickerDialog<T>> createState() => _OptionPickerDialogState<T>();
|
||||
|
||||
Reference in New Issue
Block a user