push method

ThenableReference push([
  1. dynamic value
])

Pushes provided value to the actual location.

The value must be a Dart basic type or the error is thrown.

If the value is not provided, no data is written to the database but the ThenableReference is still returned and can be used for later operation.

DatabaseReference ref = firebase.database().ref('messages');
ThenableReference childRef = ref.push();
childRef.set({'text': 'Hello'});

This method returns ThenableReference, DatabaseReference with a Future property.

Implementation

ThenableReference push([value]) =>
    ThenableReference.fromJsObject(jsObject.push(jsify(value)));