Analytics appearance tweaks (#2856)

* Use participants star for level bar

* Remove progress bar drop shadow

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
pull/2245/head
Kelrap 6 months ago committed by GitHub
parent 8d5429771c
commit 871c9303f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -209,7 +209,7 @@ class LearningProgressIndicatorsState
); );
}, },
indicator: c.indicator, indicator: c.indicator,
mini: constraints.maxWidth < 380, mini: constraints.maxWidth < 300,
), ),
) )
.toList(), .toList(),
@ -241,7 +241,7 @@ class LearningProgressIndicatorsState
left: 0, left: 0,
child: LevelBadge( child: LevelBadge(
level: _constructsModel.level, level: _constructsModel.level,
mini: constraints.maxWidth < 380, mini: constraints.maxWidth < 300,
), ),
), ),
], ],

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pangea/analytics_summary/level_bar_popup.dart'; import 'package:fluffychat/pangea/analytics_summary/level_bar_popup.dart';
import 'package:fluffychat/pangea/common/widgets/pressable_button.dart'; import 'package:fluffychat/pangea/common/widgets/pressable_button.dart';
@ -34,29 +33,13 @@ class LevelBadge extends StatelessWidget {
color: Theme.of(context).colorScheme.surfaceBright, color: Theme.of(context).colorScheme.surfaceBright,
), ),
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
child: Row( child: Text(
mainAxisSize: MainAxisSize.min, "${mini ? "$level" : L10n.of(context).levelShort(level)}",
children: [ style: TextStyle(
CircleAvatar( fontSize: 12,
backgroundColor: AppConfig.gold, fontWeight: FontWeight.bold,
radius: 8, color: Theme.of(context).colorScheme.primary,
child: Icon( ),
size: 12,
Icons.star,
color: Theme.of(context).colorScheme.surfaceBright,
weight: 1000,
),
),
const SizedBox(width: 4),
Text(
mini ? "$level" : L10n.of(context).levelShort(level),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
),
),
],
), ),
), ),
); );

@ -43,27 +43,13 @@ class LevelBarPopup extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Text(
children: [ "${L10n.of(context).levelShort(level)}",
const CircleAvatar( style: const TextStyle(
radius: 20, fontSize: 24,
backgroundColor: AppConfig.gold, fontWeight: FontWeight.w900,
child: Icon( color: AppConfig.gold,
size: 30, ),
Icons.star,
color: Colors.white,
),
),
const SizedBox(width: 10),
Text(
L10n.of(context).levelShort(level),
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.w900,
color: AppConfig.gold,
),
),
],
), ),
Opacity( Opacity(
opacity: 0.25, opacity: 0.25,

@ -95,14 +95,6 @@ class AnimatedLevelBarState extends State<AnimatedLevelBar>
borderRadius: const BorderRadius.all( borderRadius: const BorderRadius.all(
Radius.circular(AppConfig.borderRadius), Radius.circular(AppConfig.borderRadius),
), ),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(50),
spreadRadius: 0,
blurRadius: 5,
offset: const Offset(5, 0),
),
],
), ),
), ),
Positioned( Positioned(

Loading…
Cancel
Save