Git Product home page Git Product logo

Comments (12)

shamblett avatar shamblett commented on July 28, 2024 2

Hi guys, any update on this as far as a permanent fix is concerned, I'd rather use observable if a fix is forthcoming.

from observable.

nshahan avatar nshahan commented on July 28, 2024 2

I'll do some testing on our codebase to see if we can easily fix up any breaks.

from observable.

kevmoo avatar kevmoo commented on July 28, 2024 1

@nshahan ?

from observable.

jodinathan avatar jodinathan commented on July 28, 2024 1

@wsakka it has been fixed with version 0.22.1+5.
I am closing this issue.

from observable.

natebosch avatar natebosch commented on July 28, 2024

I assume you're seeing the issue at runtime in DDC? what version of the SDK are you on?

from observable.

jodinathan avatar jodinathan commented on July 28, 2024

sorry.
DDC
dev-24 and dev-28 neither worked

from observable.

natebosch avatar natebosch commented on July 28, 2024

If we change the type to List<C> then I think the assignment to ChangeRecord.ANY would fail.

https://github.com/dart-lang/observable/blob/bc4b2d9902099e459ea744b8969239156c65623f/lib/src/change_notifier.dart#L61

ChangeRecord.ANY is a List<ChangeRecord> which is not a List<C>

https://github.com/dart-lang/observable/blob/bc4b2d9902099e459ea744b8969239156c65623f/lib/src/records.dart#L22

I think this is likely to be a bit tougher to solve and I'm not sure if we have the bandwidth to dig deeply on it...

from observable.

jodinathan avatar jodinathan commented on July 28, 2024

yeah, just tested it and it threw an error with ANY.
that is probably why it was List<ChangeRecord> in the first place.

Maybe just sending an empty instead of the ANY const?
afterall, that dummy ChangeRecord wasn't much of a help.

Or you can store the last queue and send it again if the new queue is empty.

from observable.

kevmoo avatar kevmoo commented on July 28, 2024

CC @nshahan

from observable.

jodinathan avatar jodinathan commented on July 28, 2024

For now I am using my fork: https://github.com/jodinathan/observable
It basically changes:

https://github.com/dart-lang/observable/blob/bc4b2d9902099e459ea744b8969239156c65623f/lib/src/change_notifier.dart#L55

to:
List<C> changes;

and

https://github.com/dart-lang/observable/blob/bc4b2d9902099e459ea744b8969239156c65623f/lib/src/change_notifier.dart#L61

to:

changes = <C>[];

It is a breaking change, however, that empty ChangeRecord from ANY const has no value at all.

from observable.

buhhy avatar buhhy commented on July 28, 2024

I've created a pull request to fix this issue:

#76

from observable.

wsakka avatar wsakka commented on July 28, 2024

Not sure why the flutter team leaves these issues open -- it's been a year, what's the status of this issue?

from observable.

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.