VkDart

Pub Version Pub Popularity Pub Points

Package helps to make working with the VK API easier.

Chat discussion of the package - https://t.me/vk_dart

Features

  1. Supports all methods. Has interfaces of all public VK methods.
  2. Reliable. Functionality of the package is wrapped in Unit tests
  3. Event support. Supports Callback API, Longpoll API
  4. Developing. Functionality is becoming more!
  5. Easy to use. Very easy to use!

Usage

Initialization:

import 'package:vkdart/vkdart.dart';

void main() async {
  final TOKEN = ''; // Group Token
  final vkdart = VkDart(TOKEN, Event(), groupId: 123);

  vkdart.start()
}

Listening to events:

// messages_new, message_edit, message_reply
vkdart.onMessage().listen((event) =>
   print('message text: ${event.object['message']['text']}'));

Modifying Stream:

vkdart
  .onComment()
  .where((comment) => comment.type == UpdateType.photo_comment_new)
  .listen((event) => print('There\'s a new comment on the photo!'));

Using API:

await vkdart.users.get({'user_id': 'durov'});

Future plans

  • Create contexts for received events
  • Implement the VK Api keyboard interface
  • Create a command constructor to simplify the creation of chatbots.

Bugs and feature requests

Please send a bug report to issue tracker

Libraries

methods
This library contains all VK API methods and their auxiliary functions
vkdart
The package contains convenient functionality for interacting with the Longpoll API, Callback API, and the VK Api itself