Closed Solido closed 7 months ago
Is idle before the execution is called? Or would it be a separate Boolean on the AsyncState object?
Or would it be a new state?
To clarify it is a state used in conjonction with UI. AsyncState by default is for any activity, not UI.
When used for UI you have a default state to return after loading/error/data
I'm interested to see how preact and others model this case but I've a direct need for it.
Could you provide some puedo code?
Yeah, I feel this feature would be really handy. For reference: https://github.com/jinyus/dart_beacon?tab=readme-ov-file#asyncvalue
@r0hit-gupta I was actually thinking of removing the idle state because it's cumbersome when you don't need it...but I found that it makes a couple scenarios more ergonomic. eg: When you're on a search page and haven't search for anything thing yet.
@jinyus would it be possible to pass in a custom parameter? Maybe something like {initManually: true}
while declaring the future signal.
@r0hit-gupta Yes, it's called manualStart
https://github.com/jinyus/dart_beacon?tab=readme-ov-file#beaconfuture
Here's an example: https://github.com/jinyus/dart_beacon/tree/main/examples/flutter_main/lib/search
This ticket is still open and we've no clear ground on it. My 2 certitudes are
Can we move this to a discussion and challenge the best implementations to solve the UI fields case?
Works for me! If you also want to make a PR happy to review too
I use AsyncSignal to display some computation and manage the status as exposed for users. Being not only internal I would make a common use of an
idle
state. Feedback?