flutter library

The Flutter widget layer of hiblob.

import 'package:hiblob/flutter.dart';

const Hiblob(name: 'ada@example.com', size: 48);

AnimatedHiblob(
  name: 'ada@example.com',
  size: 120,
  animation: HiblobAnimation.always,
)

The widgets paint the deterministic layout through dart:ui primitives. For the pure, Flutter-independent engine (hash, traits, palette, geometry, motion), import package:hiblob/hiblob.dart instead.

Classes

AnimatedHiblob
An animated hiblob: seeded breathe, bob, blinks, and glances.
AnimatedHiblobPainter
Paints an animated hiblob: it computes its own MotionFrame from an elapsed-time notifier each repaint, and crossfades between the previous and current figure when the expression (or name) changes.
Expression
One expression pose.
EyeGroup
One eye: the marks that draw it (filled or stroked), and its center, used to scale the eye around itself when it blinks.
GeometryPath
One drawn primitive: an ordered command list, plus how it paints.
Hiblob
A static hiblob.
HiblobOptions
Immutable options for one hiblob.
HiblobPainter
Paints a static hiblob — the painter behind the Hiblob widget.
HiblobRenderer
A resolved, ready-to-paint hiblob.
MotionFrame
One instant of motion, in view-box units.
MotionSeeds
The per-name random periods and phases motion reads.
PaletteKeys
Keys HiblobOptions.palette accepts. Each value is a hex color string.
ResolvedHiblob
A fully resolved, ready-to-draw hiblob.

Enums

Backdrop
The backdrop plates a hiblob can sit on.
HiblobAnimation
How AnimatedHiblob runs its ambient motion.

Constants

expressions → const List<Expression>
Every built-in expression, in roster order.
happy → const Expression
Closed smiling eyes.
idle → const Expression
The neutral face.
love → const Expression
Heart-shaped eyes with a warm tint.
mad → const Expression
Slanted, lowered brows with a faint hot tint.
sad → const Expression
Eyes curved upward at the outer edge.
scared → const Expression
Widest eyes with a faint cold tint.
shy → const Expression
Small closed eyes drawn inward, blushing.
sick → const Expression
Squinting lines with a queasy tint.
sleepy → const Expression
Half-closed, drooping eyes.
smug → const Expression
One eye open, one raised in a smirk.
surprised → const Expression
Wide round eyes.
thinking → const Expression
Eyes glancing up and to the left, one squinting.
unsure → const Expression
One eye open, one small and doubtful.
wink → const Expression
One eye open, one closed.

Functions

motionAt(MotionSeeds seeds, double elapsedMs, {double ramp = 0}) → MotionFrame
The motion frame at elapsedMs for seeds.
motionSeedsFor(String name, {HiblobOptions options = const HiblobOptions()}) → MotionSeeds
Reads the motion seeds for name.
resolve(String name, {HiblobOptions options = const HiblobOptions()}) → ResolvedHiblob
Resolves name with options into drawable geometry and palette.
traitsFor(String name, {HiblobOptions options = const HiblobOptions()}) → Map<String, double>
Reads the trait table for name, with options pins applied.
uiPathFrom(GeometryPath path) → Path
Converts a core GeometryPath into a dart:ui path.