fluttercommunity / fluttercommunity/flutter_webview_plugin
Delay between removal of bottom navigation bar and resizing of the webview
- Lingua principale
- Java
- Stelle
- 1.5k
- Fork
- 938
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## System info
Issue occurs on: both
Plugin version: 0.3.8
Flutter doctor output: see below
## Steps to Reproduce
1. Use the `WebviewScaffold` with a conditionally shown `bottomNavigationBar`, e.g. like this:
```
@override
Widget build(BuildContext context) {
return WebviewScaffold(
url: _baseUrl,
bottomNavigationBar: _shouldShowBottomBar ? _buildBottomAppBar() : null,
);
}
```
2. Change the state of the `_shouldShowBottomBar` variable during runtime, e.g. in a `onScrollYChanged` handler like this:
```
void _onScrollYChanged(double offset) {
setState(() {
_shouldShowBottomBar = offset < 50;
});
}
```
3. Test the hiding/showing the of bottom navigation bar.
4. Notice that when the bottom navigation bar is hidden, the space that gets available is not immediately taken by the web view. It takes some time, during which the area is white. This looks bad.
Example:

## Logs
`flutter run --verbose`:
There are many log lines created like the following when the bottom nav bar is hidden, but nothing that is actually relevant is logged.
```
[ +16 ms] D/eglCodecCommon( 7996): setVertexArrayObject: set vao to 1 (1) 1 6
```
`flutter analyze`:
```
No issues found! (ran in 3.2s)
```
`flutter doctor -v`:
```
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17763.737], locale de-AT)
• Flutter version 1.9.1+hotfix.2 at C:\Android\flutter
• Framework revision 2d2a1ffec9 (12 days ago), 2019-09-06 18:39:49 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_SDK_ROOT = C:\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con l’utilizzo di WebviewScaffold e della bottomNavigationBar condizionale mostrata nei passaggi per la riproduzione. Riproduci il toggle di _shouldShowBottomBar da onScrollYChanged su entrambe le piattaforme, quindi traccia il layout e la tempistica del ridimensionamento del WebView. Il lavoro è completato quando il WebView occupa immediatamente lo spazio dopo che la bottom bar è stata nascosta o mostrata, senza uno spazio bianco visibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- dart, flutter
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100