vk_bridge

Creator: coderz1093

Last updated:

0 purchases

vk_bridge Image
vk_bridge Images
Add to Cart

Description:

vk bridge

VK Bridge #
A package for integrating Flutter VK Mini Apps with official VK clients for iOS, Android and Web.
This package is a wrapper around official VK-Bridge JS package.
Usage #
On app start call VKBridge.instance.init() method before runApp to ensure correct VK Bridge initialization.
import 'package:vk_bridge/vk_bridge.dart';

Future<void> main() async {
await VKBridge.instance.init();

runApp(MyApp());
}
copied to clipboard
Add this part of code in your index.html before Flutter part.

<script src="https://unpkg.com/@vkontakte/[email protected]/dist/browser.min.js"></script>

<script>
vkBridge.subscribe((event) => {
if (window.vkBridgeDartListener != null) {
window.vkBridgeDartListener(event.detail);
}
});
</script>

<script src="main.dart.js" type="application/javascript"></script>
copied to clipboard
To add logger use VKBridge.instance.setLogger().
Original VK Bridge documentation: https://vk.com/dev/vk_bridge_events #
Original VK Bridge JS package: https://github.com/VKCOM/vk-bridge #

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.