style: use "map/where" instead of "for" loop

This commit is contained in:
Aleksey Kulikov 2021-10-12 14:56:56 +03:00
parent 3a0fa75929
commit cfa5268af2
28 changed files with 193 additions and 323 deletions

View file

@ -31,8 +31,7 @@ class Patch {
}) {
libgit2.git_libgit2_init();
final int flagsInt =
flags.fold(0, (previousValue, e) => previousValue | e.value);
final int flagsInt = flags.fold(0, (acc, e) => acc | e.value);
var result = <String, dynamic>{};
if (a is Blob || a == null) {