moveAnimation method

JsonMap moveAnimation(
  1. String nameFrom,
  2. String nameTo
)

Move animation from namesFrom to nameTo.

Implementation

JsonMap moveAnimation(String nameFrom, String nameTo) {
  final newJson = json;
  final animations = newJson['animations'] as JsonMap;
  animations[nameTo] = animations[nameFrom];
  animations.remove(nameFrom);

  return newJson;
}