Refactored components

This commit is contained in:
2026-01-07 14:05:19 +01:00
parent 6e45e9435b
commit 21c74b74bc
20 changed files with 429 additions and 159 deletions

View File

@@ -4,6 +4,13 @@ import 'package:flutter/material.dart';
import 'package:game_tracker/l10n/generated/app_localizations.dart';
import 'package:game_tracker/presentation/widgets/tiles/info_tile.dart';
/// A tile widget that displays statistical data using horizontal bars.
/// - [icon]: The icon displayed next to the title.
/// - [title]: The title text displayed on the tile.
/// - [width]: The width of the tile.
/// - [values]: A list of tuples containing labels and their corresponding numeric values.
/// - [itemCount]: The maximum number of items to display.
/// - [barColor]: The color of the bars representing the values.
class StatisticsTile extends StatelessWidget {
const StatisticsTile({
super.key,
@@ -15,11 +22,22 @@ class StatisticsTile extends StatelessWidget {
required this.barColor,
});
/// The icon displayed next to the title.
final IconData icon;
/// The title text displayed on the tile.
final String title;
/// The width of the tile.
final double width;
/// A list of tuples containing labels and their corresponding numeric values.
final List<(String, num)> values;
/// The maximum number of items to display.
final int itemCount;
/// The color of the bars representing the values.
final Color barColor;
@override