Browse Source

跳转更改

ff_new
w-R 3 years ago
parent
commit
933b0c3e60
  1. 38
      lib/web/web_turntable_activity.dart

38
lib/web/web_turntable_activity.dart

@ -1,8 +1,34 @@
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:flutter/cupertino.dart';
class WebTurntableActivity extends StatefulWidget {
final Map<String, dynamic> arguments;
///
WebTurntableActivity({this.arguments});
class WebTurntableActivity extends StatelessWidget {
@override
State<StatefulWidget> createState() {
return _WebTurntableActivity();
}
}
class _WebTurntableActivity extends State<WebTurntableActivity> with WidgetsBindingObserver {
final ScrollController scrollController = ScrollController();
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
}
@override
Widget build(BuildContext context) {
@ -28,10 +54,12 @@ class WebTurntableActivity extends StatelessWidget {
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child:
WebView(
initialUrl: "http://192.168.10.90:5500/lottery.html",
)),
alignment: Alignment.center,
child:
WebView(
initialUrl: "http://192.168.10.90:5500/lottery.html",
javascriptMode: JavascriptMode.unrestricted,
)),
);
}
}
Loading…
Cancel
Save