first commit
This commit is contained in:
25
滴滴淘/ddt_flutter/lib/view/components/WebViewWidget.dart
Executable file
25
滴滴淘/ddt_flutter/lib/view/components/WebViewWidget.dart
Executable file
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
|
||||
|
||||
/// 公共 webview 组件
|
||||
class WebViewWidget extends StatelessWidget {
|
||||
final String webViewUrl;
|
||||
final String webViewtitle;
|
||||
WebViewWidget(this.webViewUrl,this.webViewtitle);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new WebviewScaffold(
|
||||
url: webViewUrl,
|
||||
appBar: new AppBar( title: new Text(webViewtitle)),
|
||||
withZoom: true,
|
||||
withLocalStorage: true,
|
||||
hidden: true,
|
||||
initialChild: Container(
|
||||
color: Colors.redAccent,
|
||||
child: const Center(
|
||||
child: Text('Waiting.....'),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user