Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeline bug throwing error for empty recording #1630

Merged
merged 1 commit into from Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -254,7 +254,8 @@ class TimelineScreenBodyState extends State<TimelineScreenBody>

Widget _buildFlameChartSection() {
Widget content;
final fullTimelineEmpty = controller.fullTimeline.data?.isEmpty ?? true;
final fullTimelineEmpty = (controller.fullTimeline.data?.isEmpty ?? true) ||
controller.fullTimeline.data.eventGroups.isEmpty;
if (timelineMode == TimelineMode.full &&
(recording || processing || fullTimelineEmpty)) {
content = ValueListenableBuilder<bool>(
Expand Down
Expand Up @@ -422,6 +422,9 @@ class FullTimeline
FutureOr<void> processTraceEvents(List<TraceEventWrapper> traceEvents) async {
await processor.processTimeline(traceEvents);
_timelineController.fullTimeline.data.initializeEventGroups();
if (_timelineController.fullTimeline.data.eventGroups.isEmpty) {
_emptyRecordingNotifier.value = true;
}
}

@override
Expand Down