Explorar o código

add comma to trigger auto formatting

xuty %!s(int64=4) %!d(string=hai) anos
pai
achega
8b62064565
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  1. 8 5
      lib/utli/circular_list.dart

+ 8 - 5
lib/utli/circular_list.dart

@@ -27,9 +27,10 @@ class CircularList<T> {
     // Reconstruct array, starting at index 0. Only transfer values from the
     // indexes 0 to length.
     final newArray = List<T?>.generate(
-        value,
-        (index) =>
-            index < _array.length ? _array[_getCyclicIndex(index)] : null);
+      value,
+      (index) => index < _array.length ? _array[_getCyclicIndex(index)] : null,
+    );
+
     _startIndex = 0;
     _array = newArray;
   }
@@ -47,8 +48,10 @@ class CircularList<T> {
     _length = value;
   }
 
-  void forEach(void Function(T? item, int index) callback,
-      [bool includeBuffer = false]) {
+  void forEach(
+    void Function(T? item, int index) callback, [
+    bool includeBuffer = false,
+  ]) {
     final len = includeBuffer ? _array.length : _length;
     for (int i = 0; i < len; i++) {
       callback(_array[_getCyclicIndex(i)], i);