This commit is contained in:
Patrick Alvin Alcala 2025-01-22 13:14:06 +08:00
parent f1db550ee7
commit b2aeb642cc
11 changed files with 209 additions and 60 deletions

View file

@ -1,28 +1,28 @@
import 'package:supabase_flutter/supabase_flutter.dart';
import 'package:pharmacy_mobile/main.dart';
// import 'package:supabase_flutter/supabase_flutter.dart';
// import 'package:pharmacy_mobile/main.dart';
Future<void> signUp() async {
try {
await supabase.auth.signUp(
email: email,
password: password,
);
// if (mounted) {
// context.showSnackBar('Check your email for a login link!');
// Future<void> signUp() async {
// try {
// await supabase.auth.signUp(
// email: email,
// password: password,
// );
// // if (mounted) {
// // context.showSnackBar('Check your email for a login link!');
// _emailController.clear();
// }
} on AuthException catch (error) {
if (mounted) context.showSnackBar(error.message, isError: true);
} catch (error) {
if (mounted) {
context.showSnackBar('Unexpected error occurred', isError: true);
}
} finally {
if (mounted) {
setState(() {
_isLoading = false;
});
}
}
}
// // _emailController.clear();
// // }
// } on AuthException catch (error) {
// if (mounted) context.showSnackBar(error.message, isError: true);
// } catch (error) {
// if (mounted) {
// context.showSnackBar('Unexpected error occurred', isError: true);
// }
// } finally {
// if (mounted) {
// setState(() {
// _isLoading = false;
// });
// }
// }
// }