I have a database in firebase with a structure like this:
Collection("Users").Document("user.uid").Collection("chats")
Im using a texfield --> onSubmit to create new data when I press enter key,
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Type your message...',
hintStyle: TextStyle(
color: Colors.grey[500]),
),
controller: queryController,
textInputAction:
TextInputAction.send,
onSubmitted: (msg) {},
}
I want to compare the entries of the TextField ( using a controller for example) with this key:
Firebase information that I want to comare
Something like:
If (Controller== Databasekey) {
print("dont do it");
}
Does any way to do it?