0

I'm currently using launch_url package in my flutter project.

  url_launcher: ^5.0.1

I have complex screen and I'm using launch(url) to open youtube links.

             child: Center(
               child: IconButton(
                   icon: Icon(Icons.play_arrow, color: Colors.white),
                   onPressed: ()  {
                      launch(section['url']);
                   },
                   iconSize: 96.0),
             ),

I having issue with this feature on iOS(Android version works fine). When user opens youtube url and tap "Done" button. App rebuilds last screen - so user lost current scroll position on screen and he need to wait a second to be able to scroll. youtube screen opened by launch(url)

Android work fine, and there is no screen rebuild after user gets back from screen that was opened by launch(url)

How can I prevent screen rebuild on iOS after getting back from launch(url) opened screen? I'm able to restore scroll position or rebuild, but I'm user still needs to wait a part of second till screen rebuild ends and he can't scroll immediately

Leo
  • 375
  • 2
  • 3
  • 14
  • I'm pretty sure you can't stop Flutter from rebuilding. You should probably take a look at the reason why the rebuild takes so long. Is there a way you can speed up the rebuild by maintaining state? – Jordan Davies Feb 15 '19 at 13:01
  • Possible duplicate of [How to deal with unwanted widget build?](https://stackoverflow.com/questions/52249578/how-to-deal-with-unwanted-widget-build) – Jordan Davies Feb 15 '19 at 13:07
  • I've tried suggesting from that post. Even if I save full widget three in a variable it still takes some time to rebuild so user can't scroll imediatelly – Leo Feb 15 '19 at 13:46

0 Answers0