computeShapeOf static method

List<int> computeShapeOf(
  1. Object o
)

Returns shape of an object as an int list

Implementation

static List<int> computeShapeOf(Object o) {
  int size = computeNumDimensions(o);
  List<int> dimensions = List.filled(size, 0, growable: false);
  fillShape(o, 0, dimensions);
  return dimensions;
}