loadAsset method
Implementation
Future<void> loadAsset(String assetPath) async {
if (is_init == false) {
return;
}
if (is_mobile) {
if (!kIsWeb) {
await webview_mobile_controller.loadFlutterAsset(assetPath);
}
}
if (is_desktop) {
// For desktop, we assume the user might need to handle the asset path or we can try a best-effort file:// load
// however webview_window usually expects a full URL.
// A common pattern is to use a local server or a file URI if supported.
webview_desktop_controller.launch(Uri.file(assetPath).toString());
}
}