wurong
2 years ago
29 changed files with 444 additions and 353 deletions
@ -0,0 +1,49 @@
|
||||
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<String, dynamic> arguments; |
||||
|
||||
ScanWeb({this.arguments}); |
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ScanWeb(); |
||||
} |
||||
} |
||||
|
||||
class _ScanWeb extends State<ScanWeb> { |
||||
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(); |
||||
}, |
||||
)); |
||||
} |
||||
} |
Loading…
Reference in new issue