Rrrrrr
V2EX  ›  Flutter

getx 列表更新问题,没有生效

  •  
  •   Rrrrrr · Nov 4, 2022 · 2810 views
    This topic created in 1475 days ago, the information mentioned may be changed or developed.

    大佬们,帮我看看。

    列表增加可以更新,某一项改变,就不会更新 UI

    https://flutlab.io/sandbox/d8d55775-efbb-4cc6-b43e-8732ec2cc522

    lh900519
    lh900519
    Nov 4, 2022
    1
    void changePerson(int index, String name) {
    userslist[index].name = name;
    userslist.refresh();
    }
    Rrrrrr
    Rrrrrr
    OP
    Nov 4, 2022 via iPhone
    2
    我也是找到这个,不知道 refresh 开销大不大?
    @lh900519
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3474 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 01:00 · PVG 09:00 · LAX 17:00 · JFK 20:00
    ♥ Do have faith in what you're doing.