timerWidget method
Implementation
Widget timerWidget(int sec) {
return Container(
width: 81,
height: 35,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24.0),
color: const Color.fromRGBO(20, 20, 20, 0.6)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 8,
width: 8,
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
const SizedBox(width: 8),
Text(
isTimerRunning ? formatDuration(seconds) : '00:00:00',
style: const TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
),
),
],
),
);
}