equals function

bool equals(
  1. String? str,
  2. dynamic comparison
)

check if the string matches the comparison

Implementation

bool equals(String? str, comparison) {
  return str == comparison.toString();
}