23 lines
No EOL
481 B
Dart
23 lines
No EOL
481 B
Dart
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:webview_flutter/webview_flutter.dart';
|
|
|
|
class HiddenWebView extends StatelessWidget {
|
|
final WebView webView;
|
|
final Widget child;
|
|
|
|
HiddenWebView({@required this.child, this.webView});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
children: <Widget>[
|
|
Offstage(
|
|
offstage: true,
|
|
child: webView,
|
|
),
|
|
Positioned.fill(child: child)
|
|
],
|
|
);
|
|
}
|
|
} |