quiz redirecionado aos videos | redesing da notificação
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import '../main.dart' show supabase;
|
||||
import '../widgets/app_dialogs.dart';
|
||||
import '../widgets/entrance.dart';
|
||||
import '../widgets/pill_snackbar.dart';
|
||||
import '../widgets/tap_bounce.dart';
|
||||
import 'terms_screen.dart';
|
||||
|
||||
@@ -28,7 +29,6 @@ class _SettingsBodyState extends State<SettingsBody> {
|
||||
}
|
||||
|
||||
Future<void> _confirmDeleteAccountData() async {
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
final confirmed = await showConfirmDialog(
|
||||
context,
|
||||
title: 'Apagar dados da conta',
|
||||
@@ -63,7 +63,7 @@ class _SettingsBodyState extends State<SettingsBody> {
|
||||
if (!mounted) return;
|
||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||
} catch (e) {
|
||||
messenger.showSnackBar(SnackBar(content: Text('Erro ao apagar: $e')));
|
||||
if (mounted) showPillSnackBar(context, 'Erro ao apagar: $e');
|
||||
} finally {
|
||||
if (mounted) setState(() => _deletingAccount = false);
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user