pokeapi_dart 0.0.1+1 copy "pokeapi_dart: ^0.0.1+1" to clipboard
pokeapi_dart: ^0.0.1+1 copied to clipboard

All the Pokémon data you'll ever need in one place, easily accessible through a modern RESTful API.

example/lib/example.dart

import 'package:pokeapi_dart/pokeapi_dart.dart';

void main() async {
  final api = PokeApi();

  // with await, be sure to be in an async function (and in a try/catch)
  final golduck = await api.pokemon.get(name: 'golduck');
  print(golduck);

  // with Future
  api.pokemon.get(name: 'eevee').then((response) {
    print(response);
  });

  // get pokemon by id
  final firstPokemon = api.pokemon.get(id: 1);
  print(firstPokemon);

  // get pokemon lists
  final pokemonList = api.pokemon.getPage(limit: 20, offset: 20);
  print(pokemonList);
}
7
likes
40
pub points
0%
popularity

Publisher

verified publisherchulwoo.dev

All the Pokémon data you'll ever need in one place, easily accessible through a modern RESTful API.

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

freezed_annotation, http, meta

More

Packages that depend on pokeapi_dart