mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 06:25:15 +00:00
Merge branch 'soru/fix-avatar' into 'main'
fix: Some single-emoji names crashing See merge request ChristianPauly/fluffychat-flutter!231
This commit is contained in:
commit
5e1762c19b
1 changed files with 2 additions and 2 deletions
|
@ -30,9 +30,9 @@ class Avatar extends StatelessWidget {
|
|||
);
|
||||
final src = thumbnail;
|
||||
var fallbackLetters = '@';
|
||||
if ((name?.length ?? 0) >= 2) {
|
||||
if ((name?.runes?.length ?? 0) >= 2) {
|
||||
fallbackLetters = String.fromCharCodes(name.runes, 0, 2);
|
||||
} else if ((name?.length ?? 0) == 1) {
|
||||
} else if ((name?.runes?.length ?? 0) == 1) {
|
||||
fallbackLetters = name;
|
||||
}
|
||||
final textWidget = Center(
|
||||
|
|
Loading…
Reference in a new issue