add method

  1. @override
Future<DocumentReference<Map<String, dynamic>>> add(
  1. Map<String, dynamic> data
)
override

Returns a DocumentReference with an auto-generated ID, after populating it with provided data.

The unique key generated is prefixed with a client-generated timestamp so that the resulting list will be chronologically-sorted.

Implementation

@override
Future<DocumentReference<Map<String, dynamic>>> add(
  Map<String, dynamic> data,
) =>
    _add == null
        ? throw UnimplementedError(
            'You must supply add to the constructor of'
            ' CollectionReferenceFake',
          )
        : _add!(data);