From 5350113ee14e71a66ad304fbe16a6ec631a51e36 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Tue, 13 Jan 2026 22:54:19 +0100 Subject: [PATCH] Updated doc strings --- .../buttons/animated_dialog_button.dart | 18 ++++++++------- .../widgets/custom_alert_dialog.dart | 23 +++++++++---------- pubspec.yaml | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/presentation/widgets/buttons/animated_dialog_button.dart b/lib/presentation/widgets/buttons/animated_dialog_button.dart index c0ce560..65c0510 100644 --- a/lib/presentation/widgets/buttons/animated_dialog_button.dart +++ b/lib/presentation/widgets/buttons/animated_dialog_button.dart @@ -1,18 +1,20 @@ import 'package:flutter/material.dart'; import 'package:game_tracker/core/custom_theme.dart'; -/// 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 -/// 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 { - const AnimatedDialogButton({super.key, required this.onPressed, required this.child}); + /// A custom animated button widget that provides a scaling and opacity effect + /// when pressed. + /// - [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. + const AnimatedDialogButton({ + super.key, + required this.onPressed, + required this.child, + }); /// Callback function that is triggered when the button is pressed. final VoidCallback onPressed; + /// The child widget to be displayed inside the button, typically a text or icon. final Widget child; diff --git a/lib/presentation/widgets/custom_alert_dialog.dart b/lib/presentation/widgets/custom_alert_dialog.dart index 832369a..af5b45a 100644 --- a/lib/presentation/widgets/custom_alert_dialog.dart +++ b/lib/presentation/widgets/custom_alert_dialog.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:game_tracker/core/custom_theme.dart'; -/// A custom alert dialog widget that follows the application's design theme. -/// -/// This widget provides a styled alternative to the default Flutter AlertDialog, -/// 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 { + /// 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, @@ -26,8 +22,11 @@ class CustomAlertDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( - title: Text(title, style: const TextStyle(color: CustomTheme.textColor,),), - content: Text(content, style: const TextStyle(color: CustomTheme.textColor),), + title: Text(title, style: const TextStyle(color: CustomTheme.textColor)), + content: Text( + content, + style: const TextStyle(color: CustomTheme.textColor), + ), actions: actions, backgroundColor: CustomTheme.boxColor, actionsAlignment: MainAxisAlignment.spaceAround, diff --git a/pubspec.yaml b/pubspec.yaml index 83d5079..46efd94 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: game_tracker description: "Game Tracking App for Card Games" publish_to: 'none' -version: 0.0.6+209 +version: 0.0.7+211 environment: sdk: ^3.8.1