import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:webview_flutter/webview_flutter.dart'; class ScanWeb extends StatefulWidget { final Map arguments; ScanWeb({this.arguments}); @override State createState() { return _ScanWeb(); } } class _ScanWeb extends State { var controller = new ScrollController(); String result; @override void initState() { super.initState(); result = widget.arguments["result"]; EasyLoading.show(status: S.current.zhengzaijiazai); } @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.only(top:MediaQuery.of(context).padding.top), width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, alignment: Alignment.center, child: WebView( initialUrl:result, javascriptMode: JavascriptMode.unrestricted, onPageFinished: (initialUrl){ EasyLoading.dismiss(); }, )); } }