graphql_cache_inspector 0.0.2 graphql_cache_inspector: ^0.0.2 copied to clipboard
A Flutter Plugin that helps to inspect the graphql cache on device.
A Flutter Plugin that helps to inspect the graphql cache on device
Features #
- Visualizes the GraphQL Cache Data using simple lists
Usage #
import 'grapqhl_cache_inspector.dart' into your dart code.
import 'package:grapqhl_cache_inspector/grapqhl_cache_inspector.dart';
The GraphqlCacheInspector takes in a function that gets the cache data, as well as the data itself
GraphqlCacheInspector(
title: 'GraphQL Cache',
data: graphql.getCacheDump(),
getCacheData: graphql.getCacheDump,
);
You may perhaps use this as a page of its own by having a button that opens the CacheInspector, using something like
ElevatedButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: ((context) {
return GraphqlCacheInspector(
title: 'GraphQL Cache',
data: graphql.getCacheDump(),
getCacheData: graphql.getCacheDump,
);
}),
),
);
},
child: const Text('Get GraphQL Cache Dump'),
),
Additional information #
This is a WIP new package, expect breaking changes.