Skip to content

Commit 1608657

Browse files
authored
Fix legend to show dash line. (#4892)
1 parent 47c8677 commit 1608657

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

packages/devtools_app/lib/src/screens/memory/memory_tabs.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class MemoryTabView extends StatelessWidget {
4343
tabs.add(record.tab);
4444
tabViews.add(record.tabView);
4545
}
46-
print('rebuilding analytics tabbed view');
4746
return AnalyticsTabbedView(
4847
tabs: tabs,
4948
tabViews: tabViews,

packages/devtools_app/lib/src/screens/memory/primitives/painting.dart

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,23 @@
44

55
import 'package:flutter/material.dart';
66

7-
const _totalDashWidth = 15.0;
7+
// TODO(polina-c): use the same constants as for dash in the chart.
88
const _dashHeight = 2.0;
9-
const _dashWidth = 4.0;
9+
const _dashWidth = 5.0;
1010
const _spaceBetweenDash = 3.0;
1111

1212
Widget createDashWidget(Color color) {
13-
return Container(
14-
padding: const EdgeInsets.only(right: 20),
15-
child: CustomPaint(
16-
painter: DashedLine(
17-
_totalDashWidth,
18-
color,
19-
_dashHeight,
20-
_dashWidth,
21-
_spaceBetweenDash,
22-
),
23-
foregroundPainter: DashedLine(
24-
_totalDashWidth,
25-
color,
26-
_dashHeight,
27-
_dashWidth,
28-
_spaceBetweenDash,
29-
),
30-
),
13+
final dash = Container(
14+
width: _dashWidth,
15+
height: _dashHeight,
16+
color: color,
17+
);
18+
const space = SizedBox(
19+
width: _spaceBetweenDash,
20+
height: _dashHeight,
21+
);
22+
return Row(
23+
children: [dash, space, dash, space, dash],
3124
);
3225
}
3326

15 Bytes
Loading

0 commit comments

Comments
 (0)