Closed ScottWallace closed 2 years ago
Just saw the note in the code for autoResize, "Flutter Web is not supported.". The screenshots above are from the web version.
However, it also doesn't appear to auto-resize on iOS either. Here's a screenshot of that not performing. I have insured js:true
and autoResize: true
for WebView, in fact it uses the same code as above.
I spoke too soon. Looks like I hadn't properly refreshed on iOS. It now works on iOS, properly and consistently. Thanks for a great tool!
Steps to Reproduce
Have a twitter embed in your html code. Notice it's cut off at bottom.
Testing environment
``` [✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale en-US) • Flutter version 3.0.4 at /Users/scottwallace/Developer/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (6 days ago), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/scottwallace/Library/Android/sdk • Platform android-31, build-tools 30.0.3 • ANDROID_HOME = /Users/scottwallace/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.1) • 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 • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) [✓] VS Code (version 1.68.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.44.0 [✓] Connected device (3 available) • iPhone 13 Pro Max (mobile) • B4E944F8-CC74-470E-8F04-F01B74197152 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```Expected results
The Twitter embed should allow itself to size correctly.
Actual results
The Twitter embed is limited to the 16/9 ratio described in the aspectRatio of the WebView, which is a required parameter.
Screenshot
Question
It appears to me that the WebView, which contains the embed, is limiting viewing of the Twitter embed. (I've not tried it yet with other embeds.) The required aspect ratio for the WebView doesn't allow for the variable heights of Twitter embeds.
How do I allow the WebView to simply take the size of the embed?