Skip to content

Commit

Permalink
feat: 69 - method to get a server type from its off tag (#796)
Browse files Browse the repository at this point in the history
Impacted file:
* `server_type.dart`: implemented the `fromOffTag` method
  • Loading branch information
monsieurtanuki authored Sep 7, 2023
1 parent fdc6381 commit 0bd8f90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/utils/server_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ enum ServerType implements OffTagged {

@override
final String offTag;

/// Returns the [ServerType] that matches the [offTag].
static ServerType? fromOffTag(final String? offTag) =>
OffTagged.fromOffTag(offTag, ServerType.values) as ServerType?;
}

0 comments on commit 0bd8f90

Please sign in to comment.