Reputation: 31
i'm trying to loop on listOfStringAnswers which contains list of strings , but when i debug it gives me exception : 'isValidTopic': is not true.
Future topicFunc() async {
for (var element in listOfStringAnswers)
{
await FirebaseMessaging.instance.subscribeToTopic(element);
}
}
Upvotes: 0
Views: 191
Reputation: 31
Solved , i removed quotation marks from strings , after that it worked , because the string letters were surrounded with two quotation marks not only one quotation mark
Upvotes: 1