Flutter: Insert data

Perform an INSERT into the table or view.

Examples

Create a record

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

Bulk create

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

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();