当前位置:网站首页>How can beginners learn flutter efficiently?

How can beginners learn flutter efficiently?

2022-07-05 12:12:00 CrazyCodeBoy

 How to study efficiently Flutter

Flutter It is an important basis for investigating an engineer's technical breadth and sensitivity to new technologies ,Flutter As one of the hottest hybrid development frameworks , It is sought after by more and more developers . In this article, I will share with you how to learn efficiently and quickly as a beginner Flutter?

For efficient and fast learning Flutter, Beginners can follow these steps to learn :

  • Walk in and get to know it
  • Master its language
  • Master it Widget
  • Be familiar with its state mechanism
  • Debugging skills
  • Deep principle
  • Make good use of tools

know Flutter

Flutter By Google Development of a cross platform UI Development kit ; Call it UI The development kit is mainly because of it The main focus is on UI Build and render layers Things about , For some of the functions of the station itself : For example, call Bluetooth 、 camera , In general, you still need native code to operate . But now there will be some Third party libraries help us solve these problems .

Flutter A brief history of development

From to 2018 Year begins Flutter The heat is rising , So it caused a misunderstanding for many students : Think Flutter It's a new development framework . say Flutter It's the most popular framework , There is no problem , But it's not a recent development framework . Why do you say that , Now let's take a look at Flutter A brief history of time :

Flutter A brief history of time

  • 2014.10 - Flutter The forerunner of Sky stay GitHub The open source
  • 2015.10 - After a year of open source ,Sky Officially renamed Flutter, Low key period
  • 2017.5 - Google I/O Officially announced to the outside world Flutter, This is the time Flutter Before we officially enter the field of vision
  • 2018.6 - distance 5 month Google I/O 1 months ,Flutter1.0 preview
  • 2018.12 - Flutter1.0 Release , It will be released to Flutter Our study and research have pushed us to a new starting point
  • 2019.2 - Flutter1.2 The release mainly adds to web Support for
  • 2020.5 - Flutter1.17 yes 2020 The first stable version of , This version includes iOS platform Metal Support ( Faster performance ), new Material Components , new Network Tracking tools, etc ;

From this we can see :Flutter In the gradual trend of maturity and growth , Its ecosystem is also developing , So now learn Flutter It was at the right time !!!

Flutter framework

Flutter framework

Flutter It has three main components :

  • Frame layer :Flutter The framework is based on Dart On the basis of language , stay Flutter Everything in UI all Widget,Flutter There are two different styles of Widget library , One is based on Material Design( Material design ) Style component library ; One is based on cupertino Of iOS Design style component library ;
  • Engine layer :Flutter The engine is based on C++ Of 2D Graphics library ( be called Skia). In this layer , Provides Dart VM, To provide an execution environment , Is used to Dart Code conversion to local platform executable code . Flutter The engine is Android,iOS Run in , think widget Show the corresponding appearance , And according to the specific platform through Channel communicate ;
  • Platform level :Flutter Depending on the platform, it provides its specific shell( namely Android Shell and iOS Shell), these shell For hosting Dart VM, To provide a specific platform API The interview of ;

Flutter Development language

Flutter Is based on Dart Language development , So do Flutter First of all, we should understand the design and be familiar with Dart Language .

Dart It's a strongly typed language , Static type

from Dart2 Start Dart That is Strong type language , And it's a static type Of , This can be compared to Java,C#.

How do you understand that ? If the type of the variable is known at compile time , Then type the language statically . that For some languages , This means that as a developer, you must specify the type of each variable ( for example :Java,C#);

The main advantage is that all types of checking can be done by the compiler , So a lot of trivial mistakes will be discovered very early .

For mobile students, because Java and Kotlin And so on are strongly typed statically typed languages , So this one will be easier to use ; But for front-end development students , Contact with more programming languages is usually JavaScript,JS Weak type , Dynamic type language , So at the front, students are learning Dart Be sure to distinguish between these two concepts .

Dart It's an object-oriented language

Dart It's an object-oriented language , except Dart Outside , Let's list a few object-oriented programming languages :Python、C++、Objective-C、Java、Kotlin、Swift、C#、Ruby And PHP etc. .

If you have OOP That is the experience of object-oriented programming , So learning Dart It's going to be easy .

For mobile students, because Java and Kotlin All of them are object-oriented languages based on class, so learn Dart It's going to be easier ; But for front-end students , although JavaScript At the core of is to support object-oriented , but JavaScript There is a big difference between the prototype based programming style and the traditional class based object-oriented style . So study Dart There will be a certain adaptation process , Can be Dart Learn as your first class based object-oriented programming language .

Dart Of JIT&AOT

  • JIT: Just in time compilation , Development period , Compile faster , Faster overloading
  • AOT: Compile in advance ,release period , Faster and smoother

Dart Support JIT And AOT,JIT Full name Just In Time( Just in time compilation )Flutter During the development, we used JIT, This allows faster compilation and faster code overloading ; but JIT The disadvantages are also obvious ,JIT The machine code will need to be compiled into , The direct feeling to users is slow ; You'll find that it was installed during development flutter The bag will get stuck ,release It's going to get better after that , Part of the reason is because AOT The existence of ;

AOT Full name Ahead Of Time( Compile in advance ), A typical example is C/C++, Can be directly compiled into machine code, that is, binary code ,AOT The advantages of , Pre compiled binary code , Loading and execution will be very fast . When your Flutter APP release When we use AOT, This makes your APP Be able to run faster and more smoothly .

Study Flutter Tools available

ancient Chinese prose 《 Xunzi · gakumon 》 There is a famous saying : A gentleman is not different , Good and false in things . So it's important to learn a new knowledge quickly and efficiently Good lies in things . Here are several kinds of learning for you Flutter The grip of :

原网站

版权声明
本文为[CrazyCodeBoy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140532347594.html