rawg_dart_wrapper 1.0.2 copy "rawg_dart_wrapper: ^1.0.2" to clipboard
rawg_dart_wrapper: ^1.0.2 copied to clipboard

A Dart & Flutter package to enable users to easily integrate the RAWG API and easily get details on games, trophies, platforms and more.

RAWG Wrapper #

Pub

RAWG API Documentation #

RAGW API Docs Avalible here.

https://api.rawg.io/docs/

Import #

import 'package:rawg_dart_wrapper/rawg_dart_wrapper.dart';

Usage #

  1. Initialize
Rawg(apiKey: "0000000000000000");

// now you can use the static methods
  1. Usage
  • games
// get all games
List<Game> games = await Rawg.getGames(page: 1);

List<Game> games = await Rawg.getGames(order: Ordering.released); // custom order

// search for games
List<Game> games = await Rawg.getGames(query: "Call of duty");

// get details
Game detail = await Rawg.getGameDetails(id: 5);
  • genres
// get the genres
List<Genre> genres = await Rawg.getGenres();
  • achievements
Game game = ... // single game from getGames()

// get the achievement for game
List<Achievement> achievement = await Ragw.getAchievements(id: game.id);

List<Achievement> achievement = await Ragw.getAchievements(id: game.id, page: 3);
  • platforms
// get the platform
List<Platform> platforms = await Ragw.getPlatforms();

TODO #

  • Screenshot for game
  • Search games by platform
  • Search games by genre
  • Store wrapper
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Dart & Flutter package to enable users to easily integrate the RAWG API and easily get details on games, trophies, platforms and more.

Repository (GitHub)
View/report issues

Topics

#api #wrapper #games #rawg

License

unknown (LICENSE)

Dependencies

dio

More

Packages that depend on rawg_dart_wrapper