Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Unofficial valorant client to interact with riot’s valorant game api

ValorantClient

valorant_client is a library to interact with VALORANT Game API’s to fetch user specific data such as matches played, user info, store info etc.

Usage

dependencies:
  valorant_client: ^1.1.0
import 'package:valorant_client/valorant_client.dart';
ValorantClient client = ValorantClient(
    UserDetails(userName: {'your_username'}, password: {'your_password'}, region: {your_region}),
    callback: Callback(
      onError: (String error) {
        print(error);
      },
      onRequestError: (DioError error) {
        print(error.message);
      },
    ),
  );

NOTE: Passing the callback here is optional. However, to know if your request failed internally due to wrong status code etc, you will require the callback.

await client.init(true);

NOTE: This is an async function, it authorizes this client to valorant API’s. without calling this, you will not get results from the api.

final currentPlayer = await client.playerEndpoint.getPlayer();

Features Implemented

Contribute to valorant client package on GitHub

Implementation guide on Pub.dev

https://pub.dev/packages/valorant_client

Exit mobile version