38 lines
930 B
Dart
38 lines
930 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
|
|
|
void main() {
|
|
runApp(MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
home: Scaffold(body: SafeArea(child: InAppWebViewExample())),
|
|
);
|
|
}
|
|
}
|
|
|
|
class InAppWebViewExample extends StatefulWidget {
|
|
@override
|
|
_InAppWebViewExampleState createState() => _InAppWebViewExampleState();
|
|
}
|
|
|
|
class _InAppWebViewExampleState extends State<InAppWebViewExample> {
|
|
InAppWebViewController? webViewController;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InAppWebView(
|
|
initialUrlRequest: URLRequest(
|
|
url: WebUri("https://cxx0822.iepose.cn/"),
|
|
),
|
|
onWebViewCreated: (InAppWebViewController controller) {
|
|
webViewController = controller;
|
|
},
|
|
);
|
|
}
|
|
}
|