Exercise: Build a Stopwatch Using RxDart

Exercise your RxDart skills by building a stopwatch project.

We'll cover the following

Problem statement

In this challenge, create a stopwatch application using RxDart. You can play, pause, and stop (reset) the stopwatch.

You need to edit two files:

  • lib/bloc/stopwatch_bloc.dart: This file contains all the logic of the stopwatch that needs to be implemented. You should implement the logic to start, pause, reset, and tick the timer.

  • lib/screens/home_screen/widgets/timer.dart: This file displays the stopwatch value. It also has the play, pause, and stop buttons. In this file, you should use the StopwatchBloc to render the right values to the screen and show the right buttons.

Note: Upon application execution, you can visit the URL after “Your app can be found at:” to view the app. 

Get hands-on with 1200+ tech skills courses.