Giter Site home page Giter Site logo

Comments (3)

hanslelee avatar hanslelee commented on August 23, 2024

그런데 데이터가 바뀌었을 때
setState(() { _fetchData(); });
이런식으로 데이터를 새로 불러오려고 했으나 작동하지 않았다.

from handey-app.

hanslelee avatar hanslelee commented on August 23, 2024

수정된 코드
image
_fetchData로 따로 함수를 빼지 않고 initState에서 직접 데이터를 가져오는 함수를 호출하고 이를 Future형 변수에 넣었다.

from handey-app.

hanslelee avatar hanslelee commented on August 23, 2024

이 Future형 변수를 FutureBuilder의 future에 넣어주었고,
image

이 위젯을 reload하고 싶을 때마다 이런식으로 setState를 사용하여 데이터를 가져왔고, reload가 제대로 되었다.
setState(() { futureFwBoxList = getFwBoxList(userId, DateFormat("yyyy-MM-dd").format(DateTime.now())); });

from handey-app.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.