Skip to content

expofp/expofp-flutter-demo

Repository files navigation

This is an example of how you can integrate ExpoFP maps into an android(Flutter) application.

Configuring WebView

InAppWebView(
    initialUrlRequest: URLRequest(url: Uri.parse('https://demo.expofp.com')),
    initialOptions: InAppWebViewGroupOptions(
        android: AndroidInAppWebViewOptions(
            allowFileAccess: true,
            domStorageEnabled: true,
            allowContentAccess: true),
        crossPlatform: InAppWebViewOptions(
            allowUniversalAccessFromFileURLs: true,
            javaScriptEnabled: true,
            allowFileAccessFromFileURLs: true)),
    onConsoleMessage: (InAppWebViewController controller,
        ConsoleMessage consoleMessage) {},
    onWebViewCreated: (InAppWebViewController controller) {
    },
)

JavaScript code invocation

Calling the booth selection function:

webViewController?.evaluateJavascript(source: "selectBooth($boothName)");

Calling the set blue-dot function:

webViewController?.evaluateJavascript(source: "setCurrentPosition($x, $y, $focus)");

Calling the route building function:

webViewController?.evaluateJavascript(source: "selectRoute($boothFrom, $boothTo, $exceptUnAccessible)");

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published