How to update list view without refreshing in Flutter

570

Use state management pub like Getx, or something with adlistener.

Share:
570
Sanjay TM
Author by

Sanjay TM

I'm a Student, Teacher, Creator, Tech geek, 3D designer, and Artest. I like to learn new things each day, I like to solve problems. I mainly work with hardware and software. In my free time, I work on modeling and designing. I work with MicroControllers, Processors, C++, Python, Flutter, and 3D printers.

Updated on January 01, 2023

Comments

  • Sanjay TM
    Sanjay TM over 1 year

    How can it update a list view elements without doing pull-to-refresh If I'm adding an element in a dialog window or from an Api, how to add/update the list view elements automatically.

    Should I use StreamBuilder?

  • Sanjay TM
    Sanjay TM over 2 years
    Thank you for the replay, I tried setSate(), but not helping. If I add a button to do setSate() it is working.
  • Salim Murshed
    Salim Murshed over 2 years
    @SanjayChakrapani please mark complete my answer. and upvote me
  • Sanjay TM
    Sanjay TM over 2 years
    I'm using Getx for state management, wrapped the listview-builder inside .obx widget,
  • Salim Murshed
    Salim Murshed over 2 years
    is ma answer fullfil your question?
  • Sanjay TM
    Sanjay TM over 2 years
    ya it was, I will upvote you as soon as I get enough to do
  • Salim Murshed
    Salim Murshed over 2 years
    Please check there is an option to mark as complete beside my answer, so people can get the answer is workable. and you will get point also