chore: give neutral construct uses a neutral color (#2513)
This commit is contained in:
parent
33c2024f80
commit
6df7b25af2
2 changed files with 8 additions and 3 deletions
|
|
@ -1,9 +1,11 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/construct_use_type_enum.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/constructs/construct_identifier.dart';
|
||||
|
|
@ -196,6 +198,11 @@ class OneConstructUse {
|
|||
|
||||
int get pointValue => useType.pointValue;
|
||||
|
||||
Color pointValueColor(BuildContext context) {
|
||||
if (pointValue == 0) return Theme.of(context).colorScheme.primary;
|
||||
return pointValue > 0 ? AppConfig.gold : Colors.red;
|
||||
}
|
||||
|
||||
ConstructIdentifier get identifier => ConstructIdentifier(
|
||||
lemma: lemma,
|
||||
type: constructType,
|
||||
|
|
|
|||
|
|
@ -160,9 +160,7 @@ class LevelBarPopup extends StatelessWidget {
|
|||
fontWeight: FontWeight.w900,
|
||||
fontSize: 14,
|
||||
height: 1,
|
||||
color: use.pointValue > 0
|
||||
? AppConfig.gold
|
||||
: Colors.red,
|
||||
color: use.pointValueColor(context),
|
||||
),
|
||||
),
|
||||
// const SizedBox(width: 5),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue