File tree Expand file tree Collapse file tree 2 files changed +11
-16
lines changed
demos/local-only-todolist/lib/widgets Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,14 @@ class _LoginPageState extends State<LoginPage> {
32
32
_error = null ;
33
33
});
34
34
try {
35
- try {
36
- await Supabase .instance.client.auth.signInWithPassword (
37
- email: _usernameController.text,
38
- password: _passwordController.text);
39
- } catch (e) {
40
- print (e);
41
- rethrow ;
42
- }
43
- if (context.mounted) {
44
- // We connect and upgrade the database schema here so that by the time the watch() calls are made in the
45
- // ListsPage, watch will track the new tables instead..
46
- await connectDatabase ();
35
+ await Supabase .instance.client.auth.signInWithPassword (
36
+ email: _usernameController.text, password: _passwordController.text);
47
37
38
+ // We connect and upgrade the database schema here so that by the time the watch() calls are made in the
39
+ // ListsPage, watch will track the new tables instead..
40
+ await connectDatabase ();
41
+
42
+ if (context.mounted) {
48
43
Navigator .of (context).pushReplacement (MaterialPageRoute (
49
44
builder: (context) => listsPage,
50
45
));
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ class _SignupPageState extends State<SignupPage> {
35
35
final response = await Supabase .instance.client.auth.signUp (
36
36
email: _usernameController.text, password: _passwordController.text);
37
37
38
+ // We connect and upgrade the database schema here so that by the time the watch() calls are made in the
39
+ // ListsPage, watch will track the new tables instead..
40
+ await connectDatabase ();
41
+
38
42
if (context.mounted) {
39
43
if (response.session != null ) {
40
- // We connect and upgrade the database schema here so that by the time the watch() calls are made in the
41
- // ListsPage, watch will track the new tables instead..
42
- await connectDatabase ();
43
-
44
44
Navigator .of (context).pushReplacement (MaterialPageRoute (
45
45
builder: (context) => homePage,
46
46
));
You can’t perform that action at this time.
0 commit comments