shinyford / nowplaying

Other
9 stars 11 forks source link

Example migrated to provider 6.0.0 #7

Closed T1G3R192 closed 2 years ago

T1G3R192 commented 3 years ago

Hi there, I recently helped somebody on stackoverflow, who tried implementing your example app from pub.dev.

As the provider package since version 5.0.0-nullsafety requires initialData for both FutureProvider and StreamProvider, I migrated it in adherence to the provider documentation. Moreover, your example does not specify the concrete provider type for the StreamProvider, which caused the problem posted on SO.

All changes besides line 31 & 32 are whitespacing changes to make the code more readable in an IDE.

Best regards, Jahn

PS: SO link: https://stackoverflow.com/q/69140257/15117201 - by the way, my third tip in my answer was wrong, because I overlooked your initState().

shinyford commented 2 years ago

Thanks for this @T1G3R192 (and apologies for the huge wait). I didn't merge the PR directly because of the whitespacing changes - but I've made the changes in the main body of code, and credited you in the Changelog.