how to make watch in flutter
Timer.periodic(Duration(seconds: 1), (timer) {
var perviousMinute = DateTime.now().add(Duration(seconds: -1)).minute;
var currentMinute = DateTime.now().minute;
if (perviousMinute != currentMinute)
setState(() {
formattedTime = DateFormat('HH:mm').format(DateTime.now());
});
});