initial commit
This commit is contained in:
commit
f1db550ee7
128 changed files with 5407 additions and 0 deletions
28
lib/commands/signup.dart
Normal file
28
lib/commands/signup.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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!');
|
||||
|
||||
// _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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue