|
|
|
@ -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}); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _WebTurntableActivity(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _WebTurntableActivity extends State<WebTurntableActivity> with WidgetsBindingObserver { |
|
|
|
|
final ScrollController scrollController = ScrollController(); |
|
|
|
|
|
|
|
|
|
class WebTurntableActivity extends StatelessWidget { |
|
|
|
|
@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, |
|
|
|
|
)), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|