'Flutter - [Firebase] Your Cloud Firestore database has insecure rules

I Don't know why I am getting this mail, I never used Firebase Database in my flutter project,

FireBase mail

After clicking on the hyperlink it redirects to this code

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}


Solution 1:[1]

If you do not intend to to use Cloud Firestore Database at all in your project, I'd suggest turning off all read/writes. That will also stop the email-reminders of the insecure rules.

Simply change the allow read, write: if true; to allow read, write: if false;

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lunke