A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
These rules enable a simple protection of user specific data:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Only the user itself can change its own user data
match /users/{uid} {
allow write: if request.auth != null && request.auth.uid == uid;
}
// All users can read other users
match /users/{uid} {
allow read: if request.auth != null;
}
// Only authenticated user can read and create any documents in chats
match /chats/{document=**} {
allow read, create: if request.auth != null;
}
}
}
Only authenticated user may upload (create) and read files, but deleting or modifying files is not allowed:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, create: if request.auth != null;
}
}
}