Home » Getting started with flutter
App Development Computers and Technology

Getting started with flutter

Flutter is an Open-Source UI SDK created by Google. It permits the advancement of iOS/Android applications and utilizations Dart as the programming language. Dart is an Open-Source, customer side programming language. It is not difficult to learn, stable, and it helps many ios – android app development company in bangalore in creating high-performance applications.  In this article we are going to learn get started with flutter. There are many interactive widgets to build beautiful flutter apps.

In today’s article we are going to learn get started with flutter project and components of its structure. So let’s start: –

  1. All right I opened up a new end of base coat.
  2. If you have not installed flutter sdk on your operating system then first thing you need to do is install flutter.
  3. Based on your operating system download the flutter sdk for your device.
  4. After successfully installed flutter let’s back to bezel studio code editor.
  5. I recommend you to use bezel studio code because it is lightweight and it has large number of extensions that helps you to foster development and most of the programmer using this code editor.
  6. All right now we’re going to create our first flutter application.
  7. In this code creating a new flutter application is quite easy.
  8. The first thing we are going to do is open a folder. We need to click on that and select a directory.
  9. I’m going to select desktop get started and then select folder. Now we are on get started folder.
  10. Now if you are on mac simply hold command shift and p together and if you are on windows simply hold ctrl+shift+p together.
  11. There are many comments appear we just need to find out flutter new project.
  12. I’m going to search for flutter. We can see flutter new project comment appear. We just need to click on that and then it’s asking for which template we are going to generate. We are going to generate a flutter application.
  13. So simply click on that and then we have to select a folder to create the project.
  14. I’m going to select again desktop get started and then select folder now. It’s asking for project name, I’m going to give a name. Note that name should be all lowercase and underscore two separate words. I’m going to give gate underscore started and then press enter the code is generating after a few minutes.
  15. You can see your flatter project is ready to run. There are lots of viral codes generated.
  16. Let’s understand all the components of the project.
  17. Android directory: – This is auto generated source code to create android application.
  18. ios directory: – This is auto generated source code to create ios application.
  19. Leave directory: – This is root directory which is containing dart code written using flutter framework main file this is the entry point of the flutter project.
  20. Test directory: – This is containing dart code to test the flutter application with a test file. There’s had simple code to test your application.
  21. If directory: – This is auto-generated source code to create web application.
  22. .gitignore file: – This is git version control file.
  23. .metadata file: – This is auto generated by the flatter tools.
  24. .packages file: – This is auto generated to track the flatter packages analysis options.
  25. .ml file: – This is performs static analysis of our code.
  26. .ima file: – This is project file used by android studio.
  27. log file: – This is auto generated by the flutter package manager pub.
  28. ml file: – This is used by pub here pop is a flutter package manager.
  29. md file: – This is project description file written in markdown format.

So these are all about components of project structure. Let’s understand dart code of main file line by line. In first line, imports the flutter material package or library. The material package to implement material components like a bar button input dialog alert selection layout and much more things. Then third to five lines of code, this is the entry point of the flatter application. Here calls run function and pass it an object of my app class. The purpose of the run app function is to attach the given widget to this screen.

Then 7 to 30 lines of code, there’s a stateless widget which doesn’t maintain any state of the application. Here my app extends stateless widget and overwrites its bolt method. The purpose of the build method is to create a part of the ui of the application. Here build method uses material app widget to create the root level ui of the application.

It has three properties by default i.e. title, theme and home. Title is used for title of the application. Themes are used to design the fonts and colors of the application primary search for set blue as the overall color of the application. Home is used for the default route of the application means the user defined in it. It displayed when the app starts normally. Now we’re going to do is just delete the my homepage widget that’s already in there because we’re going to learn this from scratch and learn the actual concept behind creating the widgets and the different types of widgets available in the flutter framework.


About the author


Add Comment

Click here to post a comment