Skip to content

Commit

Permalink
mv Collections to _you_dart_internal
Browse files Browse the repository at this point in the history
  • Loading branch information
chen56 committed May 15, 2024
1 parent 57ae891 commit 3612945
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
17 changes: 17 additions & 0 deletions packages/_you_dart_internal/lib/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:meta/meta.dart';
Types types = Types();
Strings strings = Strings();
final Collections collections=Collections();


@experimental
Expand Down Expand Up @@ -117,3 +118,19 @@ class Strings {
}
}
}



class Collections{
Iterable<(E value, E? next)> combineNext<E>(Iterable<E> values) sync* {
var list = values.toList();
for (int i = 0; i < list.length; i++) {
if (i + 1 < list.length) {
yield (list[i], list[i + 1]);
} else {
yield (list[i], null);
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:analyzer/src/test_utilities/mock_sdk.dart';
import 'package:meta/meta.dart';
import 'package:path/path.dart' as path_;
import 'package:you_flutter/src/utils_core.dart';

typedef _AddCell = ({Block belongTo, MethodInvocation invocation});

Expand Down
15 changes: 0 additions & 15 deletions packages/you_flutter/lib/src/utils_core.dart

This file was deleted.

0 comments on commit 3612945

Please sign in to comment.