toJson method
Implementation
@override
dynamic toJson() => {
for (final entry in (super.toJson() as Map<String, dynamic>).entries)
entry.key: entry.value,
if (duration != null) 'duration': duration,
if (durationInForeground != null)
'durationInForeground': durationInForeground,
if (inForeground != null) 'inForeground': inForeground,
if (isLaunching != null) 'isLaunching': isLaunching,
};