update
This commit is contained in:
parent
b6b7ab6e84
commit
3e6781a0bd
5 changed files with 17 additions and 6 deletions
6
.fvmrc
Normal file
6
.fvmrc
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"flutter": "3.27.3",
|
||||||
|
"runPubGetOnSdkChanges": true,
|
||||||
|
"updateVscodeSettings": true,
|
||||||
|
"updateGitIgnore": true
|
||||||
|
}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -43,3 +43,6 @@ app.*.map.json
|
||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
|
||||||
|
# FVM Version Cache
|
||||||
|
.fvm/
|
||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"dart.flutterSdkPath": ".fvm/versions/3.27.3"
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
// import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
||||||
// import 'package:pharmacy_mobile/pages/index_page.dart';
|
import 'package:pharmacy_mobile/pages/index_page.dart';
|
||||||
import 'package:pharmacy_mobile/pages/login_page.dart';
|
import 'package:pharmacy_mobile/pages/login_page.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:pharmacy_mobile/pages/main_page.dart';
|
import 'package:pharmacy_mobile/pages/main_page.dart';
|
||||||
|
|
@ -26,15 +26,13 @@ Future<void> main() async {
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
final supabase = Supabase.instance.client;
|
|
||||||
|
|
||||||
final _router = GoRouter(
|
final _router = GoRouter(
|
||||||
initialLocation: '/',
|
initialLocation: '/',
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'index', // Optional, add name to your routes. Allows you navigate by name instead of path
|
name: 'index', // Optional, add name to your routes. Allows you navigate by name instead of path
|
||||||
path: '/',
|
path: '/',
|
||||||
builder: (context, state) => AuthGate(),
|
builder: (context, state) => IndexPage(),
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'login',
|
name: 'login',
|
||||||
|
|
@ -61,6 +59,7 @@ class MyApp extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
// initialRoute: '/',
|
// initialRoute: '/',
|
||||||
// routes: {
|
// routes: {
|
||||||
// '/': (context) => const IndexPage(),
|
// '/': (context) => const IndexPage(),
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class MainPage extends StatelessWidget {
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
MenuWidget(
|
MenuWidget(
|
||||||
icon: FontAwesomeIcons.squarePlus,
|
icon: FontAwesomeIcons.squarePlus,
|
||||||
text: 'Add Medicine',
|
text: 'Add Generics',
|
||||||
),
|
),
|
||||||
TextButton(onPressed: () => {signOut()}, child: const Text('Logout'))
|
TextButton(onPressed: () => {signOut()}, child: const Text('Logout'))
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue