From 191e2fc28b6fbb5ea535f0ca2c3b8ec8b3de902b Mon Sep 17 00:00:00 2001 From: ablesoftwaredev <48694187+ablesoftwaredev@users.noreply.github.com> Date: Fri, 23 Jul 2021 00:12:04 +0200 Subject: [PATCH] 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. --- web/docs/guides/client-libraries.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/docs/guides/client-libraries.mdx b/web/docs/guides/client-libraries.mdx index 3daeea8ba50..8bbbf6e4488 100755 --- a/web/docs/guides/client-libraries.mdx +++ b/web/docs/guides/client-libraries.mdx @@ -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) {