forked from deniscolak/colorize-text-avatar
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AvatarInfo { | ||
/// the uniqueId of this object (e.g. full username or roomId) | ||
/// used to calculate the Multiavatar in `DisplayMode.User`. | ||
/// the uniqueId of avatar | ||
final String uniqueId; | ||
|
||
/// the display name they've chosen | ||
/// the display name they've chosen (optional) | ||
final String? displayName; | ||
|
||
/// a canonical uniqueName to use instead of the uniqueId in the tooltip, if given. | ||
/// most commonly this is the canonical alias for a space/room rather than the roomID | ||
/// if given, acts as alias for avatar in tooltip rather than `uniqueId` | ||
final String? uniqueName; | ||
|
||
/// The actual avatar (takes precedence) | ||
/// The actual avatar image renderer (takes precedence over `imageProviderFuture`) | ||
final ImageProvider<Object>? avatar; | ||
|
||
/// Or alternatively a future that loads the avatar (show fallback until loaded) | ||
final Future<ImageProvider<Object>?>? imageProviderFuture; | ||
/// a future that loads the avatar (show fallback until loaded) | ||
final Future<ImageProvider<Object>?>? avatarFuture; | ||
|
||
const AvatarInfo({ | ||
required this.uniqueId, | ||
this.displayName, | ||
this.uniqueName, | ||
this.avatar, | ||
this.imageProviderFuture, | ||
this.avatarFuture, | ||
}); | ||
} |