Contents

Hiring a Flutter Developer: Essential Interview Questions

So, having carefully considered available options, you’ve decided to build a cross-platform app on Flutter. The next step is to find a skillful developer (yes, to make an MVP on Flutter, a single developer is all you need). Mainly, there are two ways to do this:

  1. Hire Flutter developer(s) and make them part of your team. The benefit of this option is that you have total control over your employees in terms of business processes, salaries, working culture. This might be your option if the future app will be the center of your business.
  2. Reach out to a developer company and let them handle everything. This way you don’t need to set up everything from scratch. Such companies have a proven track record, work according to best practices and handle all organizational tasks. For example, we at Surf have been developing apps for banks, restaurants and digital platforms for more than 10 years. This option saves a lot of trouble and is preferable if an app is an addition to your main business.

If you decide to settle on the first option and bring Flutter developers on your team, it is important to hire the right people. How to do that? First of all, look in the right places, and then ask the right questions. Below you’ll find examples of interview questions and tasks to assess Flutter developer knowledge and skills.

General questions

To get the conversation going, start from general questions to learn more about the candidate and why they chose to become Flutter developer.

  1. Question: What is Flutter?

Answer: Flutter is an open source framework for developing cross-platform apps. It was created by Google in 2017 and runs on Dard coding language.

  1. Question: What are the advantages of Flutter?

Answer: 

  • High performance. Thanks to architectural solutions, Flutter can boast fewer dropped frames and higher FPS than other cross-platform apps. Basically, user won’t notice the difference between Flutter and native app.
  • Beautiful visuals. Flutter provides many widgets, which can be personalized and supports heavy graphics and animations.
  • Rising popularity. Currently, Flutter is the second most popular cross-platform framework and its community grows every day.
  • Hot Reload. Increases the speed of development and allows easy experimenting.
  1. Question: Name some popular apps made using Flutter.

Answer: Tencent, Stadia, Groupon, eBay, Reflectly, Baidu and many others.

Theoretical questions

After initial questions, move to the part that proves the developer knows how apps on Flutter are built and how their components work.

4) Question: What is the difference between declarative and imperative programming?

Answer: In declarative programming, the developer writes code describing the desired result. In imperative —  the developer tells the compiler what is required to happen, step by step.

5) Question: What are the main steps of writing a Flutter app?

Answer: 

  1. Create a simple template app (starter app).
  2. Apply an external package, called ‘english_words’, which contains utility functions and English words, should be used.
  3. Add a stateful widget, which helps to maintain the state of a widget.
  4. Create an infinite scrolling ListView. Use the expansion of RandomWordState to generate and display a list of word pairing.
  5. Make profile runs to analyze the app’s performance.

6) Question: What can be called ‘building blocks’ of an app on Flutter?

Answer: Widgets are the building blocks of a Flutter app’s user interface. Each widget is an immutable declaration of a part of the user’s interface.

7) Question: Name the difference between Stateful and Stateless Widgets.

Answer: If a widget can change (for example, after user interaction) it is called stateful. An app’s widget that never changes is called stateless.

8) Question: What a Spacer Widget does?

Answer: It creates an empty spacer that can be used to set up spacings between widgets of limited widths and heights.

9) Question:  Why does it take so long to run a Flutter app for the first time?

Answer: It takes a long time to load the correct configuration and dependencies for a particular version.

10) Question: What is Hot Reload feature in Flutter?

Answer: Hot Reload allows to quickly apply changes to an app. It updates the app right after any changes are made to the code. This speeds up development and makes experimenting easier.

11) Question: Does Dart support multithreading?

Answer: Dart is a single-threaded programming language. Each Dart program runs in Isolate.

12) Question: What IDEs (integrated development environments) are used for Flutter development? Which one do you prefer and why?

Answer: 

  • Android Studio.
  • IntelliJ Idea.
  • Visual Studio.
  • Emac.
  • Codemagic.

13) Question: Name the modes that can be used during Flutter development.

Answer: 

  • Debug mode is mainly used during development, it supports Hot Reload.
  • Profile mode is used to analyze performance.
  • Release mode is used to deploy an app. It optimizes an app and minimizes footprint size. 

14) Question: How many types of List Views are there in Flutter? Name ListView constructors and their main differences.

Answer: There are 4 types of List Views:

  • ListView — the most commonly used one during the development process.
  • AnimatedListView — animates the item, when it is inserted or removed. 
  • ListWheelScrollview — gives an effect of items spinning on a wheel.
  • Reorderable list view — allows to rearrange items by dragging and dropping.

There are 2 types of ListView constructors:

  • ListView — commonly used constructor for small lists; not recommended for long lists.
  • ListView.builder — constructor for fixed lists, suitable for long lists and pagination. It creates only items visible on the screen.

15) Question: What are the keys in Flutter?

Answer: Keys are parameters that preserve widgets states when they are moved in a widget tree and control which widget matches up with other widgets when the widget rebuilds.

16) Question: What is const in Flutter?

Answer: Const is a keyword to declare constants. Variable values declared with const can’t be modified. The keyword is used to represent a compile-time constant. It creates an item during compilation and inserts it whenever the same item is required.

17) Question: What is Async and Await?

Answer: These are keywords that define asynchronous functions. To define an async function, add async before the function body. Keyword await works only in async functions.

18) Question: How to use a stream in Dart? Name functions.

Answer:

  • Listen — to subscribe to a stream.
  • Dispose — to cancel subscription. 

19) Question: Which databases do you prefer to use with Flutter and why?

Answer:

  • Firebase (noSQL real-time database; convenient data browsing).
  • Hive (offline NoSQL storage; fully native to Dart).
  • ObjectBox (object oriented database for mobile and IoT devices).
  • SQLite (embedded SQL database; doesn’t require separate server process).
  • Moor (reactive persistence library based on SQLite).

20) Question: What is Navigator in Flutter?

Answer: Navigator manages the routes and screen navigation. It keeps the stack of the app’s widgets.

21) Question: What is Scaffold in Flutter?

Answer: Scaffold gives default structure properties (appbar, body, floating action button, drawer, etc), so it is not necessary to create a new custom structure for app activity/screen/page/UIView. 

22) Question: What are the most commonly used architectural patterns for Flutter?

Answer: BLoC, Redux, mwwm, mobx.

23) Question: Explain the difference between crossAxisAlignment and mainAxisAlignment.

Answer:

  • The property mainAxisAlignment defines how items are aligned on the main axis, which is horizontal in a row and vertical in a column. 
  • The property crossAxisAlignment defines the alignment of elements along the other axis (vertical in a row, horizontal in a column).

Practical questions

After assessing the developer’s theoretical knowledge of Flutter, it is important to give a couple of quick practical tasks. After all, good theoretical knowledge without practical coding skills is not quite valuable for an app building project.

24) Question: What is this method supposed to do? What does it do in its present state? Find and correct mistakes.

String _m(int n, [int p1 = 3, String p2 = ' ']) {
 List<String> result = List();
 var r = n.toString().split(' ').reversed;

 int l = r.length;
 while (l < p1) {
   String group = r.take(p1).toList().reversed.join('');
   result.add(group);

   r = r.skip(p1);
   l += p1;
 }
 result.add(r.toList().reversed.join(''));

 return result.reversed.join(p2);
}

Answer: The function is supposed to insert spaces in big numbers. But the variables have wrong names.

/// Inserts separator between  groups of 3 figures from the end of the number
/// * usually used for money figures
/// # example
/// 12345 -> '12 345'
String splitBy(int number, [int offset = 3, String separator = '']) {
List<String> result = List();
var reversed = number.toString().split('').reversed;

int length = reversed.length;
while (length > offset) {
String group = reversed.take(offset).toList().reversed.join('');
result.add(group);

reversed = reversed.skip(offset);
length -= offset;
}
result.add(reversed.toList().reversed.join(''));

return result.reversed.join(separator);
}

25) Question: What is the output of this code?

void main() async {
  var i = 2;
  var _c = (a) async {
    var f = (int i) async => i + 1;
    i = await f(i);
    print('Step 1. $i');
  };
  _c(i);
  print('Step 2. $i');
  var r = await _x2(i); //asynchronously multiplies by 2
  print('Step 3. $r');
}

Answer: The output to the console does not match consecutive lines of the code and the order will be changed:

Step 2. 2

Step 1. 3

Step 3. 4

Next steps

Using our interview questions should be helpful during the initial stage of the candidate’s assessment. After that, if you still have doubts, we recommend giving the developer a sort of home task: write a code for a simple app or conduct a code review of an existing app. This way you will see how they handle complex tasks as well.

Also, don’t forget to ask them about their goals, interests and assess their soft skills.

  • independent out-of-box thinking;
  • active desire to learn new things;
  • communicative skills and emotional stress tolerance.

When hiring new developers for our team, we consider these soft skills to be the most important:

independent out-of-box thinking;
active desire to learn new things;
communicative skills and emotional stress tolerance.

Aleksey Korpatenkov, Senior Flutter Developer at Surf

To sum things up

Hiring developers might be a difficult task, especially for a new business. It requires a lot of time and money investments into HR process and is recommended when a future app will be at the core of the business model.
Want to make things a little easier for you and focus on other problems at hand? Trust your project to Surf: we’ve developed many apps on Flutter for various businesses. Fill in the form and we’ll get back to you with an estimate on your project.