adding packages
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'platforms/base.dart';
|
||||
import 'platforms/web.dart';
|
||||
import 'base.dart';
|
||||
|
||||
class EasyWebView extends EasyWebViewBase {
|
||||
const EasyWebView({
|
||||
Key? key,
|
||||
required String src,
|
||||
double? height,
|
||||
double? width,
|
||||
OnLoaded? onLoaded,
|
||||
bool isMarkdown = false,
|
||||
bool convertToMarkdown = false,
|
||||
bool convertToWidgets = false,
|
||||
WidgetBuilder? fallbackBuilder,
|
||||
WebViewOptions options = const WebViewOptions(),
|
||||
}) : super(
|
||||
key: key,
|
||||
src: src,
|
||||
height: height,
|
||||
width: width,
|
||||
onLoaded: onLoaded,
|
||||
isMarkdown: isMarkdown,
|
||||
convertToMarkdown: convertToMarkdown,
|
||||
convertToWidgets: convertToWidgets,
|
||||
fallbackBuilder: fallbackBuilder,
|
||||
options: options,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!canBuild()) {
|
||||
return BrowserWebView(
|
||||
key: key,
|
||||
src: src,
|
||||
width: width,
|
||||
height: height,
|
||||
onLoaded: onLoaded,
|
||||
options: options,
|
||||
);
|
||||
}
|
||||
return super.build(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user