vk_bridge 2.5.0 copy "vk_bridge: ^2.5.0" to clipboard
vk_bridge: ^2.5.0 copied to clipboard

A dart package for working with VK Mini Apps via VK Bridge. Works web, mobile-web

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:vk_bridge/vk_bridge.dart';

import 'examples_page.dart';

/// Simple logger implementations
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());
}

/// Sample app
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: ExamplesPage(),
    );
  }
}
25
likes
150
pub points
47%
popularity

Publisher

verified publisheroptimist.dev

A dart package for working with VK Mini Apps via VK Bridge. Works web, mobile-web

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

built_collection, built_value, js, meta, rxdart

More

Packages that depend on vk_bridge