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,
mini: constraints.maxWidth < 380,
mini: constraints.maxWidth < 300,
),
)
.toList(),
@ -241,7 +241,7 @@ class LearningProgressIndicatorsState
left: 0,
child: LevelBadge(
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:fluffychat/config/app_config.dart';
import 'package:fluffychat/pangea/analytics_summary/level_bar_popup.dart';
import 'package:fluffychat/pangea/common/widgets/pressable_button.dart';
@ -34,29 +33,13 @@ class LevelBadge extends StatelessWidget {
color: Theme.of(context).colorScheme.surfaceBright,
),
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
CircleAvatar(
backgroundColor: AppConfig.gold,
radius: 8,
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,
),
),
],
child: 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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
const CircleAvatar(
radius: 20,
backgroundColor: AppConfig.gold,
child: Icon(
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,
),
),
],
Text(
"${L10n.of(context).levelShort(level)}",
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.w900,
color: AppConfig.gold,
),
),
Opacity(
opacity: 0.25,

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

Loading…
Cancel
Save