Files
sweet_hut_app/lib/main.dart
2026-04-02 21:58:16 +08:00

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;
},
);
}
}