vai te lixar github

This commit is contained in:
2026-03-16 22:09:01 +00:00
parent 1917b5fe10
commit cf0a9a9890
22 changed files with 1929 additions and 1290 deletions

View File

@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:playmaker/controllers/login_controller.dart';
import 'package:playmaker/pages/RegisterPage.dart';
import '../utils/size_extension.dart'; // 👇 O NOSSO SUPERPODER!
import 'package:playmaker/classe/theme.dart'; // 👇 IMPORT DO TEMA
import '../utils/size_extension.dart';
class BasketTrackHeader extends StatelessWidget {
const BasketTrackHeader({super.key});
@@ -11,7 +12,7 @@ class BasketTrackHeader extends StatelessWidget {
return Column(
children: [
SizedBox(
width: 200 * context.sf, // Ajusta o tamanho da imagem suavemente
width: 200 * context.sf,
height: 200 * context.sf,
child: Image.asset(
'assets/playmaker-logos.png',
@@ -23,7 +24,7 @@ class BasketTrackHeader extends StatelessWidget {
style: TextStyle(
fontSize: 36 * context.sf,
fontWeight: FontWeight.bold,
color: Colors.grey[900],
color: Theme.of(context).colorScheme.onSurface, // 👇 Adaptável ao Modo Escuro
),
),
SizedBox(height: 6 * context.sf),
@@ -31,7 +32,7 @@ class BasketTrackHeader extends StatelessWidget {
'Gere as tuas equipas e estatísticas',
style: TextStyle(
fontSize: 16 * context.sf,
color: Colors.grey[600],
color: Colors.grey, // Mantemos cinza para subtítulo
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
@@ -52,13 +53,17 @@ class LoginFormFields extends StatelessWidget {
children: [
TextField(
controller: controller.emailController,
style: TextStyle(fontSize: 15 * context.sf),
style: TextStyle(fontSize: 15 * context.sf, color: Theme.of(context).colorScheme.onSurface),
decoration: InputDecoration(
labelText: 'E-mail',
labelStyle: TextStyle(fontSize: 15 * context.sf),
prefixIcon: Icon(Icons.email_outlined, size: 22 * context.sf),
prefixIcon: Icon(Icons.email_outlined, size: 22 * context.sf, color: AppTheme.primaryRed), // 👇 Cor do tema
errorText: controller.emailError,
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12 * context.sf)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12 * context.sf),
borderSide: BorderSide(color: AppTheme.primaryRed, width: 2), // 👇 Cor do tema ao focar
),
contentPadding: EdgeInsets.symmetric(vertical: 18 * context.sf, horizontal: 16 * context.sf),
),
keyboardType: TextInputType.emailAddress,
@@ -67,16 +72,21 @@ class LoginFormFields extends StatelessWidget {
TextField(
controller: controller.passwordController,
obscureText: controller.obscurePassword,
style: TextStyle(fontSize: 15 * context.sf),
style: TextStyle(fontSize: 15 * context.sf, color: Theme.of(context).colorScheme.onSurface),
decoration: InputDecoration(
labelText: 'Palavra-passe',
labelStyle: TextStyle(fontSize: 15 * context.sf),
prefixIcon: Icon(Icons.lock_outlined, size: 22 * context.sf),
prefixIcon: Icon(Icons.lock_outlined, size: 22 * context.sf, color: AppTheme.primaryRed), // 👇 Cor do tema
errorText: controller.passwordError,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12 * context.sf),
borderSide: BorderSide(color: AppTheme.primaryRed, width: 2), // 👇 Cor do tema ao focar
),
suffixIcon: IconButton(
icon: Icon(
controller.obscurePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined,
size: 22 * context.sf
size: 22 * context.sf,
color: Colors.grey,
),
onPressed: controller.togglePasswordVisibility,
),
@@ -106,7 +116,7 @@ class LoginButton extends StatelessWidget {
if (success) onLoginSuccess();
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFE74C3C),
backgroundColor: AppTheme.primaryRed, // 👇 Usando a cor do tema
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14 * context.sf)),
elevation: 3,
@@ -135,8 +145,8 @@ class CreateAccountButton extends StatelessWidget {
Navigator.push(context, MaterialPageRoute(builder: (context) => const RegisterPage()));
},
style: OutlinedButton.styleFrom(
foregroundColor: const Color(0xFFE74C3C),
side: BorderSide(color: const Color(0xFFE74C3C), width: 2 * context.sf),
foregroundColor: AppTheme.primaryRed, // 👇 Usando a cor do tema
side: BorderSide(color: AppTheme.primaryRed, width: 2 * context.sf), // 👇 Usando a cor do tema
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14 * context.sf)),
),
child: Text('Criar Conta', style: TextStyle(fontSize: 18 * context.sf, fontWeight: FontWeight.bold)),