@@ -40,10 +40,7 @@ class DocumentReference {
4040 /// If [merge] is true, the provided data will be merged into an
4141 /// existing document instead of overwriting.
4242 Future <void > setData (Map <String , dynamic > data, {bool merge = false }) {
43- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
44- // https://github.com/flutter/flutter/issues/26431
45- // ignore: strong_mode_implicit_dynamic_method
46- return Firestore .channel.invokeMethod (
43+ return Firestore .channel.invokeMethod <void >(
4744 'DocumentReference#setData' ,
4845 < String , dynamic > {
4946 'app' : firestore.app.name,
@@ -61,10 +58,7 @@ class DocumentReference {
6158 ///
6259 /// If no document exists yet, the update will fail.
6360 Future <void > updateData (Map <String , dynamic > data) {
64- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
65- // https://github.com/flutter/flutter/issues/26431
66- // ignore: strong_mode_implicit_dynamic_method
67- return Firestore .channel.invokeMethod (
61+ return Firestore .channel.invokeMethod <void >(
6862 'DocumentReference#updateData' ,
6963 < String , dynamic > {
7064 'app' : firestore.app.name,
@@ -78,10 +72,8 @@ class DocumentReference {
7872 ///
7973 /// If no document exists, the read will return null.
8074 Future <DocumentSnapshot > get () async {
81- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
82- // https://github.com/flutter/flutter/issues/26431
83- // ignore: strong_mode_implicit_dynamic_method
84- final Map <dynamic , dynamic > data = await Firestore .channel.invokeMethod (
75+ final Map <String , dynamic > data =
76+ await Firestore .channel.invokeMapMethod <String , dynamic >(
8577 'DocumentReference#get' ,
8678 < String , dynamic > {'app' : firestore.app.name, 'path' : path},
8779 );
@@ -94,10 +86,7 @@ class DocumentReference {
9486
9587 /// Deletes the document referred to by this [DocumentReference] .
9688 Future <void > delete () {
97- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
98- // https://github.com/flutter/flutter/issues/26431
99- // ignore: strong_mode_implicit_dynamic_method
100- return Firestore .channel.invokeMethod (
89+ return Firestore .channel.invokeMethod <void >(
10190 'DocumentReference#delete' ,
10291 < String , dynamic > {'app' : firestore.app.name, 'path' : path},
10392 );
@@ -120,10 +109,7 @@ class DocumentReference {
120109 StreamController <DocumentSnapshot > controller; // ignore: close_sinks
121110 controller = StreamController <DocumentSnapshot >.broadcast (
122111 onListen: () {
123- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
124- // https://github.com/flutter/flutter/issues/26431
125- // ignore: strong_mode_implicit_dynamic_method
126- _handle = Firestore .channel.invokeMethod (
112+ _handle = Firestore .channel.invokeMethod <int >(
127113 'Query#addDocumentListener' ,
128114 < String , dynamic > {
129115 'app' : firestore.app.name,
@@ -136,10 +122,7 @@ class DocumentReference {
136122 },
137123 onCancel: () {
138124 _handle.then ((int handle) async {
139- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
140- // https://github.com/flutter/flutter/issues/26431
141- // ignore: strong_mode_implicit_dynamic_method
142- await Firestore .channel.invokeMethod (
125+ await Firestore .channel.invokeMethod <void >(
143126 'Query#removeListener' ,
144127 < String , dynamic > {'handle' : handle},
145128 );
0 commit comments