firstMatching -> firstWhere
Timer.repeating -> Timer.periodic