Flutter: Insert data

Perform an INSERT into the table or view.

Parameters

Examples

Create a record

await supabase
    .from('cities')
    .insert(\{'name': 'The Shire', 'country_id': 554\});

Fetch inserted record

final List<Map<String, dynamic>> data =
        await supabase.from('cities').insert([
      \{'name': 'The Shire', 'country_id': 554\},
      \{'name': 'Rohan', 'country_id': 555\},
    ]).select();

Bulk create

await supabase.from('cities').insert([
  \{'name': 'The Shire', 'country_id': 554\},
  \{'name': 'Rohan', 'country_id': 555\},
]);