on method

void on(
  1. String from,
  2. void callback(
    1. dynamic data
    )
)

on data

Implementation

void on(String from, void Function(dynamic data) callback) {
  if (from.isEmpty) {
    throw {"message": "Tolong isi from ya !"};
  }

  // client(supabaseClient: supabaseClient).from(from);.on(SupabaseEventTypes.all, (update) {
  //   Map json_data = {};
  //   json_data["type"] = update.eventType.toLowerCase();
  //   json_data["new_data"] = update.newRecord;
  //   json_data["old_data"] = update.oldRecord;
  //   return callback(json_data);
  // }).subscribe();
}