-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 3 additions & 11 deletions
14
recipients_app/lib/data/datasource/demo/no_op_document_reference.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,58 @@ | ||
import "package:cloud_firestore/cloud_firestore.dart"; | ||
|
||
// We are using DocumentReference in repository / data source. That's why we need to get | ||
// no-op implementation for it for demo data source. | ||
|
||
// ignore: subtype_of_sealed_class | ||
class NoOpDocumentReference implements DocumentReference<Map<String, dynamic>> { | ||
const NoOpDocumentReference(); | ||
|
||
@override | ||
CollectionReference<Map<String, dynamic>> collection(String collectionPath) { | ||
// TODO: implement collection | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
Future<void> delete() { | ||
// TODO: implement delete | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
// TODO: implement firestore | ||
FirebaseFirestore get firestore => throw UnimplementedError(); | ||
|
||
@override | ||
Future<DocumentSnapshot<Map<String, dynamic>>> get([GetOptions? options]) { | ||
// TODO: implement get | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
// TODO: implement id | ||
String get id => throw UnimplementedError(); | ||
|
||
@override | ||
// TODO: implement parent | ||
CollectionReference<Map<String, dynamic>> get parent => throw UnimplementedError(); | ||
|
||
@override | ||
// TODO: implement path | ||
String get path => throw UnimplementedError(); | ||
|
||
@override | ||
Future<void> set(Map<String, dynamic> data, [SetOptions? options]) { | ||
// TODO: implement set | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
Stream<DocumentSnapshot<Map<String, dynamic>>> snapshots( | ||
{bool includeMetadataChanges = false, ListenSource source = ListenSource.defaultSource,}) { | ||
// TODO: implement snapshots | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
Future<void> update(Map<Object, Object?> data) { | ||
// TODO: implement update | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
DocumentReference<R> withConverter<R>( | ||
{required FromFirestore<R> fromFirestore, required ToFirestore<R> toFirestore,}) { | ||
// TODO: implement withConverter | ||
throw UnimplementedError(); | ||
} | ||
} |