Documentation

Shard

Lightweight Flutter state management with typed state, async primitives, persistence, caching, and focused widget rebuilds.

Simple state classes for sync, future, stream, persistent, command, and computed state.
Production helpers for persistence, response caching, debounce, throttle, and undo/redo.
Flutter widgets that keep rebuilds focused and app code easy to follow.
Define async state
user_shard.dart
class UserShard extends FutureShard<User> {
  UserShard(this.repo, this.id);
  final UserRepository repo;
  final String id;

  @override
  Future<User> build() => repo.getUser(id);
}
Render it
profile_view.dart
AsyncShardBuilder<UserShard, User>(
  onLoading: (context) => const Spinner(),
  onData: (context, user) => Text(user.name),
  onError: (context, e, st) => Text('$e'),
)