Baseflow / octo_image

A multifunctional Flutter image widget
https://baseflow.com/
MIT License
156 stars 23 forks source link

When loadingProgress is null, progressIndicatorBuilder should not be called #15

Closed wuweijian1997 closed 3 years ago

wuweijian1997 commented 3 years ago

When loadingProgress is null, progressIndicatorBuilder should not be called

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix.

:arrow_heading_down: What is the current behavior?

When loadingProgress is null, progressIndicatorBuilder will be called

:new: What is the new behavior (if this is a feature change)?

When loadingProgress is null, progressIndicatorBuilder should not be called

:boom: Does this PR introduce a breaking change?

No

:bug: Recommendations for testing

:memo: Links to relevant issues/docs

:thinking: Checklist before submitting

renefloor commented 3 years ago

I don't agree, you should already be able to show your placeholder even if there is no progress known yet. Doing something lik this would be better imo, but I'm not sure if it is better than null:

    if(loadingProgress == null) {
      loadingProgress = ImageChunkEvent()
    }