fiveesrd_datastore 0.1.0 copy "fiveesrd_datastore: ^0.1.0" to clipboard
fiveesrd_datastore: ^0.1.0 copied to clipboard

Caching and persistence layer for the FiveEsrd suite with pluggable storage.

example/main.dart

import 'package:fiveesrd_client/fiveesrd_client.dart';
import 'package:fiveesrd_datastore/fiveesrd_datastore.dart';

/// Simple example that fetches the Fighter class using the datastore cache.
Future<void> main() async {
  final client = FiveEsrdClient();
  final datastore = FiveEsrdDatastore.fromClient(client);

  final fighter = await datastore.getClass('fighter');
  print('Fetched class: ${fighter.name}');

  // The second call hits the cache.
  final cached = await datastore.getClass('fighter');
  print('Fetched from cache: ${cached.name}');
}
0
likes
140
points
15
downloads

Publisher

verified publisherundrapps.com

Weekly Downloads

Caching and persistence layer for the FiveEsrd suite with pluggable storage.

Documentation

API reference

License

MIT (license)

Dependencies

collection, fiveesrd_client, fiveesrd_models, hive, meta

More

Packages that depend on fiveesrd_datastore