Skip to content

Commit 0c79c90

Browse files
committed
Fix flutter lint warnings.
1 parent 300e3c0 commit 0c79c90

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

demos/local-only-todolist/lib/widgets/login_page.dart

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,14 @@ class _LoginPageState extends State<LoginPage> {
3232
_error = null;
3333
});
3434
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);
4737

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) {
4843
Navigator.of(context).pushReplacement(MaterialPageRoute(
4944
builder: (context) => listsPage,
5045
));

demos/local-only-todolist/lib/widgets/signup_page.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ class _SignupPageState extends State<SignupPage> {
3535
final response = await Supabase.instance.client.auth.signUp(
3636
email: _usernameController.text, password: _passwordController.text);
3737

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+
3842
if (context.mounted) {
3943
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-
4444
Navigator.of(context).pushReplacement(MaterialPageRoute(
4545
builder: (context) => homePage,
4646
));

0 commit comments

Comments
 (0)