update
This commit is contained in:
parent
b6b7ab6e84
commit
3e6781a0bd
5 changed files with 17 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
||||
// import 'package:pharmacy_mobile/pages/index_page.dart';
|
||||
// import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
||||
import 'package:pharmacy_mobile/pages/index_page.dart';
|
||||
import 'package:pharmacy_mobile/pages/login_page.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:pharmacy_mobile/pages/main_page.dart';
|
||||
|
|
@ -26,15 +26,13 @@ Future<void> main() async {
|
|||
runApp(MyApp());
|
||||
}
|
||||
|
||||
final supabase = Supabase.instance.client;
|
||||
|
||||
final _router = GoRouter(
|
||||
initialLocation: '/',
|
||||
routes: [
|
||||
GoRoute(
|
||||
name: 'index', // Optional, add name to your routes. Allows you navigate by name instead of path
|
||||
path: '/',
|
||||
builder: (context, state) => AuthGate(),
|
||||
builder: (context, state) => IndexPage(),
|
||||
),
|
||||
GoRoute(
|
||||
name: 'login',
|
||||
|
|
@ -61,6 +59,7 @@ class MyApp extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp.router(
|
||||
debugShowCheckedModeBanner: false,
|
||||
// initialRoute: '/',
|
||||
// routes: {
|
||||
// '/': (context) => const IndexPage(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue