pikadart 1.1.0
pikadart: ^1.1.0 copied to clipboard
This Dart package serves as a wrapper for the PokeApi, providing a convenient and efficient way to interact with the Pokémon API in Dart projects. The package is designed to simplify the process of ma [...]
import 'package:pikadart/pikadart.dart';
void main() async {
// Use the general client with default memory cache strategy
final pokeapiClient = PokeApiClient();
// Or use a specific cache strategy
final customPokeapiClient =
PokeApiClient(cacheStrategy: MemoryCacheStrategy(ttl: Duration(days: 1)));
// Get pikachu data
final pikachu = await pokeapiClient.pokemon.getPokemonByName('pikachu');
// Or use a specified client
final berriesClient = BerriesClient();
// Get a paginated list of berries
final berries = berriesClient.getBerryList(0, 20);
}