tryParse static method

AnimationId? tryParse(
  1. String? id
)

Try to parse the id into an AnimationId object.

If the id is null or cannot be parsed, it will return null.

Implementation

static AnimationId? tryParse(String? id) {
  if (id == null) return null;

  try {
    final animationId = AnimationId.parse(id);
    return animationId;
  } catch (e) {
    return null;
  }
}