Skip to content

Deleting Single Object


Future<int>"TABLE-NAME").remove({Map entity, String whereClause});
Future<int><E>().remove({E entity, String whereClause});


Argument                Description
TABLE-NAME Name of the table where the object represented by Map will be deleted from. There must be objectId property in the map. The value of the property identifies the object which will be deleted.
E Dart class of the data object to delete.
entity Dart object to delete. Must contain the objectId property which identifies the object in the database.

Return Value

The timestamp when the server-side removed the object from the data store.


void deleteContact() {
  Map contact = {
    "name": "Jack Daniels",
    "age": 147,
    "phone": "777-777-777",
    "title": "Favorites",
  };"Contact").save(contact).then((savedContact) {
    // now delete the saved object"Contact").remove(entity: savedContact);
Consider the following class:
import 'package:backendless_sdk/backendless_sdk.dart';

class Contact {
  String objectId;
  String name;
  int age;
  String phone;
  String title;
The following code saves a new instance of the Contact class and subsequently updates it:
void deleteContact() {
  Contact contact = Contact() = "Jack Daniels"
    ..age = 147 = "777-777-777"
    ..title = "Favorites";<Contact>().save(contact).then((savedContact) {
    // now delete the saved object<Contact>().remove(entity: savedContact);