feat(profile): drop seed-glyph illustrations from the avatar picker
The picker now offers only a photo; with none, the generated DiceBear avatar is used. Removes the seedks-ttf illustration row (and the now-dead avatarGlyphNames/avatarGlyphToken). tane:seed:<glyph> values set before this still render (avatarGlyphChar kept) for backward compatibility.
This commit is contained in:
parent
109c85298c
commit
17612b8147
3 changed files with 15 additions and 54 deletions
|
|
@ -2,16 +2,14 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import '../i18n/strings.g.dart';
|
||||
import '../services/offer_thumbnail.dart' show offerThumbnailDataUri;
|
||||
import 'avatar.dart';
|
||||
import 'photo_pick.dart';
|
||||
import 'seed_glyph.dart';
|
||||
import 'theme.dart';
|
||||
|
||||
/// Lets the user choose a profile avatar: take/pick a photo (shrunk to a tiny
|
||||
/// inline thumbnail), pick one of our seed illustrations, or remove it.
|
||||
/// inline thumbnail) or remove it. With no photo, a generated avatar is used.
|
||||
///
|
||||
/// Returns the new avatar value (`data:` thumbnail or `tane:seed:<glyph>`),
|
||||
/// an empty string to clear it, or null when cancelled.
|
||||
/// Returns the new avatar value (a `data:` photo thumbnail), an empty string to
|
||||
/// clear it (falls back to the generated avatar), or null when cancelled.
|
||||
Future<String?> showAvatarPicker(
|
||||
BuildContext context, {
|
||||
required String current,
|
||||
|
|
@ -46,29 +44,6 @@ Future<String?> showAvatarPicker(
|
|||
}
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(t.avatar.illustration,
|
||||
style: const TextStyle(color: seedMuted, fontSize: 13)),
|
||||
const SizedBox(height: 10),
|
||||
Wrap(
|
||||
spacing: 14,
|
||||
runSpacing: 14,
|
||||
children: [
|
||||
for (final name in avatarGlyphNames)
|
||||
InkWell(
|
||||
key: Key('avatar.glyph.$name'),
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
onTap: () => Navigator.of(sheetContext)
|
||||
.pop(avatarGlyphToken(name)),
|
||||
child: CircleAvatar(
|
||||
radius: 24,
|
||||
backgroundColor: seedGreen,
|
||||
child: SeedGlyph(avatarGlyphChar(name)!,
|
||||
size: 26, color: Colors.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (current.isNotEmpty) ...[
|
||||
const SizedBox(height: 8),
|
||||
Align(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue