diff --git a/app/lib/common/models/drug/drug_inhibitors.dart b/app/lib/common/models/drug/drug_inhibitors.dart index e55fcc2f..16a5fab2 100644 --- a/app/lib/common/models/drug/drug_inhibitors.dart +++ b/app/lib/common/models/drug/drug_inhibitors.dart @@ -161,7 +161,7 @@ String _inhibitionTooltipText( }${displayConfig.partSeparator}$inhibitorsString'; } -Table _drugInteractionTemplate( +Widget _drugInteractionTemplate( BuildContext context, String tooltipText, _DisplayConfig displayConfig, @@ -291,7 +291,7 @@ String inhibitionTooltipText( return tooltipText; } -Table buildDrugInteractionInfo( +Widget buildDrugInteractionInfo( BuildContext context, List genotypeResults, { required String? drug } diff --git a/app/lib/common/widgets/annotation_table.dart b/app/lib/common/widgets/annotation_table.dart index 1d9cbaf3..b225c29c 100644 --- a/app/lib/common/widgets/annotation_table.dart +++ b/app/lib/common/widgets/annotation_table.dart @@ -8,23 +8,30 @@ class TableRowDefinition { final String? tooltip; } -Table buildTable( +Widget buildTable( List rowDefinitions, { TextStyle? style, bool boldHeader = true, } ) { - return Table( - defaultColumnWidth: IntrinsicColumnWidth(), - children: rowDefinitions.mapIndexed((index, rowDefinition) => _buildRow( - rowDefinition.key, - rowDefinition.value, - style ?? PharMeTheme.textTheme.bodyMedium!, - boldHeader: boldHeader, - isLast: index == rowDefinitions.length - 1, - tooltip: rowDefinition.tooltip, - )).toList(), + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: rowDefinitions.mapIndexed( + (index, rowDefinition) => Table( + defaultColumnWidth: IntrinsicColumnWidth(), + children: [ + _buildRow( + rowDefinition.key, + rowDefinition.value, + style ?? PharMeTheme.textTheme.bodyMedium!, + boldHeader: boldHeader, + isLast: index == rowDefinitions.length - 1, + tooltip: rowDefinition.tooltip, + ), + ], + ), + ).toList(), ); }