From 7df908f9c21d894e31a0d85a5e8e56033279c184 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Tue, 20 Jul 2021 14:14:06 +0530 Subject: [PATCH] fix: text style correction --- .../lib/src/gradient_avatar.dart | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/gradient_avatar.dart b/packages/stream_chat_flutter/lib/src/gradient_avatar.dart index aef80712..45cc1e96 100644 --- a/packages/stream_chat_flutter/lib/src/gradient_avatar.dart +++ b/packages/stream_chat_flutter/lib/src/gradient_avatar.dart @@ -27,34 +27,30 @@ class _GradientAvatarState extends State { @override Widget build(BuildContext context) => Center( child: RepaintBoundary( - child: SizedBox( - width: 100, - height: 100, - child: Stack( - alignment: Alignment.center, - children: [ - CustomPaint( - painter: DemoPainter(widget.userId), - child: const SizedBox.expand(), - ), - FittedBox( - child: Padding( - padding: const EdgeInsets.all(32), - child: Opacity( - opacity: 0.8, - child: Text( - getShortenedName(widget.name), - style: const TextStyle( - color: Colors.white, - fontSize: 112, - fontWeight: FontWeight.bold, - ), + child: Stack( + alignment: Alignment.center, + children: [ + CustomPaint( + painter: DemoPainter(widget.userId), + child: const SizedBox.expand(), + ), + Padding( + padding: const EdgeInsets.all(8), + child: Opacity( + opacity: 0.7, + child: FittedBox( + child: Text( + getShortenedName(widget.name), + style: const TextStyle( + color: Colors.white, + fontSize: 120, + fontWeight: FontWeight.w500, ), ), ), ), - ], - ), + ), + ], ), ), );