Closed YDA93 closed 1 month ago
Hi @YDA93, what version of webview_flutter
& webview_flutter_wkwebview
are you experiencing this issue with?
Does this work as expected on android?
@danagbemava-nc
Works perfectly in android. Never fails to load the url.
While in ios most of the time it fails because the widget is not visible on the screen or the widget state is not preserved maybe.
I noticed the issue also persist when using PageView
.
Currently my workaround is to wrap WebViewWidget
with Stack
and show loading indicator above it instead of using IndexedStack
or PageView
.
Hi @YDA93, thanks for the update.
What were you trying to achieve by putting the Webview inside the IndexedStack
? Please also share a complete minimal reproducible code sample.
Thank you
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Using ios device do the following:
Expected results
Should load the url normally even when IndexedStack is not pointing to WebViewWidget
Actual results
8 out of 10 times it won't load the url
Code sample
Code sample
```dart IndexedStack( index: 0, sizing: StackFit.expand, children: [ const Center( child: CircularProgressIndicator( valueColor: AlwaysStoppedAnimation(Colors.white), ), ), WebViewWidget(controller: _controller), Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( locale.sorry, style: const TextStyle( fontSize: 40, fontWeight: FontWeight.bold, color: Colors.white, ), ), const SizedBox(height: 5), Text( locale.couldNotReachThePage, style: const TextStyle( fontSize: ConstantFonts.large, fontWeight: FontWeight.bold, color: Colors.white, ), ), const SizedBox(height: 25), PrimaryButton( text: locale.tryAgain, width: 200, onTap: _controller.reload, ), ], ), ), ], ) ```Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.19.4, on macOS 14.4 23E214 darwin-arm64, locale en-KW) • Flutter version 3.19.4 on channel stable at /Users/yousefalmutairi/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 68bfaea224 (25 hours ago), 2024-03-20 15:36:31 -0700 • Engine revision a5c24f538d • Dart version 3.3.2 • DevTools version 2.31.1 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/yousefalmutairi/Library/Android/sdk • Platform android-34, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.87.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.84.0 [✓] Connected device (4 available) • SM S711B (mobile) • 192.168.0.117:5555 • android-arm64 • Android 14 (API 34) • iPhone (mobile) • 00008130-000158AE3498001C • ios • iOS 17.4 21E219 • macOS (desktop) • macos • darwin-arm64 • macOS 14.4 23E214 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.59 ! Error: Browsing on the local area network for iPhone 11 Pro Max. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. • No issues found! ```