0 votes
in Programming by (580 points)

I am using firebase in flutter application after updating the libraries to the latest version. Below is the code which was previously used but now I am facing error


void main() {
  FirebaseFirestore.instance.settings(timestampsInSnapshotsEnabled: true).then((_) {
    print("Timestamps enabled in snapshots\n");
  }, onError: (_) {
    print("Error enabling timestamps in snapshots\n");


error: The expression doesn't evaluate to a function, so it can't be invoked.

when I am implementing the above code I get the error, please help me to resolve this.

Please log in or register to answer this question.