Issue
I'm using GetX for my project.
I have a little warning with RxList in GetX.
How do I fix this warning?
This is my code:
var questionListItems = RxList<QuestionLookupResponse>();
// ....
Future<void> onInit() async {
if (questionListItems.value.isNotEmpty) { // <--- Warning
questionListItems.value.clear(); // <--- Warning
}
}
Solution
Remove .value
. It work. Because Rxlist
can be accesses without .value
. So... You can use Rxlist
directly like list
Answered By - Huu Bao Nguyen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.