feat: use custom vocab and morph icons (#1787)
This commit is contained in:
parent
ffb08ff336
commit
9a94045e5d
2 changed files with 10 additions and 9 deletions
|
|
@ -38,11 +38,10 @@ class ProgressIndicatorBadge extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
size: 14,
|
||||
indicator.icon,
|
||||
color: indicator.color(context),
|
||||
weight: 1000,
|
||||
SizedBox(
|
||||
width: 14,
|
||||
height: 14,
|
||||
child: Image.network(indicator.iconURL!),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
!loading
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/analytics_constants.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/construct_type_enum.dart';
|
||||
|
||||
enum ProgressIndicatorEnum {
|
||||
|
|
@ -23,14 +25,14 @@ extension ProgressIndicatorsExtension on ProgressIndicatorEnum {
|
|||
}
|
||||
}
|
||||
|
||||
IconData get iconSelected {
|
||||
String? get iconURL {
|
||||
switch (this) {
|
||||
case ProgressIndicatorEnum.wordsUsed:
|
||||
return Symbols.dictionary;
|
||||
return '${AppConfig.assetsBaseURL}/${AnalyticsConstants.vocabIconFileName}';
|
||||
case ProgressIndicatorEnum.morphsUsed:
|
||||
return Symbols.toys_and_games;
|
||||
return '${AppConfig.assetsBaseURL}/${AnalyticsConstants.morphIconFileName}';
|
||||
case ProgressIndicatorEnum.level:
|
||||
return Icons.star;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue