phive 0.0.1 copy "phive: ^0.0.1" to clipboard
phive: ^0.0.1 copied to clipboard

Annotation-driven runtime for Hive CE with hook pipelines and consumer APIs.

phive #

Core runtime package for PHive.

Use this package to define model annotations, hook pipelines, and consumer APIs.

What you get #

  • @PHiveType and @PHiveField
  • PTypeAdapter<T> runtime support
  • PHiveCtx and PHiveHook
  • PHiveActionException
  • PHiveConsumer<T> with adapter support

Install #

dependencies:
	hive_ce: ^2.19.3
	phive: ^0.0.1

If you are in this monorepo:

dependencies:
	phive:
		path: ../phive

Quick Start #

import 'package:phive/phive.dart';

@PHiveType(1)
class Session {
	@PHiveField(0)
	final String id;

	@PHiveField(1)
	final String token;

	const Session({required this.id, required this.token});
}

Then run your generator package (phive_generator) with build_runner.

PHiveConsumer quick use #

final consumer = PHiveConsumer<Session>('app_sessions');

await consumer.put('current', const Session(id: '1', token: 'abc'));
final session = await consumer.get('current');

Notes #

  • This package is runtime-only.
  • For ready-made hooks (TTL/encryption), also add phive_barrel.
0
likes
130
points
85
downloads

Documentation

API reference

Publisher

verified publisherpathverse.ca

Weekly Downloads

Annotation-driven runtime for Hive CE with hook pipelines and consumer APIs.

Homepage

License

unknown (license)

Dependencies

flutter, hive_ce

More

Packages that depend on phive