fix: text style correction

This commit is contained in:
Deven Joshi
2021-07-20 14:14:06 +05:30
parent 5670e18c0f
commit 7df908f9c2
@@ -27,9 +27,6 @@ class _GradientAvatarState extends State<GradientAvatar> {
@override @override
Widget build(BuildContext context) => Center( Widget build(BuildContext context) => Center(
child: RepaintBoundary( child: RepaintBoundary(
child: SizedBox(
width: 100,
height: 100,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@@ -37,17 +34,17 @@ class _GradientAvatarState extends State<GradientAvatar> {
painter: DemoPainter(widget.userId), painter: DemoPainter(widget.userId),
child: const SizedBox.expand(), child: const SizedBox.expand(),
), ),
FittedBox( Padding(
child: Padding( padding: const EdgeInsets.all(8),
padding: const EdgeInsets.all(32),
child: Opacity( child: Opacity(
opacity: 0.8, opacity: 0.7,
child: FittedBox(
child: Text( child: Text(
getShortenedName(widget.name), getShortenedName(widget.name),
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 112, fontSize: 120,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w500,
), ),
), ),
), ),
@@ -56,7 +53,6 @@ class _GradientAvatarState extends State<GradientAvatar> {
], ],
), ),
), ),
),
); );
String getShortenedName(String name) { String getShortenedName(String name) {