stats page pagina melhrar
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
|
|
||||||
class LoginController with ChangeNotifier {
|
class LoginController with ChangeNotifier {
|
||||||
final FirebaseAuth _auth = FirebaseAuth.instance;
|
// 1. Substituímos o FirebaseAuth pelo cliente do Supabase
|
||||||
|
final SupabaseClient _supabase = Supabase.instance.client;
|
||||||
|
|
||||||
final TextEditingController emailController = TextEditingController();
|
final TextEditingController emailController = TextEditingController();
|
||||||
final TextEditingController passwordController = TextEditingController();
|
final TextEditingController passwordController = TextEditingController();
|
||||||
@@ -22,6 +23,7 @@ class LoginController with ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- VALIDAÇÕES (Mantêm-se iguais) ---
|
||||||
String? validateEmail(String? value) {
|
String? validateEmail(String? value) {
|
||||||
if (value == null || value.isEmpty) return 'Por favor, insira o seu email';
|
if (value == null || value.isEmpty) return 'Por favor, insira o seu email';
|
||||||
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
||||||
@@ -37,10 +39,17 @@ class LoginController with ChangeNotifier {
|
|||||||
|
|
||||||
// --- MÉTODO PARA ENTRAR (LOGIN) ---
|
// --- MÉTODO PARA ENTRAR (LOGIN) ---
|
||||||
Future<bool> login() async {
|
Future<bool> login() async {
|
||||||
_emailError = validateEmail(emailController.text);
|
// Limpa erros anteriores
|
||||||
_passwordError = validatePassword(passwordController.text);
|
_emailError = null;
|
||||||
|
_passwordError = null;
|
||||||
|
|
||||||
if (_emailError != null || _passwordError != null) {
|
// Valida localmente primeiro
|
||||||
|
String? emailValidation = validateEmail(emailController.text);
|
||||||
|
String? passValidation = validatePassword(passwordController.text);
|
||||||
|
|
||||||
|
if (emailValidation != null || passValidation != null) {
|
||||||
|
_emailError = emailValidation;
|
||||||
|
_passwordError = passValidation;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -49,16 +58,25 @@ class LoginController with ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _auth.signInWithEmailAndPassword(
|
// 2. Chamada ao Supabase para Login
|
||||||
|
await _supabase.auth.signInWithPassword(
|
||||||
email: emailController.text.trim(),
|
email: emailController.text.trim(),
|
||||||
password: passwordController.text.trim(),
|
password: passwordController.text.trim(),
|
||||||
);
|
);
|
||||||
|
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return true;
|
return true;
|
||||||
} on FirebaseAuthException catch (e) {
|
|
||||||
|
} on AuthException catch (e) {
|
||||||
|
// 3. Captura erros específicos do Supabase
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
_handleFirebaseError(e.code);
|
_handleSupabaseError(e);
|
||||||
|
notifyListeners();
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
_isLoading = false;
|
||||||
|
_emailError = 'Ocorreu um erro inesperado.';
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -66,10 +84,15 @@ class LoginController with ChangeNotifier {
|
|||||||
|
|
||||||
// --- MÉTODO PARA CRIAR CONTA (SIGN UP) ---
|
// --- MÉTODO PARA CRIAR CONTA (SIGN UP) ---
|
||||||
Future<bool> signUp() async {
|
Future<bool> signUp() async {
|
||||||
_emailError = validateEmail(emailController.text);
|
_emailError = null;
|
||||||
_passwordError = validatePassword(passwordController.text);
|
_passwordError = null;
|
||||||
|
|
||||||
if (_emailError != null || _passwordError != null) {
|
String? emailValidation = validateEmail(emailController.text);
|
||||||
|
String? passValidation = validatePassword(passwordController.text);
|
||||||
|
|
||||||
|
if (emailValidation != null || passValidation != null) {
|
||||||
|
_emailError = emailValidation;
|
||||||
|
_passwordError = passValidation;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -78,40 +101,46 @@ class LoginController with ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _auth.createUserWithEmailAndPassword(
|
// 4. Chamada ao Supabase para Registo
|
||||||
|
await _supabase.auth.signUp(
|
||||||
email: emailController.text.trim(),
|
email: emailController.text.trim(),
|
||||||
password: passwordController.text.trim(),
|
password: passwordController.text.trim(),
|
||||||
);
|
);
|
||||||
|
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return true;
|
return true;
|
||||||
} on FirebaseAuthException catch (e) {
|
|
||||||
|
} on AuthException catch (e) {
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
_handleFirebaseError(e.code);
|
_handleSupabaseError(e);
|
||||||
|
notifyListeners();
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
_isLoading = false;
|
||||||
|
_emailError = 'Ocorreu um erro inesperado.';
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleFirebaseError(String code) {
|
// --- TRATAMENTO DE ERROS SUPABASE ---
|
||||||
switch (code) {
|
void _handleSupabaseError(AuthException error) {
|
||||||
case 'email-already-in-use':
|
// O Supabase retorna mensagens em inglês, vamos traduzir as mais comuns.
|
||||||
_emailError = 'Este e-mail já está a ser utilizado.';
|
// O 'message' contém o texto do erro.
|
||||||
break;
|
final msg = error.message.toLowerCase();
|
||||||
case 'invalid-credential':
|
|
||||||
|
if (msg.contains('invalid login credentials')) {
|
||||||
_emailError = 'E-mail ou password incorretos.';
|
_emailError = 'E-mail ou password incorretos.';
|
||||||
break;
|
} else if (msg.contains('user already registered') || msg.contains('already exists')) {
|
||||||
case 'user-not-found':
|
_emailError = 'Este e-mail já está registado.';
|
||||||
_emailError = 'Utilizador não encontrado.';
|
} else if (msg.contains('password')) {
|
||||||
break;
|
_passwordError = 'A password deve ter pelo menos 6 caracteres.';
|
||||||
case 'wrong-password':
|
} else if (msg.contains('email')) {
|
||||||
_passwordError = 'Palavra-passe incorreta.';
|
_emailError = 'Formato de e-mail inválido.';
|
||||||
break;
|
} else {
|
||||||
case 'weak-password':
|
// Fallback para mostrar a mensagem original se não conhecermos o erro
|
||||||
_passwordError = 'A password é demasiado fraca.';
|
_emailError = error.message;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
_emailError = 'Erro: $code';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,18 @@
|
|||||||
|
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
|
|
||||||
class RegisterController with ChangeNotifier {
|
class RegisterController extends ChangeNotifier {
|
||||||
final FirebaseAuth _auth = FirebaseAuth.instance;
|
// Chave para identificar e validar o formulário
|
||||||
|
final GlobalKey<FormState> formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
final TextEditingController emailController = TextEditingController();
|
final nameController = TextEditingController();
|
||||||
final TextEditingController passwordController = TextEditingController();
|
final emailController = TextEditingController();
|
||||||
final TextEditingController confirmPasswordController = TextEditingController();
|
final passwordController = TextEditingController();
|
||||||
|
final confirmPasswordController = TextEditingController(); // Novo campo
|
||||||
|
|
||||||
bool _isLoading = false;
|
bool isLoading = false;
|
||||||
String? _emailError;
|
|
||||||
String? _passwordError;
|
|
||||||
String? _confirmPasswordError; // Novo!
|
|
||||||
String? get confirmPasswordError => _confirmPasswordError; // Novo!
|
|
||||||
|
|
||||||
bool get isLoading => _isLoading;
|
// --- AS TUAS VALIDAÇÕES ---
|
||||||
String? get emailError => _emailError;
|
|
||||||
String? get passwordError => _passwordError;
|
|
||||||
|
|
||||||
// Validações
|
|
||||||
String? validateEmail(String? value) {
|
String? validateEmail(String? value) {
|
||||||
if (value == null || value.isEmpty) return 'Por favor, insira o seu email';
|
if (value == null || value.isEmpty) return 'Por favor, insira o seu email';
|
||||||
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
||||||
@@ -32,6 +25,7 @@ class RegisterController with ChangeNotifier {
|
|||||||
if (value.length < 6) return 'A password deve ter pelo menos 6 caracteres';
|
if (value.length < 6) return 'A password deve ter pelo menos 6 caracteres';
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String? validateConfirmPassword(String? value) {
|
String? validateConfirmPassword(String? value) {
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.isEmpty) {
|
||||||
return 'Por favor, confirme a sua password';
|
return 'Por favor, confirme a sua password';
|
||||||
@@ -41,57 +35,56 @@ class RegisterController with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
Future<void> signUp(BuildContext context) async {
|
||||||
// MÉTODO PARA CRIAR CONTA (SIGN UP)
|
// 1. Verifica se o formulário é válido antes de fazer qualquer coisa
|
||||||
Future<bool> signUp() async {
|
if (!formKey.currentState!.validate()) {
|
||||||
_emailError = validateEmail(emailController.text);
|
return;
|
||||||
_passwordError = validatePassword(passwordController.text);
|
|
||||||
_emailError = validateEmail(emailController.text);
|
|
||||||
_passwordError = validatePassword(passwordController.text);
|
|
||||||
_confirmPasswordError = validateConfirmPassword(confirmPasswordController.text); // Valida aqui!
|
|
||||||
|
|
||||||
if (_emailError != null || _passwordError != null || _confirmPasswordError != null) {
|
|
||||||
notifyListeners();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_isLoading = true;
|
isLoading = true;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _auth.createUserWithEmailAndPassword(
|
final AuthResponse res = await Supabase.instance.client.auth.signUp(
|
||||||
email: emailController.text.trim(),
|
email: emailController.text.trim(),
|
||||||
password: passwordController.text.trim(),
|
password: passwordController.text.trim(),
|
||||||
|
data: {'full_name': nameController.text.trim()},
|
||||||
);
|
);
|
||||||
_isLoading = false;
|
|
||||||
notifyListeners();
|
|
||||||
return true;
|
|
||||||
} on FirebaseAuthException catch (e) {
|
|
||||||
_isLoading = false;
|
|
||||||
_handleFirebaseError(e.code);
|
|
||||||
notifyListeners();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _handleFirebaseError(String code) {
|
final user = res.user;
|
||||||
switch (code) {
|
|
||||||
case 'email-already-in-use':
|
if (user != null && context.mounted) {
|
||||||
_emailError = 'Este e-mail já está a ser utilizado.';
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
break;
|
const SnackBar(content: Text('Conta criada! Podes fazer login.')),
|
||||||
case 'weak-password':
|
);
|
||||||
_passwordError = 'A password é demasiado fraca.';
|
Navigator.pop(context);
|
||||||
break;
|
}
|
||||||
default:
|
} on AuthException catch (e) {
|
||||||
_emailError = 'Erro ao registar: $code';
|
if (context.mounted) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(content: Text(e.message), backgroundColor: Colors.red),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (context.mounted) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text('Erro inesperado'), backgroundColor: Colors.red),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
isLoading = false;
|
||||||
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
nameController.dispose();
|
||||||
emailController.dispose();
|
emailController.dispose();
|
||||||
passwordController.dispose();
|
passwordController.dispose();
|
||||||
|
confirmPasswordController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,146 +1,114 @@
|
|||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
import '../models/person_model.dart';
|
import '../models/person_model.dart';
|
||||||
|
|
||||||
class StatsController {
|
class StatsController {
|
||||||
final FirebaseFirestore _db = FirebaseFirestore.instance;
|
final SupabaseClient _supabase = Supabase.instance.client;
|
||||||
|
|
||||||
// --- LÓGICA DE FIREBASE ---
|
// --- 1. LER DADOS (STREAM) ---
|
||||||
|
Stream<List<Person>> getMembers(String teamId) {
|
||||||
|
return _supabase
|
||||||
|
.from('members')
|
||||||
|
.stream(primaryKey: ['id'])
|
||||||
|
.eq('team_id', teamId)
|
||||||
|
.order('name', ascending: true) // Ordena por nome
|
||||||
|
.map((data) => data.map((json) => Person.fromMap(json)).toList());
|
||||||
|
}
|
||||||
|
|
||||||
// GRAVAR: Cria o personagem numa sub-coleção dentro da equipa
|
// --- 2. AÇÕES DE BASE DE DADOS ---
|
||||||
Future<void> addPerson(String teamId, String name, String type, String number) async {
|
|
||||||
await _db.collection('teams').doc(teamId).collection('members').add({
|
// Adicionar
|
||||||
|
Future<void> _addPersonToSupabase(String teamId, String name, String type, String number) async {
|
||||||
|
await _supabase.from('members').insert({
|
||||||
|
'team_id': teamId,
|
||||||
'name': name,
|
'name': name,
|
||||||
'type': type,
|
'type': type,
|
||||||
'number': number,
|
'number': number,
|
||||||
'createdAt': FieldValue.serverTimestamp(),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// LER: Vai buscar todos os membros da equipa em tempo real
|
// Editar
|
||||||
Stream<List<Person>> getMembers(String teamId) {
|
Future<void> _updatePersonInSupabase(String personId, String name, String type, String number) async {
|
||||||
return _db
|
await _supabase.from('members').update({
|
||||||
.collection('teams')
|
'name': name,
|
||||||
.doc(teamId)
|
'type': type,
|
||||||
.collection('members')
|
'number': number,
|
||||||
.orderBy('createdAt', descending: false) // Organiza por ordem de criação
|
}).eq('id', personId);
|
||||||
.snapshots()
|
|
||||||
.map((snapshot) => snapshot.docs
|
|
||||||
.map((doc) => Person.fromFirestore(doc.data(), doc.id))
|
|
||||||
.toList());
|
|
||||||
}
|
}
|
||||||
// --- Adiciona estas funções dentro da classe StatsController ---
|
|
||||||
|
|
||||||
// ELIMINAR: Remove o documento da sub-coleção
|
// Apagar
|
||||||
Future<void> deletePerson(String teamId, String personId) async {
|
Future<void> deletePerson(String teamId, String personId) async {
|
||||||
await _db
|
try {
|
||||||
.collection('teams')
|
await _supabase.from('members').delete().eq('id', personId);
|
||||||
.doc(teamId)
|
} catch (e) {
|
||||||
.collection('members')
|
debugPrint("Erro ao apagar: $e");
|
||||||
.doc(personId)
|
}
|
||||||
.delete();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// EDITAR (LOGICA): Abre o popup já preenchido com os dados atuais
|
// --- 3. DIÁLOGOS (UI) ---
|
||||||
void showEditPersonDialog(BuildContext context, String teamId, Person person) {
|
|
||||||
final nameController = TextEditingController(text: person.name);
|
|
||||||
final numberController = TextEditingController(text: person.number);
|
|
||||||
String selectedType = person.type;
|
|
||||||
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) => StatefulBuilder(
|
|
||||||
builder: (context, setPopupState) => AlertDialog(
|
|
||||||
title: const Text("Editar Personagem"),
|
|
||||||
content: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
DropdownButtonFormField<String>(
|
|
||||||
value: selectedType,
|
|
||||||
items: ['Jogador', 'Treinador'].map((t) => DropdownMenuItem(value: t, child: Text(t))).toList(),
|
|
||||||
onChanged: (val) => setPopupState(() => selectedType = val!),
|
|
||||||
decoration: const InputDecoration(labelText: 'Tipo'),
|
|
||||||
),
|
|
||||||
TextField(controller: nameController, decoration: const InputDecoration(labelText: 'Nome')),
|
|
||||||
if (selectedType == 'Jogador')
|
|
||||||
TextField(controller: numberController, decoration: const InputDecoration(labelText: 'Número')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(onPressed: () => Navigator.pop(context), child: const Text("Cancelar")),
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
await _db.collection('teams').doc(teamId).collection('members').doc(person.id).update({
|
|
||||||
'name': nameController.text,
|
|
||||||
'type': selectedType,
|
|
||||||
'number': selectedType == 'Jogador' ? numberController.text : '',
|
|
||||||
});
|
|
||||||
if (context.mounted) Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: const Text("Guardar Alterações"),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- LÓGICA DE INTERFACE (POPUP) ---
|
|
||||||
|
|
||||||
|
// Mostrar Diálogo de Adicionar
|
||||||
void showAddPersonDialog(BuildContext context, String teamId) {
|
void showAddPersonDialog(BuildContext context, String teamId) {
|
||||||
String selectedType = 'Jogador';
|
_showPersonDialog(context, teamId: teamId);
|
||||||
final TextEditingController nameController = TextEditingController();
|
}
|
||||||
final TextEditingController numberController = TextEditingController();
|
|
||||||
|
// Mostrar Diálogo de Editar
|
||||||
|
void showEditPersonDialog(BuildContext context, String teamId, Person person) {
|
||||||
|
_showPersonDialog(context, teamId: teamId, person: person);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Função Genérica para o Diálogo (Serve para criar e editar)
|
||||||
|
void _showPersonDialog(BuildContext context, {required String teamId, Person? person}) {
|
||||||
|
final isEditing = person != null;
|
||||||
|
final nameController = TextEditingController(text: person?.name ?? '');
|
||||||
|
final numberController = TextEditingController(text: person?.number ?? '');
|
||||||
|
|
||||||
|
// Valor inicial do dropdown ('Jogador' por defeito)
|
||||||
|
String selectedType = person?.type ?? 'Jogador';
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
// Usamos StatefulBuilder para atualizar o Dropdown dentro do Dialog
|
||||||
return StatefulBuilder(
|
return StatefulBuilder(
|
||||||
builder: (context, setPopupState) {
|
builder: (context, setState) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
|
title: Text(isEditing ? 'Editar Membro' : 'Novo Membro'),
|
||||||
title: const Text('Novo Personagem'),
|
content: Column(
|
||||||
content: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// Seletor: Jogador ou Treinador
|
// Nome
|
||||||
DropdownButtonFormField<String>(
|
|
||||||
value: selectedType,
|
|
||||||
decoration: const InputDecoration(labelText: 'Tipo'),
|
|
||||||
items: ['Jogador', 'Treinador']
|
|
||||||
.map((t) => DropdownMenuItem(value: t, child: Text(t)))
|
|
||||||
.toList(),
|
|
||||||
onChanged: (val) {
|
|
||||||
setPopupState(() {
|
|
||||||
selectedType = val!;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
// Campo Nome
|
|
||||||
TextField(
|
TextField(
|
||||||
controller: nameController,
|
controller: nameController,
|
||||||
textCapitalization: TextCapitalization.words,
|
decoration: const InputDecoration(labelText: 'Nome'),
|
||||||
decoration: const InputDecoration(
|
textCapitalization: TextCapitalization.sentences,
|
||||||
labelText: 'Nome Completo',
|
|
||||||
hintText: 'Ex: Stephen Curry',
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
|
// Tipo (Jogador/Treinador)
|
||||||
|
DropdownButtonFormField<String>(
|
||||||
|
value: selectedType,
|
||||||
|
decoration: const InputDecoration(labelText: 'Função'),
|
||||||
|
items: const [
|
||||||
|
DropdownMenuItem(value: 'Jogador', child: Text('Jogador')),
|
||||||
|
DropdownMenuItem(value: 'Treinador', child: Text('Treinador')),
|
||||||
|
],
|
||||||
|
onChanged: (value) {
|
||||||
|
if (value != null) {
|
||||||
|
setState(() => selectedType = value);
|
||||||
|
}
|
||||||
|
},
|
||||||
),
|
),
|
||||||
// Campo Número (Aparece apenas se for Jogador)
|
const SizedBox(height: 10),
|
||||||
if (selectedType == 'Jogador') ...[
|
|
||||||
const SizedBox(height: 15),
|
// Número (Só aparece se for Jogador)
|
||||||
|
if (selectedType == 'Jogador')
|
||||||
TextField(
|
TextField(
|
||||||
controller: numberController,
|
controller: numberController,
|
||||||
|
decoration: const InputDecoration(labelText: 'Número da Camisola'),
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Número da Camisola',
|
|
||||||
hintText: 'Ex: 30',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
@@ -148,23 +116,22 @@ void showEditPersonDialog(BuildContext context, String teamId, Person person) {
|
|||||||
child: const Text('Cancelar'),
|
child: const Text('Cancelar'),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(backgroundColor: const Color(0xFF00C853)),
|
||||||
backgroundColor: const Color(0xFF00C853),
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (nameController.text.isNotEmpty) {
|
if (nameController.text.isEmpty) return;
|
||||||
// CHAMA A FUNÇÃO DE GRAVAR DO FIREBASE
|
|
||||||
await addPerson(
|
final name = nameController.text.trim();
|
||||||
teamId,
|
final number = numberController.text.trim();
|
||||||
nameController.text,
|
|
||||||
selectedType,
|
if (isEditing) {
|
||||||
selectedType == 'Jogador' ? numberController.text : '',
|
await _updatePersonInSupabase(person!.id, name, selectedType, number);
|
||||||
);
|
} else {
|
||||||
|
await _addPersonToSupabase(teamId, name, selectedType, number);
|
||||||
|
}
|
||||||
|
|
||||||
if (context.mounted) Navigator.pop(context);
|
if (context.mounted) Navigator.pop(context);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
child: const Text('Guardar', style: TextStyle(color: Colors.white)),
|
child: Text(isEditing ? 'Guardar' : 'Adicionar', style: const TextStyle(color: Colors.white)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,31 +1,37 @@
|
|||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
import 'package:playmaker/service/auth_service.dart';
|
|
||||||
|
|
||||||
class TeamController {
|
class TeamController {
|
||||||
final AuthService _authService = AuthService();
|
// Acesso ao cliente do Supabase
|
||||||
final CollectionReference _teamsRef = FirebaseFirestore.instance.collection('teams');
|
final SupabaseClient _supabase = Supabase.instance.client;
|
||||||
|
|
||||||
|
// --- STREAM DE EQUIPAS (LER) ---
|
||||||
|
// Retorna uma Lista de Mapas em tempo real
|
||||||
|
Stream<List<Map<String, dynamic>>> get teamsStream {
|
||||||
|
final user = _supabase.auth.currentUser;
|
||||||
|
|
||||||
Stream<QuerySnapshot> get teamsStream {
|
if (user == null) {
|
||||||
final uid = _authService.currentUid;
|
return const Stream.empty();
|
||||||
return _teamsRef
|
}
|
||||||
.where('userId', isEqualTo: uid)
|
|
||||||
.orderBy('createdAt', descending: true)
|
return _supabase
|
||||||
.snapshots();
|
.from('teams')
|
||||||
|
.stream(primaryKey: ['id']) // É obrigatório definir a Primary Key para Streams
|
||||||
|
.eq('user_id', user.id) // Filtra apenas as equipas do utilizador logado
|
||||||
|
.order('created_at', ascending: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- CRIAR EQUIPA ---
|
// --- CRIAR EQUIPA ---
|
||||||
Future<void> createTeam(String name, String season, String imageUrl) async {
|
Future<void> createTeam(String name, String season, String imageUrl) async {
|
||||||
final uid = _authService.currentUid;
|
final user = _supabase.auth.currentUser;
|
||||||
|
|
||||||
if (uid != null) {
|
if (user != null) {
|
||||||
try {
|
try {
|
||||||
await _teamsRef.add({
|
await _supabase.from('teams').insert({
|
||||||
'name': name,
|
'name': name,
|
||||||
'season': season,
|
'season': season,
|
||||||
'imageUrl': imageUrl,
|
'image_url': imageUrl, // Garante que na tabela a coluna se chama 'image_url' (snake_case)
|
||||||
'userId': uid,
|
'user_id': user.id, // Chave estrangeira para ligar ao utilizador
|
||||||
'createdAt': FieldValue.serverTimestamp(),
|
// 'created_at': O Supabase preenche isto sozinho se tiver default: now()
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("Erro ao criar equipa: $e");
|
print("Erro ao criar equipa: $e");
|
||||||
@@ -34,15 +40,32 @@ class TeamController {
|
|||||||
print("Erro: Utilizador não autenticado.");
|
print("Erro: Utilizador não autenticado.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- ELIMINAR EQUIPA ---
|
||||||
Future<void> deleteTeam(String docId) async {
|
Future<void> deleteTeam(String docId) async {
|
||||||
try {
|
try {
|
||||||
await _teamsRef.doc(docId).delete();
|
// Se configuraste "ON DELETE CASCADE" no Supabase, isto apaga também os jogadores
|
||||||
|
await _supabase.from('teams').delete().eq('id', docId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("Erro ao eliminar: $e");
|
print("Erro ao eliminar: $e");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- CONTAR JOGADORES ---
|
||||||
|
// No SQL não entramos dentro da equipa. Vamos à tabela 'members' e filtramos pelo team_id.
|
||||||
|
// --- CONTAR JOGADORES (CORRIGIDO) ---
|
||||||
Future<int> getPlayerCount(String teamId) async {
|
Future<int> getPlayerCount(String teamId) async {
|
||||||
var snapshot = await _teamsRef.doc(teamId).collection('players').get();
|
try {
|
||||||
return snapshot.docs.length;
|
// Correção: O Supabase agora retorna o 'int' diretamente, não um objeto response
|
||||||
|
final int count = await _supabase
|
||||||
|
.from('members')
|
||||||
|
.count(CountOption.exact) // Pede o número exato
|
||||||
|
.eq('team_id', teamId);
|
||||||
|
|
||||||
|
return count;
|
||||||
|
} catch (e) {
|
||||||
|
print("Erro ao contar jogadores: $e");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
// File generated by FlutterFire CLI.
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
|
||||||
import 'package:flutter/foundation.dart'
|
|
||||||
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
|
||||||
|
|
||||||
/// Default [FirebaseOptions] for use with your Firebase apps.
|
|
||||||
///
|
|
||||||
/// Example:
|
|
||||||
/// ```dart
|
|
||||||
/// import 'firebase_options.dart';
|
|
||||||
/// // ...
|
|
||||||
/// await Firebase.initializeApp(
|
|
||||||
/// options: DefaultFirebaseOptions.currentPlatform,
|
|
||||||
/// );
|
|
||||||
/// ```
|
|
||||||
class DefaultFirebaseOptions {
|
|
||||||
static FirebaseOptions get currentPlatform {
|
|
||||||
if (kIsWeb) {
|
|
||||||
return web;
|
|
||||||
}
|
|
||||||
switch (defaultTargetPlatform) {
|
|
||||||
case TargetPlatform.android:
|
|
||||||
return android;
|
|
||||||
case TargetPlatform.iOS:
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions have not been configured for ios - '
|
|
||||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
||||||
);
|
|
||||||
case TargetPlatform.macOS:
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions have not been configured for macos - '
|
|
||||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
||||||
);
|
|
||||||
case TargetPlatform.windows:
|
|
||||||
return windows;
|
|
||||||
case TargetPlatform.linux:
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions have not been configured for linux - '
|
|
||||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
||||||
);
|
|
||||||
default:
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions are not supported for this platform.',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static const FirebaseOptions web = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyBkHZtox18LRzXWYHEKVEXaYkkf8jv8Enk',
|
|
||||||
appId: '1:74256198630:web:ba3d62a31608d686d18427',
|
|
||||||
messagingSenderId: '74256198630',
|
|
||||||
projectId: 'playmaker-9e0fc',
|
|
||||||
authDomain: 'playmaker-9e0fc.firebaseapp.com',
|
|
||||||
databaseURL: 'https://playmaker-9e0fc-default-rtdb.firebaseio.com',
|
|
||||||
storageBucket: 'playmaker-9e0fc.firebasestorage.app',
|
|
||||||
measurementId: 'G-QQE1EZWZ8K',
|
|
||||||
);
|
|
||||||
|
|
||||||
static const FirebaseOptions android = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyDm7MBJQ6vZEE_gM1Ek5LH3Mf5ui2YHc2I',
|
|
||||||
appId: '1:74256198630:android:145e08f6bc85ff13d18427',
|
|
||||||
messagingSenderId: '74256198630',
|
|
||||||
projectId: 'playmaker-9e0fc',
|
|
||||||
databaseURL: 'https://playmaker-9e0fc-default-rtdb.firebaseio.com',
|
|
||||||
storageBucket: 'playmaker-9e0fc.firebasestorage.app',
|
|
||||||
);
|
|
||||||
|
|
||||||
static const FirebaseOptions windows = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyBkHZtox18LRzXWYHEKVEXaYkkf8jv8Enk',
|
|
||||||
appId: '1:74256198630:web:6458f24490c3dc80d18427',
|
|
||||||
messagingSenderId: '74256198630',
|
|
||||||
projectId: 'playmaker-9e0fc',
|
|
||||||
authDomain: 'playmaker-9e0fc.firebaseapp.com',
|
|
||||||
databaseURL: 'https://playmaker-9e0fc-default-rtdb.firebaseio.com',
|
|
||||||
storageBucket: 'playmaker-9e0fc.firebasestorage.app',
|
|
||||||
measurementId: 'G-D56MT819B0',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,25 +1,28 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
import 'firebase_options.dart';
|
|
||||||
import 'pages/login.dart';
|
import 'pages/login.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
await Firebase.initializeApp(
|
|
||||||
options: DefaultFirebaseOptions.currentPlatform,
|
await Supabase.initialize(
|
||||||
|
url: 'https://sihwjdshexjyvsbettcd.supabase.co',
|
||||||
|
anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNpaHdqZHNoZXhqeXZzYmV0dGNkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg5MTQxMjgsImV4cCI6MjA4NDQ5MDEyOH0.gW3AvTJVNyE1Dqa72OTnhrUIKsndexrY3pKxMIAaAy8', // Uma string longa
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
debugShowCheckedModeBanner: false, // Opcional: remove a faixa de debug
|
debugShowCheckedModeBanner: false,
|
||||||
title: 'BasketTrack',
|
title: 'PlayMaker',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
colorScheme: ColorScheme.fromSeed(
|
colorScheme: ColorScheme.fromSeed(
|
||||||
seedColor: const Color(0xFFE74C3C),
|
seedColor: const Color(0xFFE74C3C),
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
class Person {
|
class Person {
|
||||||
final String id;
|
final String id;
|
||||||
|
final String teamId;
|
||||||
final String name;
|
final String name;
|
||||||
final String type; // 'Jogador' ou 'Treinador'
|
final String type; // 'Jogador' ou 'Treinador'
|
||||||
final String number; // Ex: '30'
|
final String number;
|
||||||
|
|
||||||
Person({required this.id, required this.name, required this.type, required this.number});
|
Person({
|
||||||
|
required this.id,
|
||||||
|
required this.teamId,
|
||||||
|
required this.name,
|
||||||
|
required this.type,
|
||||||
|
required this.number,
|
||||||
|
});
|
||||||
|
|
||||||
factory Person.fromFirestore(Map<String, dynamic> data, String id) {
|
// Converter do Supabase (Map) para o Objeto
|
||||||
|
factory Person.fromMap(Map<String, dynamic> map) {
|
||||||
return Person(
|
return Person(
|
||||||
id: id,
|
id: map['id'] ?? '',
|
||||||
name: data['name'] ?? '',
|
teamId: map['team_id'] ?? '',
|
||||||
type: data['type'] ?? 'Jogador',
|
name: map['name'] ?? '',
|
||||||
number: data['number'] ?? '',
|
type: map['type'] ?? 'Jogador',
|
||||||
|
number: map['number']?.toString() ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../Controllers/register_controller.dart';
|
import '../controllers/register_controller.dart';
|
||||||
import '../widgets/register_widgets.dart';
|
import '../widgets/register_widgets.dart';
|
||||||
import 'home.dart';
|
|
||||||
|
|
||||||
class RegisterPage extends StatefulWidget {
|
class RegisterPage extends StatefulWidget {
|
||||||
const RegisterPage({super.key});
|
const RegisterPage({super.key});
|
||||||
@@ -11,69 +10,44 @@ class RegisterPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _RegisterPageState extends State<RegisterPage> {
|
class _RegisterPageState extends State<RegisterPage> {
|
||||||
final RegisterController controller = RegisterController();
|
// Instancia o controller
|
||||||
|
final RegisterController _controller = RegisterController();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
controller.dispose();
|
_controller.dispose(); // Limpa a memória ao sair
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
appBar: AppBar(title: const Text("Criar Conta")),
|
||||||
// AppBar para poder voltar atrás
|
body: Center(
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
elevation: 0,
|
|
||||||
foregroundColor: Colors.black,
|
|
||||||
),
|
|
||||||
body: SafeArea(
|
|
||||||
child: ListenableBuilder(
|
|
||||||
listenable: controller,
|
|
||||||
builder: (context, child) {
|
|
||||||
return LayoutBuilder(
|
|
||||||
// ... dentro do LayoutBuilder
|
|
||||||
builder: (context, constraints) {
|
|
||||||
final screenWidth = constraints.maxWidth;
|
|
||||||
|
|
||||||
return Center(
|
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Container(
|
padding: const EdgeInsets.all(24.0),
|
||||||
|
child: ListenableBuilder(
|
||||||
width: screenWidth * 0.6,
|
listenable: _controller, // Ouve as mudanças (loading)
|
||||||
constraints: const BoxConstraints(minWidth: 320),
|
builder: (context, child) {
|
||||||
padding: const EdgeInsets.all(32),
|
return Column(
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const RegisterHeader(),
|
const Text(
|
||||||
const SizedBox(height: 40),
|
"Junta-te à Equipa!",
|
||||||
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
||||||
RegisterFormFields(controller: controller),
|
|
||||||
const SizedBox(height: 32),
|
|
||||||
|
|
||||||
RegisterButton(
|
|
||||||
controller: controller,
|
|
||||||
onRegisterSuccess: () {
|
|
||||||
Navigator.pushAndRemoveUntil(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) => const HomeScreen()),
|
|
||||||
(route) => false,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 30),
|
||||||
|
|
||||||
|
// Widgets Extraídos
|
||||||
|
RegisterFormFields(controller: _controller),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
RegisterButton(controller: _controller),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:playmaker/classe/home.config.dart';
|
import 'package:playmaker/classe/home.config.dart';
|
||||||
|
import 'package:playmaker/controllers/team_controllers.dart';
|
||||||
import 'package:playmaker/grafico%20de%20pizza/grafico.dart';
|
import 'package:playmaker/grafico%20de%20pizza/grafico.dart';
|
||||||
import 'package:playmaker/pages/teams_page.dart';
|
// Certifica-te que o caminho do controller está correto:
|
||||||
|
|
||||||
class HomeScreen extends StatefulWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
const HomeScreen({super.key});
|
const HomeScreen({super.key});
|
||||||
@@ -13,18 +14,19 @@ class HomeScreen extends StatefulWidget {
|
|||||||
class _HomeScreenState extends State<HomeScreen> {
|
class _HomeScreenState extends State<HomeScreen> {
|
||||||
int _selectedIndex = 0;
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
// Lista de Widgets para cada aba
|
// 1. Instanciar o Controller para aceder ao Supabase
|
||||||
// O IndexedStack vai alternar entre estes 4 widgets
|
final TeamController _teamController = TeamController();
|
||||||
|
|
||||||
late final List<Widget> _pages;
|
late final List<Widget> _pages;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_pages = [
|
_pages = [
|
||||||
_buildHomeContent(), // Index 0
|
_buildHomeContent(), // Index 0: Home
|
||||||
const Center(child: Text('Tela de Jogo')), // Index 1
|
const Center(child: Text('Tela de Jogo')), // Index 1: Jogo
|
||||||
const TeamsPage(), // Index 2 (TUA TELA DE EQUIPAS)
|
_buildTeamsContent(), // Index 2: Equipas (O teu StreamBuilder entra aqui)
|
||||||
const Center(child: Text('Tela de Status')), // Index 3
|
const Center(child: Text('Tela de Status')), // Index 3: Status
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,8 +36,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//home
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -50,7 +50,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// O IndexedStack mantém todas as páginas "vivas" mas só mostra uma
|
|
||||||
body: IndexedStack(
|
body: IndexedStack(
|
||||||
index: _selectedIndex,
|
index: _selectedIndex,
|
||||||
children: _pages,
|
children: _pages,
|
||||||
@@ -91,6 +90,65 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
|
|
||||||
// --- WIDGETS DE CONTEÚDO ---
|
// --- WIDGETS DE CONTEÚDO ---
|
||||||
|
|
||||||
|
// 2. O teu StreamBuilder foi movido para aqui
|
||||||
|
Widget _buildTeamsContent() {
|
||||||
|
return StreamBuilder<List<Map<String, dynamic>>>(
|
||||||
|
stream: _teamController.teamsStream,
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
// Verificar estado de carregamento
|
||||||
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
|
return const Center(child: CircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verificar erros ou lista vazia
|
||||||
|
if (snapshot.hasError) {
|
||||||
|
return Center(child: Text("Erro: ${snapshot.error}"));
|
||||||
|
}
|
||||||
|
if (!snapshot.hasData || snapshot.data!.isEmpty) {
|
||||||
|
return const Center(child: Text("Ainda não tens equipas."));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Obter dados (Lista simples do Supabase)
|
||||||
|
final teams = snapshot.data!;
|
||||||
|
|
||||||
|
return ListView.builder(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
itemCount: teams.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
final team = teams[index];
|
||||||
|
|
||||||
|
// Construção do Card da Equipa
|
||||||
|
return Card(
|
||||||
|
elevation: 2,
|
||||||
|
margin: const EdgeInsets.only(bottom: 12),
|
||||||
|
child: ListTile(
|
||||||
|
leading: CircleAvatar(
|
||||||
|
backgroundColor: HomeConfig.primaryColor,
|
||||||
|
child: Text(
|
||||||
|
team['name'][0].toUpperCase(),
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
team['name'],
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
subtitle: Text("Época: ${team['season']}"),
|
||||||
|
trailing: IconButton(
|
||||||
|
icon: const Icon(Icons.delete, color: Colors.red),
|
||||||
|
onPressed: () {
|
||||||
|
// Confirmação antes de apagar (Opcional, mas recomendado)
|
||||||
|
_teamController.deleteTeam(team['id']);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildHomeContent() {
|
Widget _buildHomeContent() {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:playmaker/pages/home.dart';
|
import 'package:playmaker/controllers/login_controller.dart';
|
||||||
import '../widgets/login_widgets.dart';
|
import '../widgets/login_widgets.dart';
|
||||||
import '../../Controllers/login_controller.dart';
|
import 'home.dart'; // <--- IMPORTANTE: Importa a tua HomeScreen
|
||||||
|
|
||||||
class LoginPage extends StatefulWidget {
|
class LoginPage extends StatefulWidget {
|
||||||
const LoginPage({super.key});
|
const LoginPage({super.key});
|
||||||
@@ -34,9 +34,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
return Center(
|
return Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
// AGORA: Ocupa 60% da largura da tela, igual ao Register
|
|
||||||
width: screenWidth * 0.6,
|
width: screenWidth * 0.6,
|
||||||
// Garante que em telemóveis não fique demasiado apertado
|
|
||||||
constraints: const BoxConstraints(minWidth: 340),
|
constraints: const BoxConstraints(minWidth: 340),
|
||||||
padding: const EdgeInsets.all(32),
|
padding: const EdgeInsets.all(32),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -48,13 +46,17 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
LoginFormFields(controller: controller),
|
LoginFormFields(controller: controller),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
// AQUI ESTÁ A MUDANÇA PRINCIPAL
|
||||||
LoginButton(
|
LoginButton(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
onLoginSuccess: () {
|
onLoginSuccess: () {
|
||||||
|
// Verifica se o widget ainda está no ecrã antes de navegar
|
||||||
|
if (mounted) {
|
||||||
Navigator.pushReplacement(
|
Navigator.pushReplacement(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) => const HomeScreen()),
|
MaterialPageRoute(builder: (context) => const HomeScreen()),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
/*import 'package:flutter/material.dart';
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
||||||
import 'package:playmaker/controllers/team_controllers.dart';
|
import 'package:playmaker/controllers/team_controllers.dart';
|
||||||
import '../models/team_model.dart';
|
import '../models/team_model.dart';
|
||||||
import '../widgets/team_widgets.dart';
|
import '../widgets/team_widgets.dart';
|
||||||
@@ -13,7 +12,6 @@ class TeamsPage extends StatelessWidget {
|
|||||||
final TeamController controller = TeamController();
|
final TeamController controller = TeamController();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: StreamBuilder<QuerySnapshot>(
|
|
||||||
stream: controller.teamsStream,
|
stream: controller.teamsStream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.hasError) return const Center(child: Text('Erro ao carregar'));
|
if (snapshot.hasError) return const Center(child: Text('Erro ao carregar'));
|
||||||
@@ -57,4 +55,4 @@ class TeamsPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
@@ -126,3 +126,6 @@ class TeamStatsPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class StatsController {
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
|
||||||
|
|
||||||
class AuthService {
|
|
||||||
final FirebaseAuth _auth = FirebaseAuth.instance;
|
|
||||||
|
|
||||||
// Retorna o ID do utilizador atual
|
|
||||||
String? get currentUid => _auth.currentUser?.uid;
|
|
||||||
|
|
||||||
// Retorna o email do utilizador (útil para mostrar no perfil)
|
|
||||||
String? get currentUserEmail => _auth.currentUser?.email;
|
|
||||||
|
|
||||||
// Verifica se o utilizador está logado
|
|
||||||
bool get isLoggedIn => _auth.currentUser != null;
|
|
||||||
|
|
||||||
// Função para fazer Logout (Sair)
|
|
||||||
Future<void> signOut() async {
|
|
||||||
await _auth.signOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:playmaker/Controllers/login_controller.dart';
|
import 'package:playmaker/controllers/login_controller.dart';
|
||||||
import 'package:playmaker/pages/RegisterPage.dart';
|
import 'package:playmaker/pages/RegisterPage.dart';
|
||||||
|
|
||||||
class BasketTrackHeader extends StatelessWidget {
|
class BasketTrackHeader extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../Controllers/register_controller.dart';
|
import '../controllers/register_controller.dart'; // Garante que o caminho está certo
|
||||||
|
|
||||||
class RegisterHeader extends StatelessWidget {
|
class RegisterHeader extends StatelessWidget {
|
||||||
const RegisterHeader({super.key});
|
const RegisterHeader({super.key});
|
||||||
@@ -8,7 +8,6 @@ class RegisterHeader extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
// Mesma lógica de tamanhos do Login
|
|
||||||
final logoSize = screenWidth > 600 ? 150.0 : 100.0;
|
final logoSize = screenWidth > 600 ? 150.0 : 100.0;
|
||||||
final titleFontSize = screenWidth > 600 ? 48.0 : 36.0;
|
final titleFontSize = screenWidth > 600 ? 48.0 : 36.0;
|
||||||
final subtitleFontSize = screenWidth > 600 ? 22.0 : 18.0;
|
final subtitleFontSize = screenWidth > 600 ? 22.0 : 18.0;
|
||||||
@@ -47,7 +46,6 @@ class RegisterHeader extends StatelessWidget {
|
|||||||
class RegisterFormFields extends StatefulWidget {
|
class RegisterFormFields extends StatefulWidget {
|
||||||
final RegisterController controller;
|
final RegisterController controller;
|
||||||
|
|
||||||
|
|
||||||
const RegisterFormFields({super.key, required this.controller});
|
const RegisterFormFields({super.key, required this.controller});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -60,18 +58,33 @@ class _RegisterFormFieldsState extends State<RegisterFormFields> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
// Padding vertical idêntico ao login
|
|
||||||
final verticalPadding = screenWidth > 600 ? 22.0 : 16.0;
|
final verticalPadding = screenWidth > 600 ? 22.0 : 16.0;
|
||||||
|
|
||||||
return Column(
|
// IMPORTANTE: Envolvemos tudo num Form usando a chave do controller
|
||||||
|
return Form(
|
||||||
|
key: widget.controller.formKey,
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
// Campo Nome (Opcional, mas útil)
|
||||||
|
TextFormField(
|
||||||
|
controller: widget.controller.nameController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: 'Nome Completo',
|
||||||
|
prefixIcon: const Icon(Icons.person_outline),
|
||||||
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
|
contentPadding: EdgeInsets.symmetric(vertical: verticalPadding, horizontal: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
// Campo Email
|
||||||
|
TextFormField(
|
||||||
controller: widget.controller.emailController,
|
controller: widget.controller.emailController,
|
||||||
|
// Validação automática ligada ao controller
|
||||||
|
validator: widget.controller.validateEmail,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'E-mail',
|
labelText: 'E-mail',
|
||||||
prefixIcon: const Icon(Icons.email_outlined),
|
prefixIcon: const Icon(Icons.email_outlined),
|
||||||
// O erro agora vem diretamente do controller
|
|
||||||
errorText: widget.controller.emailError,
|
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: verticalPadding, horizontal: 16),
|
contentPadding: EdgeInsets.symmetric(vertical: verticalPadding, horizontal: 16),
|
||||||
),
|
),
|
||||||
@@ -80,13 +93,13 @@ class _RegisterFormFieldsState extends State<RegisterFormFields> {
|
|||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
// Campo Password
|
// Campo Password
|
||||||
TextField(
|
TextFormField(
|
||||||
controller: widget.controller.passwordController,
|
controller: widget.controller.passwordController,
|
||||||
obscureText: _obscurePassword,
|
obscureText: _obscurePassword,
|
||||||
|
validator: widget.controller.validatePassword,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'Palavra-passe',
|
labelText: 'Palavra-passe',
|
||||||
prefixIcon: const Icon(Icons.lock_outlined),
|
prefixIcon: const Icon(Icons.lock_outlined),
|
||||||
errorText: widget.controller.passwordError,
|
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
icon: Icon(_obscurePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined),
|
icon: Icon(_obscurePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined),
|
||||||
onPressed: () => setState(() => _obscurePassword = !_obscurePassword),
|
onPressed: () => setState(() => _obscurePassword = !_obscurePassword),
|
||||||
@@ -98,37 +111,35 @@ class _RegisterFormFieldsState extends State<RegisterFormFields> {
|
|||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
// Campo Confirmar Password
|
// Campo Confirmar Password
|
||||||
TextField(
|
TextFormField(
|
||||||
controller: widget.controller.confirmPasswordController,
|
controller: widget.controller.confirmPasswordController,
|
||||||
obscureText: _obscurePassword,
|
obscureText: _obscurePassword,
|
||||||
|
validator: widget.controller.validateConfirmPassword,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'Confirmar Palavra-passe',
|
labelText: 'Confirmar Palavra-passe',
|
||||||
prefixIcon: const Icon(Icons.lock_clock_outlined),
|
prefixIcon: const Icon(Icons.lock_clock_outlined),
|
||||||
errorText: widget.controller.confirmPasswordError,
|
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: verticalPadding, horizontal: 16),
|
contentPadding: EdgeInsets.symmetric(vertical: verticalPadding, horizontal: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RegisterButton extends StatelessWidget {
|
class RegisterButton extends StatelessWidget {
|
||||||
final RegisterController controller;
|
final RegisterController controller;
|
||||||
final VoidCallback onRegisterSuccess;
|
|
||||||
|
|
||||||
const RegisterButton({
|
const RegisterButton({
|
||||||
super.key,
|
super.key,
|
||||||
required this.controller,
|
required this.controller,
|
||||||
required this.onRegisterSuccess,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
// Mesmos tamanhos exatos do LoginButton
|
|
||||||
final buttonHeight = screenWidth > 600 ? 70.0 : 58.0;
|
final buttonHeight = screenWidth > 600 ? 70.0 : 58.0;
|
||||||
final fontSize = screenWidth > 600 ? 22.0 : 18.0;
|
final fontSize = screenWidth > 600 ? 22.0 : 18.0;
|
||||||
|
|
||||||
@@ -136,12 +147,8 @@ class RegisterButton extends StatelessWidget {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: buttonHeight,
|
height: buttonHeight,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: controller.isLoading ? null : () async {
|
// Passamos o context para o controller lidar com as SnackBars e Navegação
|
||||||
final success = await controller.signUp();
|
onPressed: controller.isLoading ? null : () => controller.signUp(context),
|
||||||
if (success) {
|
|
||||||
onRegisterSuccess();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: const Color(0xFFE74C3C),
|
backgroundColor: const Color(0xFFE74C3C),
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
|
|||||||
@@ -6,6 +6,14 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <gtk/gtk_plugin.h>
|
||||||
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
|
g_autoptr(FlPluginRegistrar) gtk_registrar =
|
||||||
|
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
|
||||||
|
gtk_plugin_register_with_registrar(gtk_registrar);
|
||||||
|
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||||
|
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||||
|
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
gtk
|
||||||
|
url_launcher_linux
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|||||||
@@ -5,12 +5,14 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import cloud_firestore
|
import app_links
|
||||||
import firebase_auth
|
import path_provider_foundation
|
||||||
import firebase_core
|
import shared_preferences_foundation
|
||||||
|
import url_launcher_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
|
AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
|
||||||
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
}
|
}
|
||||||
|
|||||||
468
pubspec.lock
468
pubspec.lock
@@ -1,14 +1,46 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
_flutterfire_internals:
|
adaptive_number:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _flutterfire_internals
|
name: adaptive_number
|
||||||
sha256: e4a1b612fd2955908e26116075b3a4baf10c353418ca645b4deae231c82bf144
|
sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.65"
|
version: "1.0.0"
|
||||||
|
app_links:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: app_links
|
||||||
|
sha256: "5f88447519add627fe1cbcab4fd1da3d4fed15b9baf29f28b22535c95ecee3e8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.4.1"
|
||||||
|
app_links_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: app_links_linux
|
||||||
|
sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.3"
|
||||||
|
app_links_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: app_links_platform_interface
|
||||||
|
sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.2"
|
||||||
|
app_links_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: app_links_web
|
||||||
|
sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -41,30 +73,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
cloud_firestore:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: cloud_firestore
|
|
||||||
sha256: "88abd6dc7786c23c8b5e434901bb0d79176414e52e9ab50a8e52552ff6148d7a"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "6.1.1"
|
|
||||||
cloud_firestore_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cloud_firestore_platform_interface
|
|
||||||
sha256: "573d4b4ebc56ba573dc9bac88b65bdb991cc5b66a885a62c7ab8dd1e2eaa0944"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "7.0.5"
|
|
||||||
cloud_firestore_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cloud_firestore_web
|
|
||||||
sha256: c1ef53308a09d475503f75b658b65fae32af24047d03bba0713098f882ed187f
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "5.1.1"
|
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -73,6 +81,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.19.1"
|
version: "1.19.1"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.7"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -81,6 +105,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.8"
|
version: "1.0.8"
|
||||||
|
dart_jsonwebtoken:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: dart_jsonwebtoken
|
||||||
|
sha256: "0de65691c1d736e9459f22f654ddd6fd8368a271d4e41aa07e53e6301eff5075"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.3.1"
|
||||||
|
ed25519_edwards:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ed25519_edwards
|
||||||
|
sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.1"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -89,54 +129,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.3"
|
version: "1.3.3"
|
||||||
firebase_auth:
|
ffi:
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: firebase_auth
|
|
||||||
sha256: e54fb3ba57de041d832574126a37726eedf0f57400869f1942b0ca8ce4a6e209
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "6.1.2"
|
|
||||||
firebase_auth_platform_interface:
|
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: firebase_auth_platform_interface
|
name: ffi
|
||||||
sha256: "421f95dc553cb283ed9d4d140e719800c0331d49ed37b962e513c9d1d61b090b"
|
sha256: d07d37192dbf97461359c1518788f203b0c9102cfd2c35a716b823741219542c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.4"
|
version: "2.1.5"
|
||||||
firebase_auth_web:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: firebase_auth_web
|
name: file
|
||||||
sha256: a064ffee202f7d42d62e2c01775899d4ffcb83c602af07632f206acd46a0964e
|
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.0"
|
version: "7.0.1"
|
||||||
firebase_core:
|
fixnum:
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: firebase_core
|
|
||||||
sha256: "29cfa93c771d8105484acac340b5ea0835be371672c91405a300303986f4eba9"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.3.0"
|
|
||||||
firebase_core_platform_interface:
|
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: firebase_core_platform_interface
|
name: fixnum
|
||||||
sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64
|
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.2"
|
version: "1.1.1"
|
||||||
firebase_core_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: firebase_core_web
|
|
||||||
sha256: a631bbfbfa26963d68046aed949df80b228964020e9155b086eff94f462bbf1f
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.3.1"
|
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -160,6 +176,30 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
functions_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: functions_client
|
||||||
|
sha256: "94074d62167ae634127ef6095f536835063a7dc80f2b1aa306d2346ff9023996"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.0"
|
||||||
|
gotrue:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: gotrue
|
||||||
|
sha256: f7b52008311941a7c3e99f9590c4ee32dfc102a5442e43abf1b287d9f8cc39b2
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.18.0"
|
||||||
|
gtk:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: gtk
|
||||||
|
sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -176,6 +216,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.2"
|
version: "4.1.2"
|
||||||
|
jwt_decode:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: jwt_decode
|
||||||
|
sha256: d2e9f68c052b2225130977429d30f187aa1981d789c76ad104a32243cfdebfbb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.1"
|
||||||
leak_tracker:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -208,6 +256,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.1"
|
version: "5.1.1"
|
||||||
|
logging:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logging
|
||||||
|
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -232,6 +288,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.0"
|
version: "1.17.0"
|
||||||
|
mime:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: mime
|
||||||
|
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -248,6 +312,62 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
|
path_provider:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider
|
||||||
|
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.5"
|
||||||
|
path_provider_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_android
|
||||||
|
sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.22"
|
||||||
|
path_provider_foundation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_foundation
|
||||||
|
sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.1"
|
||||||
|
path_provider_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_linux
|
||||||
|
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.1"
|
||||||
|
path_provider_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_platform_interface
|
||||||
|
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
path_provider_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_windows
|
||||||
|
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.0"
|
||||||
|
platform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: platform
|
||||||
|
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.6"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -256,6 +376,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.8"
|
version: "2.1.8"
|
||||||
|
pointycastle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pointycastle
|
||||||
|
sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
postgrest:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: postgrest
|
||||||
|
sha256: f4b6bb24b465c47649243ef0140475de8a0ec311dc9c75ebe573b2dcabb10460
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.6.0"
|
||||||
provider:
|
provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -264,6 +400,86 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.5+1"
|
version: "6.1.5+1"
|
||||||
|
realtime_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: realtime_client
|
||||||
|
sha256: "5268afc208d02fb9109854d262c1ebf6ece224cd285199ae1d2f92d2ff49dbf1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.7.0"
|
||||||
|
retry:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: retry
|
||||||
|
sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
|
rxdart:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: rxdart
|
||||||
|
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.28.0"
|
||||||
|
shared_preferences:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences
|
||||||
|
sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.4"
|
||||||
|
shared_preferences_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_android
|
||||||
|
sha256: "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.18"
|
||||||
|
shared_preferences_foundation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_foundation
|
||||||
|
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.6"
|
||||||
|
shared_preferences_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_linux
|
||||||
|
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
|
shared_preferences_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_platform_interface
|
||||||
|
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
|
shared_preferences_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_web
|
||||||
|
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.3"
|
||||||
|
shared_preferences_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shared_preferences_windows
|
||||||
|
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -285,6 +501,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.1"
|
version: "1.12.1"
|
||||||
|
storage_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: storage_client
|
||||||
|
sha256: "1c61b19ed9e78f37fdd1ca8b729ab8484e6c8fe82e15c87e070b861951183657"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -301,6 +525,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.1"
|
version: "1.4.1"
|
||||||
|
supabase:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: supabase
|
||||||
|
sha256: cc039f63a3168386b3a4f338f3bff342c860d415a3578f3fbe854024aee6f911
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.2"
|
||||||
|
supabase_flutter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: supabase_flutter
|
||||||
|
sha256: "92b2416ecb6a5c3ed34cf6e382b35ce6cc8921b64f2a9299d5d28968d42b09bb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.12.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -325,6 +565,70 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.0"
|
||||||
|
url_launcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher
|
||||||
|
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.3.2"
|
||||||
|
url_launcher_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_android
|
||||||
|
sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.3.28"
|
||||||
|
url_launcher_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_ios
|
||||||
|
sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.3.6"
|
||||||
|
url_launcher_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_linux
|
||||||
|
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.2"
|
||||||
|
url_launcher_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_macos
|
||||||
|
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.5"
|
||||||
|
url_launcher_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_platform_interface
|
||||||
|
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.2"
|
||||||
|
url_launcher_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_web
|
||||||
|
sha256: d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.2"
|
||||||
|
url_launcher_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_windows
|
||||||
|
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.5"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -349,6 +653,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.1"
|
||||||
|
web_socket:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web_socket
|
||||||
|
sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
|
web_socket_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web_socket_channel
|
||||||
|
sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
|
xdg_directories:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xdg_directories
|
||||||
|
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
yet_another_json_isolate:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yet_another_json_isolate
|
||||||
|
sha256: fe45897501fa156ccefbfb9359c9462ce5dec092f05e8a56109db30be864f01e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.9.2 <4.0.0"
|
dart: ">=3.10.0 <4.0.0"
|
||||||
flutter: ">=3.22.0"
|
flutter: ">=3.38.0"
|
||||||
|
|||||||
@@ -35,9 +35,7 @@ dependencies:
|
|||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
provider: ^6.1.5+1
|
provider: ^6.1.5+1
|
||||||
firebase_core: ^4.2.1
|
supabase_flutter: ^2.12.0
|
||||||
firebase_auth: ^6.1.2
|
|
||||||
cloud_firestore: ^6.1.1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -6,15 +6,12 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <cloud_firestore/cloud_firestore_plugin_c_api.h>
|
#include <app_links/app_links_plugin_c_api.h>
|
||||||
#include <firebase_auth/firebase_auth_plugin_c_api.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
CloudFirestorePluginCApiRegisterWithRegistrar(
|
AppLinksPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("CloudFirestorePluginCApi"));
|
registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
|
||||||
FirebaseAuthPluginCApiRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
|
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||||
FirebaseCorePluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
cloud_firestore
|
app_links
|
||||||
firebase_auth
|
url_launcher_windows
|
||||||
firebase_core
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|||||||
Reference in New Issue
Block a user