Updated doc strings
This commit is contained in:
@@ -1,18 +1,20 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:game_tracker/core/custom_theme.dart';
|
import 'package:game_tracker/core/custom_theme.dart';
|
||||||
|
|
||||||
|
class AnimatedDialogButton extends StatefulWidget {
|
||||||
/// 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.
|
||||||
/// components where a visually appealing button is required.
|
|
||||||
///
|
|
||||||
/// Parameters:
|
|
||||||
/// - [onPressed]: Callback function that is triggered when the button is 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.
|
/// - [child]: The child widget to be displayed inside the button, typically a text or icon.
|
||||||
class AnimatedDialogButton extends StatefulWidget {
|
const AnimatedDialogButton({
|
||||||
const AnimatedDialogButton({super.key, required this.onPressed, required this.child});
|
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;
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:game_tracker/core/custom_theme.dart';
|
import 'package:game_tracker/core/custom_theme.dart';
|
||||||
|
|
||||||
/// A custom alert dialog widget that follows the application's design theme.
|
class CustomAlertDialog extends StatelessWidget {
|
||||||
///
|
/// A custom alert dialog widget that provides a os unspecific 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.
|
/// - [title]: The title text displayed at the top of the dialog.
|
||||||
/// - [content]: The main content text displayed in the body 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
|
/// - [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.
|
/// of the dialog. These actions are horizontally spaced around the dialog's width.
|
||||||
class CustomAlertDialog extends StatelessWidget {
|
|
||||||
const CustomAlertDialog({
|
const CustomAlertDialog({
|
||||||
super.key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
@@ -26,8 +22,11 @@ class CustomAlertDialog extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(title, style: const TextStyle(color: CustomTheme.textColor,),),
|
title: Text(title, style: const TextStyle(color: CustomTheme.textColor)),
|
||||||
content: Text(content, style: const TextStyle(color: CustomTheme.textColor),),
|
content: Text(
|
||||||
|
content,
|
||||||
|
style: const TextStyle(color: CustomTheme.textColor),
|
||||||
|
),
|
||||||
actions: actions,
|
actions: actions,
|
||||||
backgroundColor: CustomTheme.boxColor,
|
backgroundColor: CustomTheme.boxColor,
|
||||||
actionsAlignment: MainAxisAlignment.spaceAround,
|
actionsAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: game_tracker
|
name: game_tracker
|
||||||
description: "Game Tracking App for Card Games"
|
description: "Game Tracking App for Card Games"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.0.6+209
|
version: 0.0.7+211
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.8.1
|
sdk: ^3.8.1
|
||||||
|
|||||||
Reference in New Issue
Block a user