ui cleanup

This commit is contained in:
Christien Rioux 2025-03-17 00:51:16 -04:00
parent d460a0388c
commit 77c68aa45f
57 changed files with 1158 additions and 914 deletions

View file

@ -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)));
}
////////////////////////////////////////////////////////////////////////////