Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ app.*.symbols
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock

**/android/app/google-services.json
**/android/app/google-services.json

.env
5 changes: 2 additions & 3 deletions lib/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class _LoginPageState extends State<LoginPage> {
bool _obscurePassword = true;
bool _isLoading = false;

// 🔐 Função para login

Future<void> _login() async {
final email = _emailController.text.trim();
final password = _passwordController.text.trim();
Expand All @@ -34,7 +34,7 @@ class _LoginPageState extends State<LoginPage> {
password: password,
***REMOVED***

// Login bem-sucedido → vá para HomePage

if (mounted) {
Navigator.pushReplacement(
context,
Expand Down Expand Up @@ -130,7 +130,6 @@ class _LoginPageState extends State<LoginPage> {
***REMOVED***
const SizedBox(height: 30),

// Botão de login
MouseRegion(
cursor: SystemMouseCursors.click,
child: ElevatedButton(
Expand Down
39 changes: 22 additions & 17 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
import 'package:flutter/material.dart';
import 'who_is_using.dart'; // 👉 importa a nova página
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:firebase_core/firebase_core.dart';

import 'who_is_using.dart';
import 'login_page.dart';
import 'home_page.dart';

void main() async {
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***

// Carregar variáveis do .env
await dotenv.load(fileName: ".env");

await Firebase.initializeApp(
options: FirebaseOptions(
apiKey: dotenv.env['API_KEY']!,
authDomain: dotenv.env['AUTH_DOMAIN'],
projectId: dotenv.env['PROJECT_ID']!,
storageBucket: dotenv.env['STORAGE_BUCKET'],
messagingSenderId: dotenv.env['MESSAGING_SENDER_ID']!,
appId: dotenv.env['APP_ID']!,
measurementId: dotenv.env['MEASUREMENT_ID'],),);

runApp(const MobusApp());
}

Expand Down Expand Up @@ -57,7 +62,7 @@ class StartPage extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Ícone do app

Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
Expand All @@ -72,7 +77,7 @@ class StartPage extends StatelessWidget {
***REMOVED***
const SizedBox(height: 30),

// Texto de boas-vindas

const Text(
'Bem-vindo ao Mobus!',
style: TextStyle(
Expand Down Expand Up @@ -101,12 +106,12 @@ class StartPage extends StatelessWidget {
***REMOVED***
const SizedBox(height: 40),

// Botão "Começar"

ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => WhoIsUsingPage()), // 👉 agora abre a nova tela
MaterialPageRoute(builder: (context) => WhoIsUsingPage()),
***REMOVED***
},
style: ElevatedButton.styleFrom(
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
flutter_dotenv: ^6.0.0

dev_dependencies:
flutter_test:
Expand Down