From 819c5fc6dfebbd4f9c7e67c9eb88cb5ed7a95e02 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 15 Mar 2024 15:19:05 +0000 Subject: [PATCH] [automated commit] lint format and import sort --- lib/src/components/avatars/avatar.dart | 39 +++++++------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/lib/src/components/avatars/avatar.dart b/lib/src/components/avatars/avatar.dart index 6726dd7a..c1d4bf6a 100644 --- a/lib/src/components/avatars/avatar.dart +++ b/lib/src/components/avatars/avatar.dart @@ -91,8 +91,7 @@ class ZetaAvatar extends StatelessWidget { /// Notification Badge shown at top right corner of avatar. final ZetaIndicator? upperBadge; - bool get _showPlaceholder => - image == null && (initials == null || initials!.isEmpty); + bool get _showPlaceholder => image == null && (initials == null || initials!.isEmpty); @override Widget build(BuildContext context) { @@ -100,8 +99,7 @@ class ZetaAvatar extends StatelessWidget { final borderSize = size.borderSize; final sizePixels = size.pixelSize; - final contentSizePixels = - size.pixelSize - (borderColor != null ? size.borderSize * 2 : 0); + final contentSizePixels = size.pixelSize - (borderColor != null ? size.borderSize * 2 : 0); final innerContent = ClipRRect( borderRadius: BorderRadius.circular(64), @@ -109,8 +107,7 @@ class ZetaAvatar extends StatelessWidget { child: image ?? (_showPlaceholder ? Container( - transform: Matrix4.translationValues( - -contentSizePixels * 0.2, -contentSizePixels * 0.1, 0), + transform: Matrix4.translationValues(-contentSizePixels * 0.2, -contentSizePixels * 0.1, 0), child: IconTheme( data: IconThemeData( color: Zeta.of(context).colors.cool, @@ -121,11 +118,8 @@ class ZetaAvatar extends StatelessWidget { ) : Center( child: Text( - size == ZetaAvatarSize.xs - ? initials!.substring(0, 1) - : initials!, - style: - TextStyle(fontSize: size.fontSize, letterSpacing: -0.5), + size == ZetaAvatarSize.xs ? initials!.substring(0, 1) : initials!, + style: TextStyle(fontSize: size.fontSize, letterSpacing: -0.5), ), )), ); @@ -137,33 +131,20 @@ class ZetaAvatar extends StatelessWidget { width: sizePixels, height: sizePixels, decoration: BoxDecoration( - border: borderColor != null - ? Border.all( - color: borderColor!, width: borderSize / ZetaSpacing.x0_5) - : null, + border: borderColor != null ? Border.all(color: borderColor!, width: borderSize / ZetaSpacing.x0_5) : null, borderRadius: ZetaRadius.full, - color: backgroundColor ?? - (_showPlaceholder - ? zetaColors.surfacePrimary - : zetaColors.cool.shade20), + color: backgroundColor ?? (_showPlaceholder ? zetaColors.surfacePrimary : zetaColors.cool.shade20), ), child: borderColor != null ? Container( width: contentSizePixels, height: contentSizePixels, decoration: BoxDecoration( - color: _showPlaceholder - ? backgroundColor ?? zetaColors.surfaceHovered - : null, - border: Border.all( - color: zetaColors.surfacePrimary, - width: borderSize / ZetaSpacing.x0_5), + color: _showPlaceholder ? backgroundColor ?? zetaColors.surfaceHovered : null, + border: Border.all(color: zetaColors.surfacePrimary, width: borderSize / ZetaSpacing.x0_5), borderRadius: ZetaRadius.full, ), - child: ClipRRect( - borderRadius: ZetaRadius.full, - clipBehavior: Clip.hardEdge, - child: innerContent), + child: ClipRRect(borderRadius: ZetaRadius.full, clipBehavior: Clip.hardEdge, child: innerContent), ) : DecoratedBox( decoration: BoxDecoration(