Skip to content

Commit

Permalink
[FEAT] Rota de login adicionada ao menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JAugustoM committed Dec 17, 2024
1 parent 5a2d268 commit 77aa3de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion catavento/lib/constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const loginRoute = "/login/";
const homeRoute = "/home/";
const crudFuncionariosRoute = "/dashboardEmployees";
const crudFuncionariosRoute = "/dashboardEmployees/";
const supabaseUrl = 'https://gfxmrqhwjqekfzrlurqr.supabase.co';
const supabaseKey = String.fromEnvironment('ANON_KEY');
const timeFormat = 'yyyy-MM-dd HH:mm:ss';
3 changes: 1 addition & 2 deletions catavento/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:catavento/bloc/demanda_bloc.dart';
import 'package:catavento/constants.dart';
import 'package:catavento/views/login_view.dart';
import 'screens/DashboardAdmin/dashboard_admin.dart';
import 'package:catavento/screens/Login/login.dart';
import 'package:catavento/screens/dashboardFuncionarios/employee-management.dart';
Expand All @@ -21,7 +20,7 @@ void main() {
),
home: const LoadView(),
routes: {
loginRoute: (context) => const LoginView(),
loginRoute: (context) => const Login(),
homeRoute: (context) => const DashBoardAdmin(),
crudFuncionariosRoute: (context) => EmployeeManagement(),
},
Expand Down
9 changes: 6 additions & 3 deletions catavento/lib/shared/widgets/menu.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:catavento/constants.dart';
import 'package:flutter/material.dart';

class Navbar extends StatelessWidget {
Expand Down Expand Up @@ -28,13 +29,13 @@ class Navbar extends StatelessWidget {
ListTile(
title: const Text('Demandas'),
onTap: () {
Navigator.pushNamed(context, '/home/');
Navigator.pushNamed(context, homeRoute);
},
),
ListTile(
title: const Text('Funcionários'),
onTap: () {
Navigator.pushNamed(context, '/dashboardEmployees');
Navigator.pushNamed(context, crudFuncionariosRoute);
},
),
ListTile(
Expand All @@ -43,7 +44,9 @@ class Navbar extends StatelessWidget {
),
ListTile(
title: const Text('Sair da Conta'),
onTap: () {},
onTap: () {
Navigator.pushNamed(context, loginRoute);
},
),
],
),
Expand Down

0 comments on commit 77aa3de

Please sign in to comment.