once method

Listens for a single value event and then stops listening.

Implementation

Future<DataSnapshot> once() =>
    on('value').first.then<DataSnapshot>((e) => e.snapshot);