You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.6 KiB

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 TreatyPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _TreatyPage();
}
}
class _TreatyPage extends State<TreatyPage> {
var controller = new ScrollController();
String userType;
@override
void initState() {
super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
// if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
// if (Platform.isIOS) WebView.platform = CupertinoWebView();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title:S.of(context).yinsishengming,
titleColor: Colors.black,
background: Colors.transparent,
leadingColor: Colors.black,
),
body:
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,
child:
WebView(
initialUrl: "http://huixiang.lotus-wallet.com/Privacy.html",
javascriptMode: JavascriptMode.unrestricted,
onPageFinished: (initialUrl){
EasyLoading.dismiss();
},
)),
);
}
}