Files
game-tracker/lib/presentation/widgets/dialog/custom_alert_dialog.dart
Felix Kirchner 9b208f4780
All checks were successful
Push Pipeline / update_version (push) Successful in 6s
Push Pipeline / generate_licenses (push) Successful in 38s
Push Pipeline / generate_localizations (push) Successful in 29s
Push Pipeline / test (push) Successful in 1m35s
Push Pipeline / sort_arb_files (push) Successful in 31s
Push Pipeline / format (push) Successful in 55s
Push Pipeline / build (push) Successful in 4m58s
Revert "Merge branch 'feature/193-statisticsview-rework' into development"
This reverts commit 24f49e17b9, reversing
changes made to dba6c218d6.

# Conflicts:
#	pubspec.yaml
2026-05-25 14:55:19 +02:00

44 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:tallee/core/custom_theme.dart';
import 'package:tallee/presentation/widgets/dialog/custom_dialog_action.dart';
class CustomAlertDialog extends StatelessWidget {
/// A custom alert dialog widget that provides a os unspecific AlertDialog,
/// with consistent colors, borders, and layout that match the app's custom theme.
/// - [title]: The title text displayed at the top of the dialog.
/// - [content]: The main content text displayed in the body of the dialog.
/// - [actions]: A list of action widgets (typically buttons) displayed at the bottom
/// of the dialog. These actions are horizontally spaced around the dialog's width.
const CustomAlertDialog({
super.key,
required this.title,
required this.content,
required this.actions,
});
final String title;
final Widget content;
final List<CustomDialogAction> actions;
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text(
title,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: CustomTheme.textColor,
),
),
content: content,
actions: actions,
backgroundColor: CustomTheme.boxColor,
actionsAlignment: MainAxisAlignment.center,
shape: RoundedRectangleBorder(
borderRadius: CustomTheme.standardBorderRadiusAll,
side: const BorderSide(color: CustomTheme.boxBorderColor),
),
);
}
}