quiz redirecionado aos videos | redesing da notificação
This commit is contained in:
@@ -2,12 +2,15 @@ import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
|
||||
import 'main.dart' show supabase;
|
||||
import 'widgets/app_gradients.dart';
|
||||
import 'widgets/entrance.dart';
|
||||
import 'widgets/name_input_formatter.dart';
|
||||
import 'widgets/pill_snackbar.dart';
|
||||
import 'widgets/tap_bounce.dart';
|
||||
|
||||
const Color _teal = Color(0xFF2F9E94);
|
||||
@@ -117,32 +120,22 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
}
|
||||
} on _AccountNotFoundException {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'Esta conta não existe mais. Verifique o email ou crie uma nova conta.',
|
||||
),
|
||||
),
|
||||
showPillSnackBar(
|
||||
context,
|
||||
'Esta conta não existe mais. Verifique o email ou crie uma nova conta.',
|
||||
);
|
||||
} on AuthException catch (e) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(_friendlyAuthError(e))));
|
||||
showPillSnackBar(context, _friendlyAuthError(e));
|
||||
} on TimeoutException {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'Tempo esgotado. Verifique sua conexão e tente novamente.',
|
||||
),
|
||||
),
|
||||
showPillSnackBar(
|
||||
context,
|
||||
'Tempo esgotado. Verifique sua conexão e tente novamente.',
|
||||
);
|
||||
} catch (e) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text('Erro: $e')));
|
||||
showPillSnackBar(context, 'Erro: $e');
|
||||
} finally {
|
||||
if (mounted) setState(() => _loading = false);
|
||||
}
|
||||
@@ -403,6 +396,8 @@ class _AuthForm extends StatelessWidget {
|
||||
hintText: 'Digite seu nome',
|
||||
icon: Icons.person_outline_rounded,
|
||||
textInputAction: TextInputAction.next,
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
inputFormatters: [CapitalizeFirstLetterFormatter()],
|
||||
validator: (v) {
|
||||
final value = (v ?? '').trim();
|
||||
if (value.isEmpty) return 'Informe seu nome';
|
||||
@@ -518,6 +513,8 @@ class _AuthTextField extends StatelessWidget {
|
||||
this.obscureText = false,
|
||||
this.keyboardType,
|
||||
this.textInputAction,
|
||||
this.textCapitalization = TextCapitalization.none,
|
||||
this.inputFormatters,
|
||||
});
|
||||
|
||||
final TextEditingController controller;
|
||||
@@ -527,6 +524,8 @@ class _AuthTextField extends StatelessWidget {
|
||||
final bool obscureText;
|
||||
final TextInputType? keyboardType;
|
||||
final TextInputAction? textInputAction;
|
||||
final TextCapitalization textCapitalization;
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -547,6 +546,8 @@ class _AuthTextField extends StatelessWidget {
|
||||
obscureText: obscureText,
|
||||
keyboardType: keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
textCapitalization: textCapitalization,
|
||||
inputFormatters: inputFormatters,
|
||||
validator: validator,
|
||||
style: const TextStyle(fontWeight: FontWeight.w700),
|
||||
decoration: InputDecoration(
|
||||
|
||||
Reference in New Issue
Block a user