Skip to content

Commit

Permalink
[Presentation] Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Jun 1, 2022
1 parent 481afe8 commit 30a6310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/presentation/charts/charts_page.dart
Expand Up @@ -536,7 +536,7 @@ class _ElementsWrap extends StatelessWidget {
width: width,
color: e.getElementColor(true),
text: s.translateElementType(e),
lineThrough: selectedElementTypes.contains(e),
selected: selectedElementTypes.isNotEmpty ? selectedElementTypes.contains(e) : true,
tap: () => context.read<ChartElementsBloc>().add(ChartElementsEvent.elementSelected(type: e)),
),
)
Expand Down
6 changes: 3 additions & 3 deletions lib/presentation/charts/widgets/chart_legend.dart
Expand Up @@ -25,7 +25,7 @@ class ChartLegendIndicator extends StatelessWidget {
final double size;
final Function? tap;
final bool expandText;
final bool lineThrough;
final bool selected;
final double? width;

const ChartLegendIndicator({
Expand All @@ -35,7 +35,7 @@ class ChartLegendIndicator extends StatelessWidget {
this.size = 16,
this.tap,
this.expandText = true,
this.lineThrough = false,
this.selected = false,
this.width,
}) : super(key: key);

Expand All @@ -45,7 +45,6 @@ class ChartLegendIndicator extends StatelessWidget {
fontSize: size,
fontWeight: FontWeight.bold,
color: Colors.grey,
decoration: lineThrough ? TextDecoration.lineThrough : null,
decorationThickness: 3,
);
return Container(
Expand All @@ -64,6 +63,7 @@ class ChartLegendIndicator extends StatelessWidget {
color: color,
borderRadius: BorderRadius.circular(5),
),
child: selected ? Icon(Icons.check_circle_outline, size: size / 1.2) : null,
),
const SizedBox(width: 4),
if (expandText)
Expand Down

0 comments on commit 30a6310

Please sign in to comment.