import 'seed_glyph.dart'; /// A profile avatar is carried in one string (stored locally and published as /// the NIP-01 kind:0 `picture`), in one of two shapes: /// - `data:image/jpeg;base64,…` — a tiny photo thumbnail (rides inline, no /// media server, like offer photos); /// - empty — a DiceBear "thumbs" face generated deterministically from the pubkey. /// /// A legacy `tane:seed:` value (a seed illustration, no longer offered in /// the picker) is still rendered for anyone who set one before; see /// [avatarGlyphChar]. const avatarGlyphPrefix = 'tane:seed:'; /// The glyph char for a legacy seed-illustration [name], or null if unknown. /// Retained only to render `tane:seed:` avatars stored before the picker dropped /// them; new avatars are photos or the generated default. String? avatarGlyphChar(String name) => switch (name) { 'jars' => SeedGlyphs.jars, 'sack' => SeedGlyphs.sack, 'jar' => SeedGlyphs.jar, 'scattered' => SeedGlyphs.scattered, 'pouring' => SeedGlyphs.pouring, 'mug' => SeedGlyphs.mug, 'bigSpoon' => SeedGlyphs.bigSpoon, 'smallSpoon' => SeedGlyphs.smallSpoon, _ => null, };