mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(git_types): use enums (#53)
Use Dart's new feature "Enhanced enums with members".
This commit is contained in:
parent
984b44d992
commit
e9e70cfc62
13 changed files with 863 additions and 1512 deletions
|
@ -481,7 +481,7 @@ class DiffDelta {
|
|||
|
||||
/// Type of change.
|
||||
GitDelta get status {
|
||||
return GitDelta.values.singleWhere(
|
||||
return GitDelta.values.firstWhere(
|
||||
(e) => _diffDeltaPointer.ref.status == e.value,
|
||||
);
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ class DiffFile {
|
|||
|
||||
/// One of the [GitFilemode] values.
|
||||
GitFilemode get mode {
|
||||
return GitFilemode.values.singleWhere((e) => _diffFile.mode == e.value);
|
||||
return GitFilemode.values.firstWhere((e) => _diffFile.mode == e.value);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue