Skip to content

Commit

Permalink
feat(app): prettier printing in PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Dec 6, 2024
1 parent 692db3c commit 9baafa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/lib/common/widgets/gene_modulator_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ class GeneModulatorList {
return content;
}

String asString(BuildContext context, {String linePrefix = ''}) {
String asString(BuildContext context) {
final listString = StringBuffer();
for (final modulatorContentEntry in getContent(context).entries) {
final entryString = StringBuffer(modulatorContentEntry.key);
if (modulatorContentEntry.value.length == 1) {
entryString.write(' ${modulatorContentEntry.value.first}');
} else {
for (final drugName in modulatorContentEntry.value) {
entryString.write('\n$linePrefix- $drugName');
entryString.write('\n- $drugName');
}
}
listString.write('\n$linePrefix$entryString');
listString.write('\n\n$entryString');
}
return listString.toString();
}
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/widgets/phenoconversion_explanation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ String? getPhenoconversionExplanationString({
geneName: genotypeResult.gene,
onlyActiveDrugs: true,
displayedDrug: drugName,
).asString(context, linePrefix: ' '),
).asString(context),
]).join(displayConfig.partSeparator);
}

Expand Down

0 comments on commit 9baafa3

Please sign in to comment.