My Time - Listening to a Stream of Data

As you are reading this book, you are probably at war. It's a war with battles that happen daily and has an impact on the quality of your life. It's the war against distractions.

Right now, you may be tempted to check your email or have a look at social media, to listen to the people talking nearby or grab that snack waiting for you in the room nearby, or to have a quick look at your smartphone.

Well, please don't!

There are several studies showing that, if you want to be successful in your activities, you need to practice deep work. Deep work is in a state of concentration that allows you to maximize your cognitive capabilities. You can use deep work when you study a book such as this, when you learn a new language, or when you write an app—in short, whenever you need to perform work that creates value or improves your skills. 

The definition of deep work comes from the bestselling book "Deep Work: Rules for Focused Success in a Distracted World," by Cal Newport. 

There is a simple solution, and we will address that in the app that we'll be building in this chapter: you need to plan work and break time, and you have to stick to that plan. In this chapter, you'll build an app that will help you set the time intervals that work for you, and measure your work and break time. In fact, you'll be building a productivity app containing a countdown that tells you your remaining working or break time, with an animation on the screen. On a second screen, you'll also be able to set the duration of your work time, short break, and long breaks, and save them on your device.

By the end of this chapter, you'll know how to use Stream and StreamBuilder, add simple navigation to your apps, integrate external libraries in your Flutter projects, and use SharedPreferences to persist data.

It will be a good exercise in learning several important Flutter features that we haven't touched on so far, such as the following:

  • Building a layout leveraging an external library
  • Listening to data streams and using asynchronous programming
  • Navigating from one screen to another in your app
  • Using shared preferences to persist data in your device
  • Using a GridView and choosing the right colors for your app

Following this project should take approximately 3 hours.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.54.255