searchData method
get data
Implementation
Future<Map?> searchData({
required String from,
required String column,
required String query,
List<String>? columns,
SupabaseClient? supabaseClient,
}) async {
var response = await client(supabaseClient: supabaseClient).from(from).select(parseColumns(columns)).textSearch(column, query);
List<Map> data = (response).cast<Map>();
if (data.isEmpty) {
return null;
}
return data.first;
}