vk_bridge 1.2.6+1 vk_bridge: ^1.2.6+1 copied to clipboard
A dart package for working with VK Mini Apps via VK Bridge. Works web, mobile-web
import 'package:flutter/material.dart';
import 'package:vk_bridge/vk_bridge.dart';
import 'examples_page.dart';
class SimpleLogger implements Logger {
@override
void d(Object message) {
print('vk_bridge.d: $message');
}
@override
void e(Object message) {
print('vk_bridge.e: $message');
}
}
Future<void> main() async {
VKBridge.instance.setLogger(SimpleLogger());
final result = await VKBridge.instance.init();
print('VKBridge.init: $result');
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: ExamplesPage(),
);
}
}