fazer o botao de criqar personagem guardar personagem

This commit is contained in:
2026-01-13 17:15:21 +00:00
parent eeb9f0e760
commit fc527084de
5 changed files with 307 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
class Person {
final String id;
final String name;
final String type; // 'Jogador' ou 'Treinador'
final String number; // Ex: '30'
Person({required this.id, required this.name, required this.type, required this.number});
factory Person.fromFirestore(Map<String, dynamic> data, String id) {
return Person(
id: id,
name: data['name'] ?? '',
type: data['type'] ?? 'Jogador',
number: data['number'] ?? '',
);
}
}