Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erabossid/flutter-interview-questions-and-answers

Flutter and Dart Interview Questions and Answers
https://github.com/erabossid/flutter-interview-questions-and-answers

Last synced: about 1 month ago
JSON representation

Flutter and Dart Interview Questions and Answers

Awesome Lists containing this project

README

        

# flutter-interview-questions-and-answers
Flutter and Dart Interview Questions and Answers

## 1. What is Flutter?
Answer: Flutter is an open-source and popular mobile app development framework created by Google. It was released in May 2017. It allows developers to build high -performance, visually attractive, and natively compiled multi-platform applications like mobile, web, and desktop applications using a single codebase.

## 2. What is Dart and why it is used in Flutter?
Answer: Dart is a programming language created by Google that is used to develop Flutter apps. It is an object-oriented, garbage-collected language that supports both just-in-time (JIT) and ahead-of-time (AOT) compilation. Dart is used in Flutter because it is fast, efficient, and provides features such as hot reloading and strong typing.

## 3. What is Garbage-Collected (GC) language?
Answer: A garbage collected language is a type of programming language where the memory management is handled automatically by the system. The language runtime system automatically tracks the usage of memory and frees up memory that is no longer being used. It helps avoiding memory leaks and other related issues. Some garbage collected (GC) languages are Dart, Java, Python, and Ruby.

## 4. What is the purpose of the main() function?
Answer: The main() function is the entry point of a Flutter application. It is responsible for creating and running the app’s widgets, handling any errors that occur during app execution, and setting up the app’s initial state.

## 5. What is Widget in Flutter?
Answer: In Flutter, a widget is a visual element that represents a part of the user interface of an app. All elements like buttons, text boxes, images that a user can view on the screen or interact with are widgets.

## 6. What is the difference between StatelessWidget and StatefulWidget?
Answer: A StatelessWidget does not have mutable state. It is used if the UI does not need to change or update any state. And a StatefulWidget has mutable state. It is used if the UI needs to change or update state any time.

## 7. What is the difference between hot reload and hot restart in Flutter?
Answer: Hot reload allows us to update Flutter app's code while it is running without losing the app's current state. Hot restart completely reloads the app and resets app state. Hot reload is faster that hot restart.