ResponsiveFramework
ResponsiveFramework copied to clipboard
[proposal] Expose ready() completer on ResponsiveWrapper.builder
User story
I have in my application a custom splash screen that makes use of a background image, which is rendered on the native side and then transitions into rendering on the Flutter side.
Prior to using responsive_framework
, the transition was seamless, as I pre-cached the image on Flutter and had it rendered on the first available frame. This, however, cannot be done when using this package - which is expected, I understand that it requires building its own widget instance before having the actual application it wraps rendered.
The result is a flicker between the background image used by the native side and Flutter's.
Proposal
Expose a ready()
Future getter that completes once the ResponsiveWrapper.builder
finished initializing would enable using a FutureBuilder
or manipulating the state of a Stack
widget so that the transition has no perceivable gap or flicker, when using a background image.
Do you think that's a possible solution? Thanks for the great package!
This is a great idea! There is a 1 frame delay in obtaining the layout size hence the interrupt in transition. Your proposal would be a good solution.