Skip to content

Saving Single Object


Future<Map>"TABLE-NAME").save(Map entity);
Future<E><E>().save(E entity);


Argument                Description
TABLE-NAME Name of the table where the object represented by Map will be saved.
E Dart class of the data object to save.
entity Dart object to persist, must be of type E or Map (depending on the method used).

Return Value

The saved object of type E or Map.


void saveNewContact() {
  Map contact = {
    "name": "Jack Daniels",
    "age": 147,
    "phone": "777-777-777",
    "title": "Favorites",
  }; "Contact" ).save(contact).then((response) {
    // new Contact instance has been saved
import 'package:backendless_sdk/backendless_sdk.dart';

class Contact {
  String objectId;
  String name;
  int age;
  String phone;
  String title;

void saveNewContact() {
  Contact contact = Contact() = "Jack Daniels"
    ..age = 147 = "777-777-777"
    ..title = "Favorites";<Contact>().save(contact).then((response) {
    // new Contact instance has been saved