Skip to content

Commit

Permalink
feat(app): remove gene card colors
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Nov 28, 2024
1 parent 536e135 commit 0077033
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/lib/report/pages/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class ReportPage extends StatelessWidget {
GeneCard(
genotypeResult,
warningLevelCounts[genotypeResult.key.value]!,
key: Key('gene-card-${genotypeResult.key.value}')
key: Key('gene-card-${genotypeResult.key.value}'),
useColors: false,
)
).toList();
}
Expand Down Expand Up @@ -157,13 +158,19 @@ bool _hasNoResult(GenotypeResult genotypeResult) =>
UserData.lookupFor(genotypeResult.key.value) == SpecialLookup.noResult.value;

class GeneCard extends StatelessWidget {
const GeneCard(this.genotypeResult, this.warningLevelCounts, { super.key });
const GeneCard(
this.genotypeResult,
this.warningLevelCounts, {
super.key,
this.useColors = true,
});

final GenotypeResult genotypeResult;
final WarningLevelCounts warningLevelCounts;
final bool useColors;

@visibleForTesting
Color? get color => _hasNoResult(genotypeResult)
Color? get color => !useColors || _hasNoResult(genotypeResult)
? PharMeTheme.onSurfaceColor
: _getHighestSeverityColor(warningLevelCounts);

Expand Down

0 comments on commit 0077033

Please sign in to comment.