Skip to content

Commit 0459025

Browse files
committed
Set dartVersion to private and move _extractDartVersion out of init
1 parent 51bce18 commit 0459025

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dart/lib/src/event_processor/enricher/io_enricher_event_processor.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ EnricherEventProcessor enricherEventProcessor(SentryOptions options) {
1212
/// Uses Darts [Platform](https://api.dart.dev/stable/dart-io/Platform-class.html)
1313
/// class to read information.
1414
class IoEnricherEventProcessor implements EnricherEventProcessor {
15-
IoEnricherEventProcessor(this._options) {
16-
dartVersion = _extractDartVersion(Platform.version);
17-
}
15+
IoEnricherEventProcessor(this._options);
1816

1917
final SentryOptions _options;
20-
late final String dartVersion;
18+
late final String _dartVersion = _extractDartVersion(Platform.version);
2119

2220
/// Extracts the semantic version and channel from the full version string.
2321
///
@@ -73,7 +71,7 @@ class IoEnricherEventProcessor implements EnricherEventProcessor {
7371
// like Flutter: https://flutter.dev/docs/testing/build-modes
7472
final dartRuntime = SentryRuntime(
7573
name: 'Dart',
76-
version: dartVersion,
74+
version: _dartVersion,
7775
rawDescription: Platform.version,
7876
);
7977
if (runtimes == null) {

0 commit comments

Comments
 (0)