Skip to content

Commit

Permalink
feat: 69 - method to get a server type from its off tag
Browse files Browse the repository at this point in the history
Impacted file:
* `server_type.dart`: implemented the `fromOffTag` method
  • Loading branch information
monsieurtanuki committed Sep 7, 2023
1 parent a26ec2a commit 8d8fec9
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 8d8fec9

Please sign in to comment.