tentative de firebase
parent
bd89eba772
commit
8e179df1dc
|
|
@ -37,6 +37,16 @@ android {
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adicione no FINAL do arquivo:
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// Dependências do Firebase que você vai usar
|
||||||
|
implementation 'com.google.firebase:firebase-analytics'
|
||||||
|
// Adicione outras conforme necessário
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "123456789012",
|
||||||
|
"project_id": "playmaker-basketball",
|
||||||
|
"storage_bucket": "playmaker-basketball.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
|
|
@ -22,3 +22,9 @@ subprojects {
|
||||||
tasks.register<Delete>("clean") {
|
tasks.register<Delete>("clean") {
|
||||||
delete(rootProject.layout.buildDirectory)
|
delete(rootProject.layout.buildDirectory)
|
||||||
}
|
}
|
||||||
|
buildscript {
|
||||||
|
dependencies {
|
||||||
|
// Adicione esta linha:
|
||||||
|
classpath 'com.google.gms:google-services:4.4.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,32 +5,37 @@ class HomeConfig {
|
||||||
static const double cardwidthPadding = 400;
|
static const double cardwidthPadding = 400;
|
||||||
static const double cardheightPadding = 300;
|
static const double cardheightPadding = 300;
|
||||||
|
|
||||||
// Cores principais
|
// Cores
|
||||||
static const Color primaryColor = Colors.orange;
|
static const Color primaryColor = Colors.orange;
|
||||||
static const Color secondaryColor = Colors.blue;
|
|
||||||
static const Color accentColor = Colors.green;
|
// Espaçamentos
|
||||||
|
static const double cardSpacing = 20;
|
||||||
|
static const double cardMargin = 10;
|
||||||
|
|
||||||
// Estilos de texto
|
// Estilos de texto
|
||||||
static TextStyle titleStyle = TextStyle(
|
static TextStyle titleStyle = TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Colors.white,
|
color: Colors.white.withOpacity(0.9),
|
||||||
|
letterSpacing: 1.5,
|
||||||
);
|
);
|
||||||
|
|
||||||
static TextStyle subtitleStyle = TextStyle(
|
static TextStyle playerNameStyle = TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 18,
|
||||||
color: Colors.white.withOpacity(0.8),
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.white,
|
||||||
);
|
);
|
||||||
|
|
||||||
static TextStyle statValueStyle = TextStyle(
|
static TextStyle statValueStyle = TextStyle(
|
||||||
fontSize: 36,
|
fontSize: 42,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
static TextStyle statLabelStyle = TextStyle(
|
static TextStyle statLabelStyle = TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 14,
|
||||||
color: Colors.white.withOpacity(0.8),
|
color: Colors.white.withOpacity(0.8),
|
||||||
letterSpacing: 1.5,
|
letterSpacing: 2,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HomeController extends ChangeNotifier {
|
||||||
|
// Se precisar de estado para a home screen
|
||||||
|
int _selectedCardIndex = 0;
|
||||||
|
|
||||||
|
int get selectedCardIndex => _selectedCardIndex;
|
||||||
|
|
||||||
|
void selectCard(int index) {
|
||||||
|
_selectedCardIndex = index;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Métodos adicionais para lógica da home
|
||||||
|
void navigateToDetails(String playerName) {
|
||||||
|
print('Navegando para detalhes de $playerName');
|
||||||
|
// Implementar navegação
|
||||||
|
}
|
||||||
|
|
||||||
|
void refreshData() {
|
||||||
|
print('Atualizando dados da home...');
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -73,7 +73,7 @@ class _PieChartCardState extends State<PieChartCard> with SingleTickerProviderSt
|
||||||
width: HomeConfig.cardwidthPadding,
|
width: HomeConfig.cardwidthPadding,
|
||||||
height: HomeConfig.cardheightPadding,
|
height: HomeConfig.cardheightPadding,
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 8,
|
elevation: 0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SportStat {
|
||||||
|
final String title;
|
||||||
|
final String playerName;
|
||||||
|
final String statValue;
|
||||||
|
final String statLabel;
|
||||||
|
final Color color;
|
||||||
|
final IconData icon;
|
||||||
|
final bool isHighlighted;
|
||||||
|
|
||||||
|
const SportStat({
|
||||||
|
required this.title,
|
||||||
|
required this.playerName,
|
||||||
|
required this.statValue,
|
||||||
|
required this.statLabel,
|
||||||
|
required this.color,
|
||||||
|
required this.icon,
|
||||||
|
this.isHighlighted = false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class HomeData {
|
||||||
|
static List<SportStat> get sportStats => [
|
||||||
|
SportStat(
|
||||||
|
title: 'Mais Pontos',
|
||||||
|
playerName: 'Michael Jordan',
|
||||||
|
statValue: '34.5',
|
||||||
|
statLabel: 'PPG',
|
||||||
|
color: Colors.blue[800]!,
|
||||||
|
icon: Icons.sports_basketball,
|
||||||
|
isHighlighted: true,
|
||||||
|
),
|
||||||
|
SportStat(
|
||||||
|
title: 'Mais Assistências',
|
||||||
|
playerName: 'Magic Johnson',
|
||||||
|
statValue: '12.8',
|
||||||
|
statLabel: 'APG',
|
||||||
|
color: Colors.green[800]!,
|
||||||
|
icon: Icons.sports_basketball,
|
||||||
|
isHighlighted: false,
|
||||||
|
),
|
||||||
|
SportStat(
|
||||||
|
title: 'Mais Rebotes',
|
||||||
|
playerName: 'Dennis Rodman',
|
||||||
|
statValue: '15.3',
|
||||||
|
statLabel: 'RPG',
|
||||||
|
color: Colors.purple[800]!,
|
||||||
|
icon: Icons.sports_basketball,
|
||||||
|
isHighlighted: false,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -2,9 +2,41 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:playmaker/classe/home.config.dart';
|
import 'package:playmaker/classe/home.config.dart';
|
||||||
import 'package:playmaker/grafico%20de%20pizza/grafico.dart';
|
import 'package:playmaker/grafico%20de%20pizza/grafico.dart';
|
||||||
|
|
||||||
class HomeScreen extends StatelessWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
const HomeScreen({super.key});
|
const HomeScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeScreen> createState() => _HomeScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeScreenState extends State<HomeScreen> {
|
||||||
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
|
void _onItemSelected(int index) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Navegação entre telas
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
// Já está na Home
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
print('Navegar para tela de Jogo');
|
||||||
|
Navigator.push(context, MaterialPageRoute(builder: (_) => GameScreen()));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
print('Navegar para tela de Equipas');
|
||||||
|
// Navigator.push(context, MaterialPageRoute(builder: (_) => TeamsScreen()));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
print('Navegar para tela de Status');
|
||||||
|
// Navigator.push(context, MaterialPageRoute(builder: (_) => StatusScreen()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -22,6 +54,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// Primeira linha com 2 cards
|
// Primeira linha com 2 cards
|
||||||
Row(
|
Row(
|
||||||
|
|
@ -40,14 +73,14 @@ class HomeScreen extends StatelessWidget {
|
||||||
|
|
||||||
SizedBox(width: 20),
|
SizedBox(width: 20),
|
||||||
|
|
||||||
// Card 2 - Estatísticas de Futebol
|
// Card 2 - Estatísticas de Basquete (corrigido)
|
||||||
_buildStatCard(
|
_buildStatCard(
|
||||||
title: 'Mais Assistências',
|
title: 'Mais Assistências',
|
||||||
playerName: 'magic Johnson',
|
playerName: 'Magic Johnson',
|
||||||
statValue: '12.8',
|
statValue: '12.8',
|
||||||
statLabel: 'APG',
|
statLabel: 'APG',
|
||||||
color: Colors.green[800]!,
|
color: Colors.green[800]!,
|
||||||
icon: Icons.sports_soccer,
|
icon: Icons.sports_basketball, // Corrigido para basquete
|
||||||
isHighlighted: false,
|
isHighlighted: false,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -59,20 +92,20 @@ class HomeScreen extends StatelessWidget {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
// Card 3 - Estatísticas de Tênis
|
// Card 3 - Estatísticas de Basquete (corrigido)
|
||||||
_buildStatCard(
|
_buildStatCard(
|
||||||
title: 'Mais Rebotes',
|
title: 'Mais Rebotes',
|
||||||
playerName: 'Denis Rodman',
|
playerName: 'Dennis Rodman',
|
||||||
statValue: '15.3',
|
statValue: '15.3',
|
||||||
statLabel: 'RPG',
|
statLabel: 'RPG',
|
||||||
color: Colors.purple[800]!,
|
color: Colors.purple[800]!,
|
||||||
icon: Icons.sports_tennis,
|
icon: Icons.sports_basketball, // Corrigido para basquete
|
||||||
isHighlighted: false,
|
isHighlighted: false,
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(width: 20),
|
SizedBox(width: 20),
|
||||||
|
|
||||||
// Card 4 - Estatísticas de Vôlei
|
// Card 4 - Gráfico
|
||||||
PieChartCard(
|
PieChartCard(
|
||||||
title: 'DESEMPENHO',
|
title: 'DESEMPENHO',
|
||||||
subtitle: 'Vitórias vs Derrotas',
|
subtitle: 'Vitórias vs Derrotas',
|
||||||
|
|
@ -83,10 +116,54 @@ class HomeScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 40),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
'Histórico de Jogos',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// ⬇️⬇️⬇️ NAVIGATION BAR AQUI ⬇️⬇️⬇️
|
||||||
|
bottomNavigationBar: NavigationBar(
|
||||||
|
selectedIndex: _selectedIndex,
|
||||||
|
onDestinationSelected: _onItemSelected,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
|
surfaceTintColor: Theme.of(context).colorScheme.surfaceTint,
|
||||||
|
elevation: 1,
|
||||||
|
height: 70,
|
||||||
|
destinations: const [
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.home_outlined),
|
||||||
|
selectedIcon: Icon(Icons.home_filled),
|
||||||
|
label: 'Home',
|
||||||
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.sports_soccer_outlined),
|
||||||
|
selectedIcon: Icon(Icons.sports_soccer),
|
||||||
|
label: 'Jogo',
|
||||||
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.people_outline),
|
||||||
|
selectedIcon: Icon(Icons.people),
|
||||||
|
label: 'Equipas',
|
||||||
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.insights_outlined),
|
||||||
|
selectedIcon: Icon(Icons.insights),
|
||||||
|
label: 'Status',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +181,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
width: HomeConfig.cardwidthPadding,
|
width: HomeConfig.cardwidthPadding,
|
||||||
height: HomeConfig.cardheightPadding,
|
height: HomeConfig.cardheightPadding,
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: isHighlighted ? 12 : 8,
|
elevation: 0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
side: isHighlighted
|
side: isHighlighted
|
||||||
|
|
@ -122,13 +199,6 @@ class HomeScreen extends StatelessWidget {
|
||||||
color.withOpacity(0.7),
|
color.withOpacity(0.7),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: color.withOpacity(0.3),
|
|
||||||
blurRadius: 15,
|
|
||||||
spreadRadius: 2,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
|
@ -257,3 +327,4 @@ class HomeScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:playmaker/classe/home.config.dart';
|
||||||
|
|
||||||
|
class StatCard extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final String playerName;
|
||||||
|
final String statValue;
|
||||||
|
final String statLabel;
|
||||||
|
final Color color;
|
||||||
|
final IconData icon;
|
||||||
|
final bool isHighlighted;
|
||||||
|
final VoidCallback? onTap;
|
||||||
|
|
||||||
|
const StatCard({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
required this.playerName,
|
||||||
|
required this.statValue,
|
||||||
|
required this.statLabel,
|
||||||
|
required this.color,
|
||||||
|
required this.icon,
|
||||||
|
this.isHighlighted = false,
|
||||||
|
this.onTap,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: HomeConfig.cardwidthPadding,
|
||||||
|
height: HomeConfig.cardheightPadding,
|
||||||
|
child: Card(
|
||||||
|
elevation: 0,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
side: isHighlighted
|
||||||
|
? BorderSide(color: Colors.amber, width: 2)
|
||||||
|
: BorderSide.none,
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
color.withOpacity(0.9),
|
||||||
|
color.withOpacity(0.7),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Cabeçalho
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title.toUpperCase(),
|
||||||
|
style: HomeConfig.titleStyle,
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
playerName,
|
||||||
|
style: HomeConfig.playerNameStyle,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isHighlighted)
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.amber,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.star,
|
||||||
|
size: 20,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 10),
|
||||||
|
|
||||||
|
// Ícone
|
||||||
|
Container(
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white.withOpacity(0.2),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
icon,
|
||||||
|
size: 30,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Spacer(),
|
||||||
|
|
||||||
|
// Estatística
|
||||||
|
Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
statValue,
|
||||||
|
style: HomeConfig.statValueStyle,
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
statLabel.toUpperCase(),
|
||||||
|
style: HomeConfig.statLabelStyle,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Spacer(),
|
||||||
|
|
||||||
|
// Botão
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white.withOpacity(0.2),
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'VER DETALHES',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 14,
|
||||||
|
letterSpacing: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SportGrid extends StatelessWidget {
|
||||||
|
final List<Widget> children;
|
||||||
|
final double spacing;
|
||||||
|
|
||||||
|
const SportGrid({
|
||||||
|
super.key,
|
||||||
|
required this.children,
|
||||||
|
this.spacing = HomeConfig.cardSpacing,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (children.isEmpty) return SizedBox();
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
// Primeira linha
|
||||||
|
if (children.length >= 2)
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(bottom: spacing),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
children[0],
|
||||||
|
SizedBox(width: spacing),
|
||||||
|
children[1],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Segunda linha
|
||||||
|
if (children.length >= 4)
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
children[2],
|
||||||
|
SizedBox(width: spacing),
|
||||||
|
children[3],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,10 @@
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
import firebase_auth
|
||||||
|
import firebase_core
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
||||||
|
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
103
pubspec.lock
103
pubspec.lock
|
|
@ -1,6 +1,14 @@
|
||||||
# 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:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _flutterfire_internals
|
||||||
|
sha256: "8a1f5f3020ef2a74fb93f7ab3ef127a8feea33a7a2276279113660784ee7516a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.64"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -57,6 +65,54 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.3"
|
version: "1.3.3"
|
||||||
|
firebase_auth:
|
||||||
|
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
|
||||||
|
description:
|
||||||
|
name: firebase_auth_platform_interface
|
||||||
|
sha256: "421f95dc553cb283ed9d4d140e719800c0331d49ed37b962e513c9d1d61b090b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "8.1.4"
|
||||||
|
firebase_auth_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_auth_web
|
||||||
|
sha256: a064ffee202f7d42d62e2c01775899d4ffcb83c602af07632f206acd46a0964e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.1.0"
|
||||||
|
firebase_core:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_core
|
||||||
|
sha256: "1f2dfd9f535d81f8b06d7a50ecda6eac1e6922191ed42e09ca2c84bd2288927c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.2.1"
|
||||||
|
firebase_core_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_platform_interface
|
||||||
|
sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.2"
|
||||||
|
firebase_core_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_web
|
||||||
|
sha256: ff18fabb0ad0ed3595d2f2c85007ecc794aadecdff5b3bb1460b7ee47cded398
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.3.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -75,6 +131,27 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_web_plugins:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
http:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http
|
||||||
|
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.6.0"
|
||||||
|
http_parser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_parser
|
||||||
|
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.2"
|
||||||
leak_tracker:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -147,6 +224,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
|
plugin_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: plugin_platform_interface
|
||||||
|
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.8"
|
||||||
provider:
|
provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -208,6 +293,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.7"
|
version: "0.7.7"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -224,6 +317,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "15.0.2"
|
version: "15.0.2"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.9.2 <4.0.0"
|
dart: ">=3.9.2 <4.0.0"
|
||||||
flutter: ">=3.18.0-18.0.pre.54"
|
flutter: ">=3.22.0"
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ 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
|
||||||
|
firebase_auth: ^6.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <firebase_auth/firebase_auth_plugin_c_api.h>
|
||||||
|
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
|
FirebaseAuthPluginCApiRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
|
||||||
|
FirebaseCorePluginCApiRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
firebase_auth
|
||||||
|
firebase_core
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue