continuation_token

Creator: coderz1093

Last updated:

0 purchases

continuation_token Image
continuation_token Images

Languages

Categories

Add to Cart

Description:

continuation token

Encode and decode continuation token values for stateless pagination APIs.
Continuation data is a free-form Map that is:

encoded as JSON String
encoded as UTF-8 bytes
XOR-d with a given bytes of secret (optional)
encoded as BASE-64 String

Usage #
A simple usage example:
import 'package:continuation_token/continuation_token.dart';

main() {
final codec = jsonMapContinuationCodec(secret: 'my-secret');

final token = codec.encode({'id': 'abc123', 'asc': true});
print(token); // FltEF0dZUAQWDkgfQEdPUAQHDlsXBxcWFxg

final data = codec.decode(token);
print(data); // {id: abc123, asc: true}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.