Since the appearance of Flutter, many big Internet companies have put it into practice. First, Xianyu team introduced Flutter on a large scale, and then Feizhu, Baidu Post Bar, Toutiao, Watermelon Video, Meituan takeout, Jingdong Mall and other teams launched the Flutter project in multiple scenes. However, one of my college roommates saw the wind and worked for two years, and decided to move to Flutter, aiming at Ali Salted Fish. This was a challenge for him, because he still lacked the knowledge of Flutter. When preparing for the interview, he learned Flutter at home, which was a headache.

Flutter preparation for the interview

If you want to go to an interview, you need to know more about it. If you want to go to an interview, you need to know more about it. In the part of systematic learning Flutter, roommates watched videos and e-books to learn in detail, but it was a little hard for them to think about.

Video learning

Video teaching is divided into theoretical knowledge, into actual combat, advanced promotion of three parts.

The theoretical knowledge Learn about views, layouts and lists, state management, routing and navigation, threads and asynchronous UIs, Quick Start to Dart, Form input and rich text, Flutter’s basics, project structure, resources, dependencies and localization, what’s a declarative UI video, Flutter debugging tips, learning how to build Flutter, and more Generally speaking, the part of theoretical knowledge is mainly about the selection of development tools and the guidance for setting up development environment, and the understanding of Flutter and Flutter theoretical knowledge. In addition, each video has a corresponding text version of the document, which is more convenient to learn and understand.

This part is about the implementation of APP navigation framework and common functions, such as APP home page framework construction -Scaffold and PageView, APP home page framework construction – project practice, rotating Banner function development, custom AppBar to achieve rolling gradual change and other content, this video content still have to watch repeatedly, Before you can digest it.

The video is the most important part of the content, which involves experience and skills related to network programming and data storage technology, playlist components, Flutter, Native mixed development, APP home page function development, search module development, development package and plug-in development, intelligent AI voice search module implementation, packaging and publishing Flutter application and other content, really is advanced, slowly gnawed down.

Xiaobian light and friends said there are so many content, but far more than oh, since you want to learn don’t stay on the surface.

E-book learning

My roommate sorted out some ebooks about Flutter, including detailed translation of Flutter’s official documents, Flutter’s technical advancement, Flutter’s cross-platform development of a complete set of ebooks, Flutter’s basic learning PDF, Flutter’s technical entry guide summary (AlixanYu), etc. You can start with the summary of Flutter’s technical entry guide, which is easy to accept, and then read the detailed translation of Flutter’s official documentation, which will be easy to understand and not boring.

Personal learning experience: no matter watching videos or e-book learning, be sure to take notes and record the important points that you don’t understand. Make notes and organize them into your own brain map or document. This process is also to deepen the impression and understanding of the content.

Flutter interview

There are not many interview questions about Flutter in the interview. Fortunately, as I prepare for the interview, I still need to know some native knowledge about iOS or Android. I will list some of the interview questions and answers compiled by the interview editor to see what questions will be asked about Flutter.

Flutter is Google’s mobile UI framework for quickly building high quality native user interfaces on iOS and Android. Flutter works with existing code. Flutter is being used by more and more developers and organizations around the world, and is completely free and open source.

What are Flutter’s features? Rapid development (millisecond hot reload)

  • Beautiful UI (built-in beautiful Material Design and Cupertino Widget, rich and smooth animations and platform awareness)
  • Reactive (Reactive, using powerful and flexible APIs to solve 2D, animation, gestures, effects, etc.)
  • Native access
  • It’s like native performance

3. What is the relationship between Flutter and Dart? Flutter is a cross-platform mobile UI framework developed with Dart language. It provides high performance and high fidelity for mobile development through its own drawing engine. Dart has the best of most programming languages, and it’s more in line with the way Flutter builds its interface.

4. What are the characteristics of the Dart language?

  • Productive (high productivity, Dart’s clear grammar, simple but powerful tools)
  • FAST (Fast execution, Dart provides pre-optimized compilation for predictable high performance and Fast startup on mobile devices and the Web.)
  • Portable (Easy to port, Dart can be compiled into ARM and X86 code so that Dart mobile applications can run on iOS, Android, and elsewhere)
  • Approachable (easy to get started, fully absorbing high-level language features, if you already know C++, C, or Java, you can develop it with Dart in just a few days)
  • Reactive (Reactive programming)

5. Some important concepts of Dart?

  • In Dart, everything is an Object, and all objects inherit from objects
  • Dart is a strongly typed language, but you can declare a variable using var or dynamic, which Dart will automatically infer its data type. Dynamic is similar to C #
  • Variables without an initial value have a default value of null
  • Dart supports top-level methods, such as the main method, in which methods can be created inside the method
  • Dart supports top-level variables as well as class or object variables
  • Dart has no public protected private keywords. If a variable begins with an underscore (_), it is private in the library

6. Does dart pass by value or by reference? reference

7. What is the relationship between Widget and element and renderObject?

  • Widgets are part of the user interface and are immutable.
  • An Element is an instance of a Widget at a particular location in the tree.
  • RenderObject is an object in the render tree whose hierarchy is the core of the render library.

8. The relationship between mixin extends implement? Inheritance (extends), mixing in mixins (with), interface implementation (implements). All three can exist together, in the order extends -> mixins -> implements. Inheritance in Flutter is single inheritance, with subclasses overriding methods of the superclass using @Override and subclasses calling methods of the superclass using super. In Flutter, Mixins are a way to reuse class code in multiple class hierarchies. The object of a mixins is a class. Mixins are not an inheritance or an interface. They are a new feature that can be used to mix multiple classes.

9. What are the conditions for using mixins? Since the conditions used for mixins change over time with Dart versions, here are the conditions for using mixins in Dart2.1: A mixins class can only inherit from an object mixins class without a constructor. A class can mixins multiple mixins without breaking Flutter’s single inheritance

10.Flutter main future MiroTask execution order? Normal code is executed synchronously. After completion, it will start to check whether there is a task in the microTask. If there is a task, it will execute. Finally, the Event queue (Future) is executed.

11. What is the difference between Future and Isolate? Uure is asynchronous programming, with the call itself returning immediately and the result returned at a later point when the execution is complete. In normal code you can use await to wait for an asynchronous call to end. The isolate is concurrent programming, DARTM has a shared state when concurrent, and all DART code runs within the isolate, including the original main(). Each isolate has its own heap memory, which means that all of its memory data, including global data, is visible only to the isolate, and communication between them can only be achieved through the mechanism of passing messages, which are sent and received over ports. The isolate is just a concept, depending on how it is implemented; for example, an isolate might be a thread in a Dart VM, or a Web Worker in the Web.

12. What is the relationship between Stream and Future? Streams and futures are the core APIs for Dart’s asynchronous processing. Future represents the data retrieved at a later time, and the return value of all asynchronous operations is represented by Future. But Future can only represent data obtained asynchronously once. A Stream represents data obtained asynchronously several times. For example, a button on an interface may be clicked multiple times, so the onClick event on the button is a Stream. Simply put, Future will return a single value, while Stream will return multiple values. A Stream is used uniformly in DART to handle asynchronous event streams. A Stream is similar to a regular collection in that it is a collection of data, except that one is pushed asynchronously and the other is pulled synchronously.

The reason for the length of the interview is that in order not to affect the reading experience of young friends, only 12 questions are listed. More interview questions have been organized into documents and will be sent out to share the files.

Flutter project

This section is up to you to see whether you need it or not. Maybe you need some on Android. You can also check it out for front-end friends.

  • Project 1: Flutter – Implement Alipay and WeChat payment
  • Project 2: JD Technology’s Flutter Practice Road
  • Project 3: Flutter implements a cool multi-option calendar component for column drawings
  • Project 4: Flutter’s Didi Chuxing APP
  • Project 5: Architecture evolution and practice of Alixianyu Flutter
  • Project 6: Flutter’s principle and Meituan practice

I don’t have a detailed description of the project, it is written in the document in detail. If there is anything that I don’t understand, I suggest you learn the content of that section with the Flutter. Hahaha.

At the end

Whether you are interested in Flutter or interested in mobile terminal, Flutter is worth learning for every front end. It is suggested to consolidate the basic knowledge of front end, especially the principle of browser, before learning it.

At present, more and more front-end development may have APP-related business, which is the trend of big front-end development, while Flutter is a development framework closer to APP. Its performance and cross-platform effect meet the needs of the project, what do you think? Feel free to discuss in the comments section.

Note: In this article, Xiaobin will learn Flutter’s video learning, ebook learning, Flutter interview questions, projects and other materials and share them with your friends directlyJust click here