preface

Before the emergence of Flutter, many big Internet companies put Flutter into practice. First, Xianyu team introduced Flutter on a large scale, and later, Feizhu, Baidu Tieba, Toutiao, Watermelon Video, Meituan Takeout, Jingdong Mall and other teams dropped the Flutter project in several scenes. However, one of my college roommates saw the wind and worked for two years. He decided to switch to Flutter and target Ali Xianyu, which was a challenge for him because he still lacked knowledge about Flutter. When preparing for the interview, he learned Flutter at home.

Prepare for the interview

It is certainly not possible to simply look at a frame of knowledge. You will know what Flutter is, how to use it, its advantages and disadvantages, etc. Of course, it is right to understand Flutter. If you go to an interview, you need to go deeper. In the part of systematic learning of Flutter, my roommate studied by watching videos and e-books in detail, but it took a little brain.

Video learning

Video teaching is divided into three parts: theoretical knowledge, actual practice and advanced promotion.

The theoretical knowledge This section covers understanding views, layouts and lists, state management, routing and navigation, threaded and asynchronous UI, Dart Basics, Form input and rich text, Getting started with Flutter, Project structure, Resources, dependencies and localization, what is a declarative UI video, Flutter debugging tips, learning to build Flutter, and more Generally speaking, theoretical knowledge is mainly about development tool selection and development environment construction guide, learning about Flutter and Flutter theory. There are corresponding text versions of documents for each video, which are more convenient for learning and understanding.

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, the development of rotation map Banner function, the implementation of custom AppBar rolling gradient and other content, this video content still have to watch repeatedly. To digest.

This part of the video can be said to be the most important, the highlight, involving network programming and data storage technology related experience and skills, play list components, Flutter, Native hybrid development, App home page function development, search module development, development package and plug-in development, intelligent AI voice search module implementation, packaging and release of Flutter application, etc., are really not a loss of progress, slowly bite down.

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

Collect some e-books about Flutter, including detailed translation of the official documents on Flutter, advancements in Flutter technology, full set of E-books on Flutter development across platforms, basic study of Flutter PDF, summary of The Guide to Flutter technology, etc. Start with the summary of the guide to the sinking of the Flutter technology, which is easier to accept. Then read the detailed translation of the Flutter official documentation, which will be easier to understand and not boring.

Personal learning experience: No matter watching videos or learning e-books, you must take notes and record the important points that are not difficult to understand, etc., and organize the notes into your own brain map or document. This process is also to deepen your impression and understanding of the content.

Flutter interview

There are not many questions about Flutter in your interview. To prepare for the interview, you need to know some basic knowledge about Flutter on iOS or Android. Here are some of the questions and answers you 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 can work with existing code. Flutter is being used by more and more developers and organizations around the world, and Flutter is completely free and open source.

What are the properties of Flutter? Rapid development (millisecond thermal overloading)

  • Gorgeous UI (built in beautiful Material Design and Cupertino Widgets and rich smooth animation effects and platform awareness)
  • Reactive (use powerful and flexible apis to solve 2D, animation, gesture, effects, etc.)
  • Native access
  • Comparable to native performance

3. What is the relationship between Flutter and Dart? Flutter is a cross-platform mobile UI framework developed using the Dart language. With its own rendering engine, Flutter enables high performance, high fidelity mobile development. Dart encapsulates the best of most programming languages and is more in line with the way Flutter builds its interface.

4. Dart language features?

  • Productive (High productivity, CLEAR syntax for Dart, simple but powerful tools)
  • Fast (Fast execution, Dart provides pre-optimized compilation for predictable performance and Fast startup on mobile devices and the Web.)
  • Portable (Easy to Portable, Dart compiles to ARM and X86 code so Dart mobile applications can run on iOS, Android, and elsewhere)
  • If you already know C++, C, or Java, you can develop with Dart in just a few days.
  • Reactive (Reactive programming)

5. What are the key concepts of Dart?

  • In Dart, everything is an Object, and all objects inherit from Object
  • Dart is strongly typed, but you can declare a variable with var or dynamic, which is similar to c#, and Dart will automatically infer its data type
  • Variables that do not have an initial value will have a default value of NULL
  • Dart supports top-level methods, such as the Main method, that can be created inside a method
  • Dart supports top-level variables as well as class or object variables
  • Dart does not have a public protected private keyword. If a variable begins with an underscore (_), it is private in the library

6. Dart is passed by value or reference? reference

7. The relationship between widgets and Elements and RenderObject?

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

8. What is the relationship between mixin extends Implement? Inheritance (extends), mixins (with), interface implementation (implements). These three can exist together in the order extends -> mixins -> implements. Inheritance in A Flutter is single inheritance. Subclasses Override superclass methods with @override, and subclasses call superclass methods with super. In Flutter, Mixins are a way of reusing class code across multiple class hierarchies. The object of mixins is a class. Mixins are neither inheritance nor interface, but a brand new feature that can mixins multiple classes. The use of mixins needs to meet certain conditions.

What are the conditions for using mixins? Because the conditions for mixins are changing with Dart releases, here are the conditions for mixins in Dart2.1: Mixins classes can only inherit from Object mixins and cannot have constructors. One class can mixins multiple mixins without breaking the single inheritance of Flutter

10. The execution sequence of Flutter main Future MiroTask? Common code is executed synchronously. After the execution, the system starts to check whether there are any tasks in the MicroTask. If there are any tasks, the system executes them. Finally, the Event queue (Future) is executed.

11. What’s the difference between Future and Isolate? Uture 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 concurrent shared state, and all Dart code runs in the ISOLATE, including the original main(). Each ISOLATE has its own heap memory, which means that all memory data, including global data, is visible only to the ISOLATE. Communication between them can only be done through the mechanism of passing messages, which are sent and received through ports. An ISOLATE is just a concept, depending on how it is implemented, such as a thread in the Dart VM or a Web Worker in the Web.

12. What is the relationship between Stream and Future? Stream and Future are the core APIS for Dart asynchronous processing. The Future represents the data obtained later, and the return value of all asynchronous operations is represented by the Future. But a Future can only represent data acquired asynchronously once. Stream represents data obtained asynchronously multiple times. For example, a button on an interface may be clicked multiple times by the user, so an onClick event on a button is a Stream. Simply put, the Future will return one value, and the Stream will return multiple values. Streams are uniformly used in Dart to handle asynchronous streams of events. A Stream is a set of data, just like a regular collection, except that one is pushed asynchronously and the other is pulled synchronously.

For reasons of length, in order not to affect the little partner’s reading experience, only 12 questions are listed. More interview questions have been organized into documents, which will be sent out to share files.

I have created a document for all the Flutter projects. You can click on the title of the document to get the document.

  • Project 1: Flutter — Realize Alipay and wechat payment
  • Project 2: Jd technology’s path to Flutter practice
  • Project 3: Flutter implements a cool driven draw column phenotype with multiple calendar components
  • Project 4: Flutter mimics Didi travel App
  • Project 5: Evolution and practice of Ali Xianyu Flutter architecture
  • Project 6: The principle of Flutter and its practice

The project is written in detail in the document. If there is anything I don’t understand, IT is suggested to read the content of the section about Flutter learning.

At the end

Regardless of whether you are interested in Flutter or interested in mobile applications, Flutter is worth learning from every front-end. It is recommended to consolidate the basics of Flutter before learning, especially browser principles.

At present, more and more front-end development may have app-related businesses, which is the trend of the big front-end. Flutter is a development framework closer to App, and its performance and cross-platform effect meet the needs of the project. What do you think of Flutter? Welcome to the comments section.

Note: The video learning about Flutter, the ebook learning, the interview questions about Flutter, the project documents and other materials in the article are shared with friends directlyJust click here