fix: Improved logic horizontal list navigation

This commit is contained in:
PartyDonut 2025-10-16 22:22:50 +02:00
parent b4e68c9e15
commit 47128eb3b6
4 changed files with 40 additions and 15 deletions

View file

@ -10,6 +10,7 @@ import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
import 'package:fladder/util/localization_helper.dart';
import 'package:fladder/util/sticky_header_text.dart';
import 'package:fladder/util/string_extensions.dart';
import 'package:fladder/widgets/shared/ensure_visible.dart';
class NextUpEpisode extends ConsumerWidget {
final EpisodeModel nextEpisode;
@ -49,6 +50,11 @@ class NextUpEpisode extends ConsumerWidget {
showLabel: false,
onTap: () => nextEpisode.navigateTo(context),
actions: const [],
onFocusChanged: (value) {
if (value) {
context.ensureVisible();
}
},
isCurrentEpisode: false,
),
const SizedBox(height: 16),
@ -71,6 +77,11 @@ class NextUpEpisode extends ConsumerWidget {
showLabel: false,
onTap: () => nextEpisode.navigateTo(context),
actions: const [],
onFocusChanged: (value) {
if (value) {
context.ensureVisible();
}
},
isCurrentEpisode: false,
),
),