diff --git a/lib/features/rooms/presentation/rooms_screen.dart b/lib/features/rooms/presentation/rooms_screen.dart index 0227d2e..ae17d51 100644 --- a/lib/features/rooms/presentation/rooms_screen.dart +++ b/lib/features/rooms/presentation/rooms_screen.dart @@ -123,7 +123,7 @@ class _RoomGridState extends ConsumerState<_RoomGrid> { final l10n = AppLocalizations.of(context); final children = widget.rooms.map((rws) { return RoomCard( - key: ValueKey(rws.room.id), + key: ValueKey('room-${rws.room.id}'), roomWithStats: rws, onEdit: () => context.go('/rooms/${rws.room.id}/edit'), onDelete: () => _showDeleteConfirmation(context, rws, l10n), @@ -134,17 +134,19 @@ class _RoomGridState extends ConsumerState<_RoomGrid> { scrollController: _scrollController, onReorder: (ReorderedListFunction reorderFunc) { final reordered = reorderFunc(children); - final newOrder = reordered - .map((w) => (w.key! as ValueKey).value) - .toList(); + final newOrder = reordered.map((w) { + final keyStr = (w.key! as ValueKey).value; + return int.parse(keyStr.replaceFirst('room-', '')); + }).toList(); ref.read(roomActionsProvider.notifier).reorderRooms(newOrder); }, builder: (reorderableChildren) { + final topPadding = MediaQuery.of(context).padding.top; return GridView.count( key: _gridViewKey, controller: _scrollController, crossAxisCount: 2, - padding: const EdgeInsets.all(12), + padding: EdgeInsets.fromLTRB(12, 12 + topPadding, 12, 12), mainAxisSpacing: 8, crossAxisSpacing: 8, childAspectRatio: 1.0, diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 9b95b9c..b545c84 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -397,25 +397,25 @@ abstract class AppLocalizations { /// No description provided for @templatePickerTitle. /// /// In de, this message translates to: - /// **'Aufgaben aus Vorlagen hinzuf\u00fcgen?'** + /// **'Aufgaben aus Vorlagen hinzufügen?'** String get templatePickerTitle; /// No description provided for @templatePickerSkip. /// /// In de, this message translates to: - /// **'\u00dcberspringen'** + /// **'Überspringen'** String get templatePickerSkip; /// No description provided for @templatePickerAdd. /// /// In de, this message translates to: - /// **'Hinzuf\u00fcgen'** + /// **'Hinzufügen'** String get templatePickerAdd; /// No description provided for @templatePickerSelected. /// /// In de, this message translates to: - /// **'{count} ausgew\u00e4hlt'** + /// **'{count} ausgewählt'** String templatePickerSelected(int count); } diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index a83b62f..4c46ff5 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -166,16 +166,16 @@ class AppLocalizationsDe extends AppLocalizations { String get taskEmptyAction => 'Aufgabe erstellen'; @override - String get templatePickerTitle => 'Aufgaben aus Vorlagen hinzuf\u00fcgen?'; + String get templatePickerTitle => 'Aufgaben aus Vorlagen hinzufügen?'; @override - String get templatePickerSkip => '\u00dcberspringen'; + String get templatePickerSkip => 'Überspringen'; @override - String get templatePickerAdd => 'Hinzuf\u00fcgen'; + String get templatePickerAdd => 'Hinzufügen'; @override String templatePickerSelected(int count) { - return '$count ausgew\u00e4hlt'; + return '$count ausgewählt'; } } diff --git a/test/shell/app_shell_test.dart b/test/shell/app_shell_test.dart index 85be13a..1c92592 100644 --- a/test/shell/app_shell_test.dart +++ b/test/shell/app_shell_test.dart @@ -1,4 +1,3 @@ -// ignore_for_file: scoped_providers_should_specify_dependencies import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart';