refactor(git_types): use enums (#53)

Use Dart's new feature "Enhanced enums with members".
This commit is contained in:
Aleksey Kulikov 2022-05-05 13:12:47 +03:00 committed by GitHub
parent 984b44d992
commit e9e70cfc62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 863 additions and 1512 deletions

View file

@ -69,7 +69,7 @@ class Merge {
final result = GitMergeAnalysis.values
.where((e) => analysisInt[0] & e.value == e.value)
.toSet();
final preference = GitMergePreference.values.singleWhere(
final preference = GitMergePreference.values.firstWhere(
(e) => analysisInt[1] == e.value,
);