Replies: 1 comment
-
我已经找到解决办法 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_pkwd/widgets/base_appbar.dart';
class CommonWebPage extends StatefulWidget {
const CommonWebPage({
Key? key,
required this.title,
required this.url,
}) : super(key: key);
final String title;
final String url;
@OverRide
State createState() => _BrowserPageState();
}
class _BrowserPageState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: BaseAppBar('',leftItemCallBack: () {
showDialog(
context: context,
builder: (context) {
return GestureDetector(
onTap: () {},
child: AlertDialog(
title: Text("提示"),
content: Text(''),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text("取消"),
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text("确认"),
),
],
),
);
},
);
},
),
body: Column(children: [
Expanded(
child: InAppWebView(
initialUrlRequest: URLRequest(url: WebUri('https://www.baidu.com')),
),
),
]));
}
}
Beta Was this translation helpful? Give feedback.
All reactions