design: Improved spaces UX
This commit is contained in:
parent
bedfde7c10
commit
2538f31351
6 changed files with 410 additions and 193 deletions
|
|
@ -30,7 +30,9 @@ class PublicRoomDialog extends StatelessWidget {
|
|||
final result = await showFutureLoadingDialog<String>(
|
||||
context: context,
|
||||
future: () async {
|
||||
if (chunk != null && client.getRoomById(chunk.roomId) != null) {
|
||||
if (chunk != null &&
|
||||
client.getRoomById(chunk.roomId) != null &&
|
||||
client.getRoomById(chunk.roomId)?.membership != Membership.leave) {
|
||||
return chunk.roomId;
|
||||
}
|
||||
final roomId = chunk != null && knock
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ class Avatar extends StatelessWidget {
|
|||
final BorderRadius? borderRadius;
|
||||
final IconData? icon;
|
||||
final BorderSide? border;
|
||||
final Color? backgroundColor;
|
||||
final Color? textColor;
|
||||
|
||||
const Avatar({
|
||||
this.mxContent,
|
||||
|
|
@ -30,6 +32,8 @@ class Avatar extends StatelessWidget {
|
|||
this.borderRadius,
|
||||
this.border,
|
||||
this.icon,
|
||||
this.backgroundColor,
|
||||
this.textColor,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
|
@ -71,14 +75,16 @@ class Avatar extends StatelessWidget {
|
|||
height: size,
|
||||
placeholder: (_) => noPic
|
||||
? Container(
|
||||
decoration: BoxDecoration(color: name?.lightColorAvatar),
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? name?.lightColorAvatar,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
fallbackLetters,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'RobotoMono',
|
||||
color: Colors.white,
|
||||
color: textColor ?? Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: (size / 2.5).roundToDouble(),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue