Adjusted constant name

This commit is contained in:
2026-01-16 21:41:42 +01:00
parent 1b709707b5
commit b7930d5e2e
6 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ class Constants {
Constants._(); // Private constructor to prevent instantiation
/// Minimum duration of all app skeletons
static const Duration minimumSkeletonDuration = Duration(milliseconds: 250);
static const Duration MINIMUM_SKELETON_DURATION = Duration(milliseconds: 250);
/// Maximum length for player names
static const int MAX_PLAYER_NAME_LENGTH = 32;

View File

@@ -107,7 +107,7 @@ class _GroupsViewState extends State<GroupsView> {
void loadGroups() {
Future.wait([
db.groupDao.getAllGroups(),
Future.delayed(Constants.minimumSkeletonDuration),
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
]).then((results) {
loadedGroups = results[0] as List<Group>;
setState(() {

View File

@@ -195,7 +195,7 @@ class _HomeViewState extends State<HomeView> {
db.matchDao.getMatchCount(),
db.groupDao.getGroupCount(),
db.matchDao.getAllMatches(),
Future.delayed(Constants.minimumSkeletonDuration),
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
]).then((results) {
matchCount = results[0] as int;
groupCount = results[1] as int;

View File

@@ -130,7 +130,7 @@ class _MatchViewState extends State<MatchView> {
void loadGames() {
Future.wait([
db.matchDao.getAllMatches(),
Future.delayed(Constants.minimumSkeletonDuration),
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
]).then((results) {
if (mounted) {
setState(() {

View File

@@ -106,7 +106,7 @@ class _StatisticsViewState extends State<StatisticsView> {
Future.wait([
db.matchDao.getAllMatches(),
db.playerDao.getAllPlayers(),
Future.delayed(Constants.minimumSkeletonDuration),
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
]).then((results) async {
if (!mounted) return;
final matches = results[0] as List<Match>;

View File

@@ -219,7 +219,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
void loadPlayerList() {
_allPlayersFuture = Future.wait([
db.playerDao.getAllPlayers(),
Future.delayed(Constants.minimumSkeletonDuration),
Future.delayed(Constants.MINIMUM_SKELETON_DURATION),
]).then((results) => results[0] as List<Player>);
if (mounted) {
_allPlayersFuture.then((loadedPlayers) {