Flutter Basics

GETTING STARTED

We have installed flutter and set up an environment for both iOS and Android. Let
us now move ahead in the tutorial. But before that, we will run “flutter doctor”
command in the terminal to check whether everything is appropriately set up or
not.

Flutter Basics

Doctor has found 2 issues in this category. Xcode is not updated here and there is
no external device connected to flutter as of now.

Starting with Flutter Basics:

When creating new flutter applications, there are some folders and files already
made. Let me give you a quick overview of what these folders and files do.

Flutter Basics
  1. Android
    This file basically is responsible for generating the android part of the application. It
    is a super important file. It is used to merge apps to flutter with the help of the
    android studio. We do not work on this file a lot, only when we need to implement
    something specifically to the android platform.
  2. iOS
    This file is also essential, especially for those who are developing cross platform
    apps. This file is responsible for the iOS platform, and flutter uses Xcode to merge
    that app to flutter.
  3. lib
    This folder is responsible for everything in your flutter app. 99% of the work will be
    done in this folder only. It contains the main. dart file, which is where our app’s
    main code lines will be written. This is where we will make different files for
    different work as well. This folder is the heart and soul of our flutter application.
  4. Test
    The test folder is another crucial folder for our flutter applications. It will not be
    used to create an app, but it will do something even more critical. It will be used
    for testing the final output of applications.
  5. pubspec.yaml
    Every flutter app will have this file by default. This file contains packages,
    dependencies and other metadata that our app is using in the background. This
    file is super important but, at the same time, super sensitive. It has some rules for
    syntax, which needs to be followed precisely for error free app code (we will
    discuss that later in detail).