Refactor comments in Dart code samples

I noticed that the following comment appeared above code where intent was not to sign in user with email and password.

// Sign in user with email and password

This proposal adds relevant comments, to make code intent clearer.
This commit is contained in:
ablesoftwaredev authored and GitHub committed 2021-07-23 00:12:04 +02:00
1 parent 74bf8ff63d
commit 191e2fc28b
1 file changed
+7 -7
+7 -7
View File
@@ -116,7 +116,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// Sign in user with email and password
final response = await client
.auth
.signIn(email: 'example@email.com', password: 'example-password');
@@ -170,7 +170,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// Sign in user with email and magic link
final response = await client
.auth
.signIn(email: 'example@email.com');
@@ -270,7 +270,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// Query tables and fetch related data in one round-trip, using select()
final response = await client
.from('countries')
.select('name')
@@ -320,7 +320,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// When fetching data, use advanced filtering to only extract data, that you need.
final response = await client
.from('cities')
.select('name,country_id')
@@ -374,7 +374,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// Create data easily, using insert()
final response = await client
.from('cities')
.insert([
@@ -430,7 +430,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// Listen to realtime database changes, using subscribe()
final response = await client
.from('countries')
.on(SupabaseEventTypes.all, (payload) {
@@ -483,7 +483,7 @@ import 'package:supabase/supabase.dart';
void main() async {
final client = SupabaseClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
// You can even listen to Row Level changes
final response = await client
.from('countries:id.eq.200')
.on(SupabaseEventTypes.update, (payload) {