fluttercommunity / fluttercommunity/flutter_webview_plugin
desnot work on my ios device
- Langage dominant
- Java
- Étoiles
- 1.5k
- Forks
- 938
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description

## System info
Issue occurs on: iOS
Plugin version: flutter_webview_plugin: any
Flutter doctor output:
```
flutter: 0.1
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0 showLog (package:union_flutter/appkit/util/util.dart:1:1207)
flutter: │ #1 _WebViewPageState.initState.() (package:union_flutter/module/web_page/web_view_page.dart:33:7)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 onUrlChangeed https://pages.yiwuhaoyun.com/rent
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0 showLog (package:union_flutter/appkit/util/util.dart:1:1207)
flutter: │ #1 _WebViewPageState.initState.() (package:union_flutter/module/web_page/web_view_page.dart:33:7)
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 onUrlChangeed http://pages.yiwuhaoyun.com/rent/
## Steps to Reproduce
here is my code
import 'dart:core';
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
import 'package:union_flutter/appkit/util/util.dart';
class WebViewPage extends StatefulWidget {
final String url;
final String title;
static const String routeName = "/webview";
WebViewPage({this.url, this.title});
_WebViewPageState createState() => _WebViewPageState();
}
class _WebViewPageState extends State {
final flutterWebviewPlugin = new FlutterWebviewPlugin();
final GlobalKey _scaffoldKey = GlobalKey();
var lineProgress;
@override
void initState() {
super.initState();
//showLog('WebViewPage ${Uri.encodeFull(widget.url)}');
flutterWebviewPlugin.onUrlChanged.listen((String url) {
showLog('onUrlChangeed '+url);
});
flutterWebviewPlugin.onProgressChanged.listen((progress) {
print(progress);
setState(() {
lineProgress = progress;
});
});
}
_progressBar(double progress, BuildContext context) {
return LinearProgressIndicator(
backgroundColor: Colors.white70.withOpacity(0),
value: progress == 1.0 ? 0 : progress,
valueColor: new AlwaysStoppedAnimation(Colors.white),
);
}
@override
Widget build(BuildContext context) {
return WebviewScaffold(
appBar: AppBar(
title: Text(widget.title),
bottom: PreferredSize(
child: _progressBar(lineProgress, context),
preferredSize: Size.fromHeight(3.0),
),
),
key: ObjectKey(widget.url),
url: Uri.encodeFull(widget.url),
withZoom: true,
withLocalStorage: true,
withJavascript: true,
useWideViewPort: true,
displayZoomControls: true,
withOverviewMode: true,
);
}
@override
void dispose() {
super.dispose();
}
}
1.the onUrlChange was called twice.and change my url from “https” to "http"
2.I add it in my homepage _pages.add(WebViewPage(
url: URLS.RENT_URL,
title: '租买货车',
));
3. ...
## Logs
```
```
```
```
```
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par reproduire la WebViewPage fournie avec flutter_webview_plugin sur iOS, en vous concentrant sur le listener onUrlChanged et les transitions d’URL consignées. Examinez le comportement du plugin concernant le callback dupliqué signalé et le changement de https vers http. Le travail est considéré comme terminé lorsque la cause a été identifiée et que le comportement attendu du changement d’URL a été vérifié, mais l’issue ne fournit ni test ni chemin de fichier du dépôt.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- dart, ios
- Domaine
- mobile-dev
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100