Nova tela de login | Adaptaçao nova da AppBar | Animções novas

This commit is contained in:
Carlos Correia
2026-07-07 21:40:05 +01:00
parent a8e04ceeb2
commit 2ced93afdd
15 changed files with 1680 additions and 1322 deletions

View File

@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import '../main.dart' show supabase;
import '../widgets/app_dialogs.dart';
import '../widgets/entrance.dart';
import '../widgets/tap_bounce.dart';
import 'terms_screen.dart';
const Color _teal = Color(0xFF2F9E94);
@@ -65,53 +67,78 @@ class _SettingsBodyState extends State<SettingsBody> {
return ListView(
padding: const EdgeInsets.all(16),
children: [
_SectionLabel('Conta'),
_SettingsCard(
children: [
_InfoTile(
icon: Icons.person_outline_rounded,
title: name.isEmpty ? 'Sem nome' : name,
subtitle: email,
),
const Divider(height: 1),
_ActionTile(
icon: Icons.logout_rounded,
title: 'Sair',
onTap: _signOut,
),
],
),
const SizedBox(height: 20),
_SectionLabel('Sobre'),
_SettingsCard(
children: [
_ActionTile(
icon: Icons.description_outlined,
title: 'Termos de Serviço',
onTap: () => Navigator.of(context).push(
MaterialPageRoute<void>(builder: (_) => const TermsScreen()),
FadeSlideIn(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_SectionLabel('Conta'),
_SettingsCard(
children: [
_InfoTile(
icon: Icons.person_outline_rounded,
title: name.isEmpty ? 'Sem nome' : name,
subtitle: email,
),
const Divider(height: 1),
_ActionTile(
icon: Icons.logout_rounded,
title: 'Sair',
onTap: _signOut,
),
],
),
),
const Divider(height: 1),
const _InfoTile(
icon: Icons.info_outline_rounded,
title: 'Versão do app',
subtitle: '1.0.0',
),
],
],
),
),
const SizedBox(height: 20),
_SectionLabel('Zona de risco'),
_SettingsCard(
children: [
_ActionTile(
icon: Icons.delete_forever_rounded,
title: 'Apagar dados da conta',
titleColor: _accentPink,
loading: _deletingAccount,
onTap: _deletingAccount ? null : _confirmDeleteAccountData,
),
],
FadeSlideIn(
delay: const Duration(milliseconds: 80),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_SectionLabel('Sobre'),
_SettingsCard(
children: [
_ActionTile(
icon: Icons.description_outlined,
title: 'Termos de Serviço',
onTap: () => Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (_) => const TermsScreen(),
),
),
),
const Divider(height: 1),
const _InfoTile(
icon: Icons.info_outline_rounded,
title: 'Versão do app',
subtitle: '1.0.0',
),
],
),
],
),
),
const SizedBox(height: 20),
FadeSlideIn(
delay: const Duration(milliseconds: 160),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_SectionLabel('Zona de risco'),
_SettingsCard(
children: [
_ActionTile(
icon: Icons.delete_forever_rounded,
title: 'Apagar dados da conta',
titleColor: _accentPink,
loading: _deletingAccount,
onTap: _deletingAccount ? null : _confirmDeleteAccountData,
),
],
),
],
),
),
const SizedBox(height: 12),
],
@@ -193,20 +220,23 @@ class _ActionTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListTile(
leading: Icon(icon, color: titleColor ?? _teal),
title: Text(
title,
style: TextStyle(fontWeight: FontWeight.w800, color: titleColor),
return TapBounce(
scale: 0.98,
child: ListTile(
leading: Icon(icon, color: titleColor ?? _teal),
title: Text(
title,
style: TextStyle(fontWeight: FontWeight.w800, color: titleColor),
),
trailing: loading
? const SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: const Icon(Icons.chevron_right_rounded),
onTap: onTap,
),
trailing: loading
? const SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: const Icon(Icons.chevron_right_rounded),
onTap: onTap,
);
}
}