mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-29 09:18:40 -04:00
ui cleanup
This commit is contained in:
parent
d460a0388c
commit
77c68aa45f
57 changed files with 1158 additions and 914 deletions
|
@ -5,7 +5,7 @@ import 'package:flutter/widgets.dart';
|
|||
import '../theme.dart';
|
||||
|
||||
class AvatarWidget extends StatelessWidget {
|
||||
AvatarWidget({
|
||||
const AvatarWidget({
|
||||
required String name,
|
||||
required double size,
|
||||
required Color borderColor,
|
||||
|
@ -38,15 +38,11 @@ class AvatarWidget extends StatelessWidget {
|
|||
height: _size,
|
||||
width: _size,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: _scaleConfig.useVisualIndicators
|
||||
? Border.all(
|
||||
color: _borderColor,
|
||||
width: 1 * (_size ~/ 32 + 1),
|
||||
strokeAlign: BorderSide.strokeAlignOutside)
|
||||
: null,
|
||||
color: _borderColor,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: _borderColor,
|
||||
width: 1 * (_size ~/ 32 + 1),
|
||||
strokeAlign: BorderSide.strokeAlignOutside)),
|
||||
child: AvatarImage(
|
||||
//size: 32,
|
||||
backgroundImage: _imageProvider,
|
||||
|
@ -55,14 +51,15 @@ class AvatarWidget extends StatelessWidget {
|
|||
? _foregroundColor
|
||||
: _backgroundColor,
|
||||
child: Text(
|
||||
shortname,
|
||||
shortname.isNotEmpty ? shortname : '?',
|
||||
softWrap: false,
|
||||
style: _textStyle.copyWith(
|
||||
color: _scaleConfig.useVisualIndicators &&
|
||||
!_scaleConfig.preferBorders
|
||||
? _backgroundColor
|
||||
: _foregroundColor,
|
||||
),
|
||||
)));
|
||||
).fit().paddingAll(_size / 16)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue