Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/src/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ enum OkfGraphResolution {

const OkfGraphResolution(this.wireValue);

/// Stable JSON representation.
final String wireValue;

/// Parses the stable JSON representation.
static OkfGraphResolution fromWireValue(String value) {
factory OkfGraphResolution.fromWireValue(String value) {
for (final resolution in values) {
if (resolution.wireValue == value) {
return resolution;
}
}
throw FormatException('Unknown graph resolution', value);
}

/// Stable JSON representation.
final String wireValue;
}

/// Composable filters for constructing an [OkfGraph].
Expand Down
8 changes: 4 additions & 4 deletions lib/src/metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ enum OkfLifecycleStatus {

const OkfLifecycleStatus(this.wireValue);

/// The stable lowercase representation.
final String wireValue;

static OkfLifecycleStatus _parse(String? value) {
factory OkfLifecycleStatus._parse(String? value) {
switch (value?.trim().toLowerCase()) {
case null:
case '':
Expand All @@ -72,6 +69,9 @@ enum OkfLifecycleStatus {
return unknown;
}
}

/// The stable lowercase representation.
final String wireValue;
}

/// A date range framing one or more source usage counts.
Expand Down
Loading