Files
buzz/mobile/lib/features/profile/emoji_avatar_tile.dart
klopez4212 a0298539f7 Add mobile profile editing (#6583)
## Summary

- add mobile editing for display name, profile description, and profile
photo
- support image positioning, emoji backgrounds, and animated avatar
capture with native iOS controls
- refine settings navigation, profile motion, and the connection
identity row

## Testing

- `just mobile-check`
- `just mobile-test` (1,685 tests)

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
Co-authored-by: Carl <3c4caeafb646d23867f1c4832e68211d77e2561946171625f75c3ce1a3f2670f@buzz.block.builderlab.xyz>
2026-08-24 20:26:28 +01:00

59 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import '../../shared/emoji/native_emoji_glyph.dart';
import '../../shared/theme/theme.dart';
/// A selectable emoji tile with an explicit accessibility selection state.
class EmojiAvatarTile extends StatelessWidget {
/// Creates an emoji option for an avatar picker.
const EmojiAvatarTile({
required this.emoji,
required this.label,
required this.tileId,
required this.isSelected,
required this.onTap,
super.key,
});
/// The Unicode emoji glyph rendered by this tile.
final String emoji;
/// The human-readable emoji name announced to assistive technology.
final String label;
/// The stable identifier used for the tile's widget key.
final String tileId;
/// Whether this emoji is the current avatar selection.
final bool isSelected;
/// Called when the tile is selected.
final VoidCallback onTap;
@override
Widget build(BuildContext context) => Semantics(
label: label,
button: true,
selected: isSelected,
onTap: onTap,
child: ExcludeSemantics(
child: InkWell(
key: ValueKey('emoji-avatar-$tileId'),
borderRadius: BorderRadius.circular(Radii.sm),
onTap: onTap,
child: DecoratedBox(
decoration: BoxDecoration(
color: isSelected
? context.colors.primaryContainer
: Colors.transparent,
borderRadius: BorderRadius.circular(Radii.sm),
),
child: Center(
child: NativeEmojiGlyph(emoji: emoji, size: 30, opticalBoxSize: 30),
),
),
),
),
);
}