Flutter ListView not updating. Turns out the problem was that
1 | List<Manga> _listContent = new List<Manga>(); |
was defined on top of widget.build and not on top of the State class. Defining it like this works fine:
1 2 3 4 5 6 7 | class _MyHomePageState extends State<MyHomePage> { List<Manga> _listContent = new List<Manga>(); @override Widget build(BuildContext context) { ... } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.