quiz redirecionado aos videos | redesing da notificação

This commit is contained in:
Carlos Correia
2026-07-10 13:06:40 +01:00
parent 7ddc76d393
commit 30068d1501
11 changed files with 323 additions and 142 deletions

View File

@@ -10,6 +10,7 @@ import 'package:youtube_player_flutter/youtube_player_flutter.dart';
import '../watched_videos_prefs.dart';
import '../widgets/app_gradients.dart';
import '../widgets/entrance.dart';
import '../widgets/pill_snackbar.dart';
import '../widgets/tap_bounce.dart';
// Video data structure - easily editable for future updates.
@@ -173,9 +174,7 @@ Future<void> showVideoPlayerDialog(
}) {
if (video.youtubeId != null) {
if (video.youtubeId!.isEmpty) {
ScaffoldMessenger.of(
context,
).showSnackBar(const SnackBar(content: Text('Vídeo ainda não disponível')));
showPillSnackBar(context, 'Vídeo ainda não disponível');
return Future.value();
}
return Navigator.of(context).push<void>(
@@ -785,9 +784,7 @@ class _VideoPlayerDialogState extends State<_VideoPlayerDialog> {
setState(() {
_isInitialized = false;
});
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('Erro ao carregar vídeo: $e')));
showPillSnackBar(context, 'Erro ao carregar vídeo: $e');
}
}
}
@@ -1049,9 +1046,7 @@ class _FullscreenVideoPlayerState extends State<_FullscreenVideoPlayer> {
setState(() {
_isInitialized = false;
});
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('Erro ao carregar vídeo: $e')));
showPillSnackBar(context, 'Erro ao carregar vídeo: $e');
}
}
}