refactor: enhance documentation and fix punctuation in localization strings
This commit is contained in:
@@ -79,7 +79,7 @@
|
|||||||
"stats": "Statistiken",
|
"stats": "Statistiken",
|
||||||
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
||||||
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
||||||
"this_cannot_be_undone": "Dies kann nicht rückgängig gemacht werden",
|
"this_cannot_be_undone": "Dies kann nicht rückgängig gemacht werden.",
|
||||||
"today_at": "Heute um",
|
"today_at": "Heute um",
|
||||||
"undo": "Rückgängig",
|
"undo": "Rückgängig",
|
||||||
"unknown_exception": "Unbekannter Fehler (siehe Konsole)",
|
"unknown_exception": "Unbekannter Fehler (siehe Konsole)",
|
||||||
|
|||||||
@@ -356,7 +356,7 @@
|
|||||||
"stats": "Stats",
|
"stats": "Stats",
|
||||||
"successfully_added_player": "Successfully added player {playerName}",
|
"successfully_added_player": "Successfully added player {playerName}",
|
||||||
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
||||||
"this_cannot_be_undone": "This can't be undone",
|
"this_cannot_be_undone": "This can't be undone.",
|
||||||
"today_at": "Today at",
|
"today_at": "Today at",
|
||||||
"undo": "Undo",
|
"undo": "Undo",
|
||||||
"unknown_exception": "Unknown Exception (see console)",
|
"unknown_exception": "Unknown Exception (see console)",
|
||||||
|
|||||||
@@ -575,7 +575,7 @@ abstract class AppLocalizations {
|
|||||||
/// Warning message for irreversible actions
|
/// Warning message for irreversible actions
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'This can\'t be undone'**
|
/// **'This can\'t be undone.'**
|
||||||
String get this_cannot_be_undone;
|
String get this_cannot_be_undone;
|
||||||
|
|
||||||
/// Date format for today
|
/// Date format for today
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get this_cannot_be_undone =>
|
String get this_cannot_be_undone =>
|
||||||
'Dies kann nicht rückgängig gemacht werden';
|
'Dies kann nicht rückgängig gemacht werden.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get today_at => 'Heute um';
|
String get today_at => 'Heute um';
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
'There is no group matching your search';
|
'There is no group matching your search';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get this_cannot_be_undone => 'This can\'t be undone';
|
String get this_cannot_be_undone => 'This can\'t be undone.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get today_at => 'Today at';
|
String get today_at => 'Today at';
|
||||||
|
|||||||
@@ -4,18 +4,18 @@ import 'package:game_tracker/core/custom_theme.dart';
|
|||||||
/// A custom animated button widget that provides a scaling and opacity effect
|
/// A custom animated button widget that provides a scaling and opacity effect
|
||||||
/// when pressed. This widget is designed to be used in dialogs or other UI
|
/// when pressed. This widget is designed to be used in dialogs or other UI
|
||||||
/// components where a visually appealing button is required.
|
/// components where a visually appealing button is required.
|
||||||
|
///
|
||||||
|
/// Parameters:
|
||||||
|
/// - [onPressed]: Callback function that is triggered when the button is pressed.
|
||||||
|
/// - [child]: The child widget to be displayed inside the button, typically a text or icon.
|
||||||
class AnimatedDialogButton extends StatefulWidget {
|
class AnimatedDialogButton extends StatefulWidget {
|
||||||
|
const AnimatedDialogButton({super.key, required this.onPressed, required this.child});
|
||||||
|
|
||||||
/// Callback function that is triggered when the button is pressed.
|
/// Callback function that is triggered when the button is pressed.
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
/// The child widget to be displayed inside the button, typically a text or icon.
|
/// The child widget to be displayed inside the button, typically a text or icon.
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
/// Creates an instance of `AnimatedDialogButton`.
|
|
||||||
///
|
|
||||||
/// The [onPressed] and [child] parameters are required.
|
|
||||||
const AnimatedDialogButton({super.key, required this.onPressed, required this.child});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AnimatedDialogButton> createState() => _AnimatedDialogButtonState();
|
State<AnimatedDialogButton> createState() => _AnimatedDialogButtonState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,17 +5,13 @@ import 'package:game_tracker/core/custom_theme.dart';
|
|||||||
///
|
///
|
||||||
/// This widget provides a styled alternative to the default Flutter AlertDialog,
|
/// This widget provides a styled alternative to the default Flutter AlertDialog,
|
||||||
/// with consistent colors, borders, and layout that match the app's custom theme.
|
/// with consistent colors, borders, and layout that match the app's custom theme.
|
||||||
|
///
|
||||||
|
/// Parameters:
|
||||||
|
/// - [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.
|
||||||
class CustomAlertDialog extends StatelessWidget {
|
class CustomAlertDialog extends StatelessWidget {
|
||||||
/// The title text displayed at the top of the dialog.
|
|
||||||
final String title;
|
|
||||||
|
|
||||||
/// The main content text displayed in the body of the dialog.
|
|
||||||
final String content;
|
|
||||||
|
|
||||||
/// A list of action widgets (typically buttons) displayed at the bottom of the dialog.
|
|
||||||
/// These actions are horizontally spaced around the dialog's width.
|
|
||||||
final List<Widget> actions;
|
|
||||||
|
|
||||||
const CustomAlertDialog({
|
const CustomAlertDialog({
|
||||||
super.key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
@@ -23,6 +19,10 @@ class CustomAlertDialog extends StatelessWidget {
|
|||||||
required this.actions,
|
required this.actions,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
final String title;
|
||||||
|
final String content;
|
||||||
|
final List<Widget> actions;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
|
|||||||
Reference in New Issue
Block a user