Merge remote-tracking branch 'refs/remotes/origin/development' into feature/120-bearbeiten-und-loeschen-von-matches
# Conflicts: # lib/presentation/views/main_menu/custom_navigation_bar.dart # lib/presentation/views/main_menu/group_view/create_group_view.dart # lib/presentation/views/main_menu/group_view/group_detail_view.dart # lib/presentation/views/main_menu/group_view/group_view.dart # lib/presentation/views/main_menu/match_view/create_match/create_match_view.dart # lib/presentation/views/main_menu/match_view/match_view.dart # pubspec.yaml
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class AnimatedDialogButton extends StatefulWidget {
|
||||
/// A custom animated button widget that provides a scaling and opacity effect
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/core/enums.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/core/enums.dart';
|
||||
|
||||
class CustomWidthButton extends StatelessWidget {
|
||||
/// A custom button widget that is designed to have a width relative to the screen size.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class QuickCreateButton extends StatefulWidget {
|
||||
/// A button widget designed for quick creating matches in the [HomeView]
|
||||
@@ -28,14 +28,18 @@ class _QuickCreateButtonState extends State<QuickCreateButton> {
|
||||
onPressed: widget.onPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(140, 45),
|
||||
backgroundColor: CustomTheme.primaryColor,
|
||||
backgroundColor: CustomTheme.primaryColor.withAlpha(200).withBlue(40),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: CustomTheme.standardBorderRadiusAll,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
widget.text,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
|
||||
style: const TextStyle(
|
||||
color: CustomTheme.textColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class ColoredIconContainer extends StatelessWidget {
|
||||
/// A customizable container widget that displays an icon with a colored background.
|
||||
@@ -48,7 +48,7 @@ class ColoredIconContainer extends StatelessWidget {
|
||||
child: Icon(
|
||||
icon,
|
||||
size: iconSize,
|
||||
color: CustomTheme.primaryColor.withGreen(40),
|
||||
color: CustomTheme.primaryColor.withBlue(40),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class CustomAlertDialog extends StatelessWidget {
|
||||
/// A custom alert dialog widget that provides a os unspecific AlertDialog,
|
||||
@@ -32,7 +32,7 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
actionsAlignment: MainAxisAlignment.spaceAround,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: CustomTheme.standardBorderRadiusAll,
|
||||
side: BorderSide(color: CustomTheme.boxBorder),
|
||||
side: const BorderSide(color: CustomTheme.boxBorderColor),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class NavbarItem extends StatefulWidget {
|
||||
/// A navigation bar item widget that represents a single tab in a navigation bar.
|
||||
@@ -87,19 +87,29 @@ class _NavbarItemState extends State<NavbarItem>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ScaleTransition(
|
||||
scale: widget.isSelected
|
||||
? _scaleAnimation
|
||||
: const AlwaysStoppedAnimation(1.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
AnimatedContainer(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.isSelected
|
||||
? CustomTheme.navBarItemSelectedColor
|
||||
: CustomTheme.navBarItemUnselectedColor,
|
||||
size: 32,
|
||||
? CustomTheme.primaryColor.withAlpha(50)
|
||||
: Colors.transparent,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: ScaleTransition(
|
||||
scale: widget.isSelected
|
||||
? _scaleAnimation
|
||||
: const AlwaysStoppedAnimation(1.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
color: widget.isSelected
|
||||
? CustomTheme.navBarItemSelectedColor
|
||||
: CustomTheme.navBarItemUnselectedColor,
|
||||
size: 32,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
widget.label,
|
||||
style: TextStyle(
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/constants.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/data/db/database.dart';
|
||||
import 'package:game_tracker/data/dto/player.dart';
|
||||
import 'package:game_tracker/l10n/generated/app_localizations.dart';
|
||||
import 'package:game_tracker/presentation/widgets/app_skeleton.dart';
|
||||
import 'package:game_tracker/presentation/widgets/text_input/custom_search_bar.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/text_icon_list_tile.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
import 'package:game_tracker/presentation/widgets/top_centered_message.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tallee/core/constants.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/data/db/database.dart';
|
||||
import 'package:tallee/data/dto/player.dart';
|
||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||
import 'package:tallee/presentation/widgets/app_skeleton.dart';
|
||||
import 'package:tallee/presentation/widgets/text_input/custom_search_bar.dart';
|
||||
import 'package:tallee/presentation/widgets/tiles/text_icon_list_tile.dart';
|
||||
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
import 'package:tallee/presentation/widgets/top_centered_message.dart';
|
||||
|
||||
class PlayerSelection extends StatefulWidget {
|
||||
/// A widget that allows users to select players from a list,
|
||||
@@ -85,6 +85,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomSearchBar(
|
||||
maxLength: Constants.MAX_PLAYER_NAME_LENGTH,
|
||||
controller: _searchBarController,
|
||||
constraints: const BoxConstraints(maxHeight: 45, minHeight: 45),
|
||||
hintText: loc.search_for_players,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/constants.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class CustomSearchBar extends StatelessWidget {
|
||||
/// A custom search bar widget that encapsulates a [SearchBar] with additional customization options.
|
||||
@@ -22,6 +21,7 @@ class CustomSearchBar extends StatelessWidget {
|
||||
this.onTrailingButtonPressed,
|
||||
this.onChanged,
|
||||
this.constraints,
|
||||
this.maxLength,
|
||||
});
|
||||
|
||||
/// The controller for the search bar's text input.
|
||||
@@ -48,15 +48,19 @@ class CustomSearchBar extends StatelessWidget {
|
||||
/// The constraints for the search bar.
|
||||
final BoxConstraints? constraints;
|
||||
|
||||
/// Optional parameter for maximum length of the input text.
|
||||
final int? maxLength;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
/// Enforce maximum length on the input text
|
||||
const maxLength = Constants.MAX_PLAYER_NAME_LENGTH;
|
||||
if (controller.text.length > maxLength) {
|
||||
controller.text = controller.text.substring(0, maxLength);
|
||||
controller.selection = TextSelection.fromPosition(
|
||||
TextPosition(offset: controller.text.length),
|
||||
);
|
||||
if (maxLength != null) {
|
||||
if (controller.text.length > maxLength!) {
|
||||
controller.text = controller.text.substring(0, maxLength);
|
||||
controller.selection = TextSelection.fromPosition(
|
||||
TextPosition(offset: controller.text.length),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return SearchBar(
|
||||
@@ -83,7 +87,9 @@ class CustomSearchBar extends StatelessWidget {
|
||||
const SizedBox(width: 5),
|
||||
],
|
||||
backgroundColor: WidgetStateProperty.all(CustomTheme.boxColor),
|
||||
side: WidgetStateProperty.all(BorderSide(color: CustomTheme.boxBorder)),
|
||||
side: WidgetStateProperty.all(
|
||||
const BorderSide(color: CustomTheme.boxBorderColor),
|
||||
),
|
||||
shape: WidgetStateProperty.all(
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class TextInputField extends StatelessWidget {
|
||||
/// A custom text input field widget that encapsulates a [TextField] with specific styling.
|
||||
@@ -33,18 +34,21 @@ class TextInputField extends StatelessWidget {
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
maxLength: maxLength,
|
||||
maxLengthEnforcement: MaxLengthEnforcement.truncateAfterCompositionEnds,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: CustomTheme.boxColor,
|
||||
hintText: hintText,
|
||||
hintStyle: const TextStyle(fontSize: 18),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
borderSide: BorderSide(color: CustomTheme.boxBorder),
|
||||
// Hides the character counter
|
||||
counterText: '',
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
borderSide: BorderSide(color: CustomTheme.boxBorderColor),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
borderSide: BorderSide(color: CustomTheme.boxBorder),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
borderSide: BorderSide(color: CustomTheme.boxBorderColor),
|
||||
),
|
||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||
),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class ChooseTile extends StatefulWidget {
|
||||
/// A tile widget that allows users to choose an option by tapping on it.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class CustomRadioListTile<T> extends StatelessWidget {
|
||||
/// A custom radio list tile widget that encapsulates a [Radio] button with additional styling and functionality.
|
||||
@@ -31,7 +31,7 @@ class CustomRadioListTile<T> extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: CustomTheme.boxColor,
|
||||
border: Border.all(color: CustomTheme.boxBorder),
|
||||
border: Border.all(color: CustomTheme.boxBorderColor),
|
||||
borderRadius: CustomTheme.standardBorderRadiusAll,
|
||||
),
|
||||
child: Row(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/data/dto/group.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/data/dto/group.dart';
|
||||
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
|
||||
class GroupTile extends StatefulWidget {
|
||||
/// A tile widget that displays information about a group, including its name and members.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class InfoTile extends StatefulWidget {
|
||||
/// A tile widget that displays a title with an icon and some content below it.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/presentation/views/main_menu/settings_view/licenses/license_detail_view.dart';
|
||||
import 'package:game_tracker/presentation/views/main_menu/settings_view/licenses/oss_licenses.dart';
|
||||
import 'package:game_tracker/presentation/widgets/colored_icon_container.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/presentation/views/main_menu/settings_view/licenses/license_detail_view.dart';
|
||||
import 'package:tallee/presentation/views/main_menu/settings_view/licenses/oss_licenses.dart';
|
||||
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
||||
|
||||
class LicenseTile extends StatelessWidget {
|
||||
/// A tile widget that displays information about a software package license.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/data/dto/match.dart';
|
||||
import 'package:game_tracker/data/dto/player.dart';
|
||||
import 'package:game_tracker/l10n/generated/app_localizations.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/data/dto/match.dart';
|
||||
import 'package:tallee/data/dto/player.dart';
|
||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||
import 'package:tallee/presentation/widgets/tiles/text_icon_tile.dart';
|
||||
|
||||
class MatchTile extends StatefulWidget {
|
||||
/// A tile widget that displays information about a match, including its name,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class QuickInfoTile extends StatefulWidget {
|
||||
/// A tile widget that displays a title with an icon and a numeric value below it.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:game_tracker/presentation/widgets/colored_icon_container.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
import 'package:tallee/presentation/widgets/colored_icon_container.dart';
|
||||
|
||||
class SettingsListTile extends StatelessWidget {
|
||||
/// A customizable settings list tile widget that displays an icon, title, and an optional suffix widget.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/l10n/generated/app_localizations.dart';
|
||||
import 'package:game_tracker/presentation/widgets/tiles/info_tile.dart';
|
||||
import 'package:tallee/l10n/generated/app_localizations.dart';
|
||||
import 'package:tallee/presentation/widgets/tiles/info_tile.dart';
|
||||
|
||||
class StatisticsTile extends StatelessWidget {
|
||||
/// A tile widget that displays statistical data using horizontal bars.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class TextIconListTile extends StatelessWidget {
|
||||
/// A list tile widget that displays text with an optional icon button.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class TextIconTile extends StatelessWidget {
|
||||
/// A tile widget that displays text with an optional icon that can be tapped.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:game_tracker/core/custom_theme.dart';
|
||||
import 'package:tallee/core/custom_theme.dart';
|
||||
|
||||
class TitleDescriptionListTile extends StatelessWidget {
|
||||
/// A list tile widget that displays a title and description, with optional highlighting and badge.
|
||||
|
||||
Reference in New Issue
Block a user