buildMorphSequence static method

List<Morph> buildMorphSequence(
  1. List<RoundedPolygon> polygons, {
  2. required bool circularSequence,
})

Implementation

static List<material_shapes.Morph> buildMorphSequence(
  List<material_shapes.RoundedPolygon> polygons, {
  required bool circularSequence,
}) {
  final polygonsLength = polygons.length;
  final morphSequenceLength = circularSequence
      ? polygonsLength
      : polygonsLength - 1;
  return morphSequenceLength > 0
      ? _createMorphSequence(
          polygons: polygons,
          polygonsLength: polygonsLength,
          circularSequence: circularSequence,
          morphSequenceLength: morphSequenceLength,
        )
      : const [];
}