I had multiple interviews with organisations while looking for a job in Flutter, therefore in this blog I will go over all of the questions that were asked as well as ones that I prepared. You may occasionally be asked to know some fundamentals about an app’s Native functionality, whether it be for Android or iOS.
Generally in the Flutter job interviews there are 3–4 rounds.
1st round: Assignment or Basic knowledge of Flutter
2nd round: Basic/Advance Flutter questions/Basic Native questions
3rd and 4th round: Advance Flutter questions/Native Mobile questions/System Design of Mobile/Architecture level questions
Flutter Assignments are given to check the candidate’s coding technique some examples are: Todo(using StateManagement or DB), tic-tac-toe, newsApi(using StateManagement or DB), Draw particular Shape using CustomPainter
I’ve answered to some questions here, while in others I’ve provided a link to the topic and tried to put questions of a similar nature together.
Q1: Lifecycle of Stateful Widget
Q2: Keys in Flutter: Local, Global & Unique
Q3: Flutter architectural overview
Q4: Keyword: static, final & const
Q5: Difference between Hot reload and Hot restart
Q6: Explain BuildContext
Q8: How does Flutter run the code on Android?
A8: The NDK for Android compiles the C and C++ code of the flutter engine. Both the SDK's and your Dart code are compiled into native, ARM, and x86 libraries using the AOT (ahead-of-time) compiler. These libraries are included in an Android "runner" project, and the entire item (or artefact) is packaged as an .apk file. The flutter library is loaded when the app is launched.
Q9: How does Flutter run the code on iOS?
A9: LLVM is used to compile the C and C++ code in the Flutter Engine (low level virtual machine — a compiling technology). AOT (ahead-of-time) compiles both the SDK’s and your Dart code into a native, ARM library. The ARM library is included in the iOS project “runner,” and the entire code base is packaged as an iOS App Store Package file .ipa. The flutter library is loaded when the app is launched.
Q10: Stateful vs Stateless Widget
Q11: How does Dart AOT work?
Q12: What is the difference between double.INFINITY and MediaQuery?
A12: double.infinity: As big as my parent allows and MediaQuery: As big as device screen.
Q13: Internationalisation and localisation
Q14: What is Dart and why does Flutter use it?
A14: Dart is a garbage-collected object-oriented programming language.
Dart is an AOT compiled native code that allows the majority of Flutter to be written in Dart.
Dart can also be JIT-compiled for lightning-fast development cycles and game-changing workflows (such as Flutter’s rapid reload).
Dart’s declarative nature allows Flutter to avoid the need for a separate declarative layout language like JSX or XML, as well as separate visual interface builders.
Q15: What are the benefits of Flutter?
A15: Learn Once write Everywhere
Live and Hot Reloading
Provides Native Look and Feel
Expressive and versatile UI
A17: WidgetsBindingObserver check when the system puts the app in the background or returns the app to the foreground
Q18: Null Safety in Dart
Q19: Null-aware operators
Q20: Tree shaking
Q21: SizedBox VS Container?
Q22: What does resizeToAvoidBottomInset do?
A22: If an onscreen keyboard is presented above the scaffold, using resizeToAvoidBottomInset, body can be adjusted to avoid overlaying the keyboard, allowing widgets inside the body to be seen.
Q23: Flow analysis: Promotion, Definite Assignment
Q24: What is vsync?
A24: Vsync keeps track of the screen so that Flutter doesn’t have to render the animation while the screen is not there.
Q27: What are tween animations?
A28: When we wish to share a behaviour across different classes that aren’t in the same class hierarchy, or when it’s not practical to implement such a behaviour in a superclass, mixins come in handy.
Q29: Expanded vs Flexible
A30: WillPopScope that allows us to control the back button navigation.
Q31: Spread operator?
Q32: When do we use profile mode?
A32: When you wish to analyse performance, you use profile mode. Profile mode on mobile is similar to release mode, with the following exceptions: — Some service extensions have been enabled, such as the one that enables the performance overlay. — Tracing is enabled, and debugging tools (such as DevTools) that support source-level debugging can connect to the process.
Q33: Why is exit(0) not preferred for closing an app?
Q34: What is .of method in Flutter and when would you use them ?
Q35: How to control the visibility of widget?
Q36: Single Instance and Scoped Instance ?
Q37: Runes in dart
Q38: then vs whenComplete
A38: When the longer term completes with a mistake or not, .whenComplete fires a function, whereas .then returns a replacement Future with the results of the decision to onValue (if this future completes with a value) or onError (if this future completes with an error).
Q40: Parallellism vs Concurrency ?
Q41: Package vs plugin
A41: A “package” is a collection of Dart code.
Dart and Native code (kotlin/js/swift) are combined in a “plugin.”
Q42: What if we didn’t dispose controllers?
A42: When a state object is eliminated, the dispose method is used to release the memory assigned to variables.
For example ,if you’re utilising an animation in your app, you’ll need to free up memory assigned to the animationController. Otherwise, the PlayStore and AppStore may issue a memory leaking warning to your programme.
Q43: Flutter engine
Q44: State restoration
Q46: async vs async* in Dart?
A46: async gives you a Future while async* gives you a Stream.
Q48: Custom Painter
Q49: Ephemeral/App state
Q50: Inherited widget
Q51: How is InheritedWidget different from Provider?
A51: InheritedWidgets are used to build the provider. You’ll have hundreds of unnecessary repeating lines if you don’t use provider. Provider simply takes the logic of InheritedWidgets and pares it down to the minimum of boilerplate.
Q52: Value notifier
Q53: What do you mean by Streams and its types?
Q54: Throttle vs Debounce
Q55: How to use extensions?
Q56: 3 Trees in Flutter
Q57: How to change state of view in Stateless widget without using any external package?
Q58: How do you create a factory?
Q59: Singleton class
Q60: Design Patterns
Q61: SOLID DRY KISS Principles
Q63: Splash Screen
A64: Some Miscellaneous flutter topics:-
Following are the companies who hires for Flutter, most of these companies have team based in INDIA itself: Cardekho, Even, Josh Talks, Geekyants, Awign, Park+, Grab, Gojek, Tokopedia, Frontrow, Jio, YML, Squareboat, Inmobi, Junglee games, Zest Money, Vahak, CoinDCX, Appyboard, RuleZero(Zerodha Backed), CRED, Smallcase, Tickertape, Nas Academy,GetStream, Innovaccer, CaptainFresh, Webengage, PasarPolis, Amazon, Sav.money, Clipboard health, India Today, Hero Vired, Tide, Yatra, Yellow Class, Slice, GreyOrange, Fello, Appyhigh.
Please hit the clap icon 👏 and share this article with your friends if you find it helpful, as it will encourage me to create more.
Feel free to connect with me on social media platforms for any doubts regarding Flutter.