From the course: Flutter Essential Training: Build for Multiple Platforms

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Understanding the Counter App code

Understanding the Counter App code

- [Woman] Time to talk about the code inside main.dart. Now let's keep the expectations fairly low, the expectation that you will understand everything in this code from day one. It is completely okay that you do not understand most of it, because the counter app is not a usual hello world app with just a print statement. There are concepts here that are beyond the scope of the first lesson, so let's just take a very small step and try to understand what exactly is happening in this code. You obviously understand the output here, you have a count value that increments each time the plus button, or the floating action button is tapped, and the increment value is reflected on the screen. So let's check the code, the first thing that you might see are the import, so here you're importing the flutter material.dart. Here are the material package from the flutter SDK has been imported, it is nothing but a library that helps you…

Contents