Giter Site home page Giter Site logo

isLiked sync issue about like_button HOT 4 CLOSED

fluttercandies avatar fluttercandies commented on August 16, 2024 1
isLiked sync issue

from like_button.

Comments (4)

zmtzawqlp avatar zmtzawqlp commented on August 16, 2024

1.sometime,we should send a request await response back, then we decide change isLiked or not.
2.we shouldn't change _isOn at tap, _isOn is Initial state

from like_button.

MartinJLee avatar MartinJLee commented on August 16, 2024

@zmtzawqlp Thank you for your answer.
if _isOn the variable isLiked is only the initial value.
We should change it to initialValue or something similar and also
we shouldn't do

_isLiked = widget.isLiked;

from like_button.

clragon avatar clragon commented on August 16, 2024

we should send a request await response back, then we decide change isLiked or not.

this makes sense, but has one issue:

my like buttons are linked up to state, so when the request completes, isLiked will update and immediately interrupt the animation. if I unlink them from state, they will not update if I trigger a like from anywhere else.

So currently, I have a really ugly mechanism where the state update will wait until at least 1 second is passed, to update the state.

from like_button.

thiagocarvalhodev avatar thiagocarvalhodev commented on August 16, 2024

The package is great, but this issue makes me give up on using it. :(

from like_button.

Related Issues (20)

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.