|
@@ -103,6 +103,7 @@ class _WebViewXPageState extends State<WebViewXPage> {
|
|
|
}
|
|
|
|
|
|
Widget _buildWebViewX() {
|
|
|
+ var api = _getApiHost();
|
|
|
return WebViewX(
|
|
|
key: const ValueKey('webviewx'),
|
|
|
initialContent: "<h2> Hello webviewX ! <h2>",
|
|
@@ -121,8 +122,7 @@ class _WebViewXPageState extends State<WebViewXPage> {
|
|
|
DartCallback(
|
|
|
name: 'Dart_GetClipPlaneData',
|
|
|
callBack: (msg) {
|
|
|
- var api = _getApiHost();
|
|
|
-
|
|
|
+ return api!.callMethod('getClipPlaneData', [msg]);
|
|
|
// final data = jsonDecode(msg);
|
|
|
|
|
|
// ///random color
|
|
@@ -141,7 +141,6 @@ class _WebViewXPageState extends State<WebViewXPage> {
|
|
|
// "ImageData": imageData
|
|
|
// };
|
|
|
// return jsonEncode(result);
|
|
|
- return api!.callMethod('getClipPlaneData', [msg]);
|
|
|
},
|
|
|
),
|
|
|
DartCallback(
|
|
@@ -151,7 +150,14 @@ class _WebViewXPageState extends State<WebViewXPage> {
|
|
|
// showSnackBar(msg.toString(), context);
|
|
|
return jsonEncode("{success:true}");
|
|
|
},
|
|
|
- )
|
|
|
+ ),
|
|
|
+ DartCallback(
|
|
|
+ name: "Dart_GetVesselClipPlanePoints",
|
|
|
+ callBack: (msg) {
|
|
|
+ print(1);
|
|
|
+ return api!.callMethod('getVesselClipPlanePoints', []);
|
|
|
+ },
|
|
|
+ ),
|
|
|
},
|
|
|
webSpecificParams: const WebSpecificParams(
|
|
|
printDebugInfo: true,
|