Flutter Basics guide featuring essential interview questions and answers, designed to help beginners and professionals excel in Flutter training and coding interviews. At Softloom IT Training, we empower you with the knowledge and skills to master Flutter programming and succeed in the tech world.

1. What is Flutter?

A) A programming language

B) A framework for mobile and web development

C) A database management system

D) A cloud service

Answer: B) A framework for mobile and web development

2. Who developed Flutter?

A) Facebook

B) Apple

C) Google

D) Microsoft

Answer: C) Google

3. What programming language does Flutter use?

A) Java

B) Swift

C) Dart

D) Kotlin

Answer: C) Dart

4. What is the command to create a new Flutter project?

A) flutter create my_app

B) flutter new my_app

C) flutter start my_app

D) flutter init my_app

Answer: A) flutter create my_app

5. Which widget is used as a root widget in a Flutter app?

A) MaterialApp

B) Container

C) Column

D) Stack

Answer: A) MaterialApp

6. What is the main advantage of Flutter?

A) Uses multiple programming languages

B) Single codebase for multiple platforms

C) No need for internet connectivity

D) No UI customization required

Answer: B) Single codebase for multiple platforms

7. Which of the following is NOT a type of widget in Flutter?

A) StatefulWidget

B) StatelessWidget

C) AnimatedWidget

D) DynamicWidget

Answer: D) DynamicWidget

8. How do you add a package dependency in a Flutter project?

A) Modify flutter_config.yaml

B) Edit pubspec.yaml

C) Use flutter install command

D) Add to flutter_packages.json

Answer: B) Edit pubspec.yaml

9. What does the setState() method do in Flutter?

A) Deletes a widget

B) Updates the UI by changing the widget’s state

C) Restarts the entire application

D) Stops all animations

Answer: B) Updates the UI by changing the widget’s state

10. What command is used to run a Flutter app on an emulator?

A) flutter run

B) flutter start

C) flutter execute

D) flutter build

Answer: A) flutter run

11. Which of these widgets allows you to create a scrollable list?

A) Row

B) Column

C) ListView

D) Stack

Answer: C) ListView

12. What does the hot reload feature in Flutter do?

A) Stops the app and restarts it

B) Rebuilds the UI instantly without losing state

C) Clears the application cache

D) Only works on Android devices

Answer: B) Rebuilds the UI instantly without losing state

13. Which widget is used for displaying an image in Flutter?

A) ImageView

B) Image

C) Picture

D) Img

Answer: B) Image

14. How do you navigate to a new screen in Flutter?

A) Navigator.push(context, MaterialPageRoute(builder: (context) => NewScreen()))

B) context.push(NewScreen())

C) NewScreen.open(context)

D) Navigate.to(NewScreen())

Answer: A) Navigator.push(context, MaterialPageRoute(builder: (context) => NewScreen()))

15. Which widget allows you to arrange items in a grid format?

A) ListView

B) GridView

C) Column

D) Stack

Answer: B) GridView

16. What is the purpose of the Scaffold widget in Flutter?

A) It creates a basic app layout structure

B) It manages user authentication

C) It is used for navigation

D) It is used only in iOS apps

Answer: A) It creates a basic app layout structure

17. What does the pub get command do?

A) Fetches dependencies for the project

B) Runs unit tests

C) Clears the Flutter cache

D) Builds the APK

Answer: A) Fetches dependencies for the project

18. What is StatefulWidget used for?

A) For static UI components

B) For components that need to change dynamically

C) For defining animations

D) For handling navigation

Answer: B) For components that need to change dynamically

19. What is Future in Dart?

A) A data type for storing past values

B) A class for handling asynchronous operations

C) A built-in Flutter widget

D) A function that runs instantly

Answer: B) A class for handling asynchronous operations

20. What is a Stream in Dart?

A) A continuous flow of data

B) A static list of values

C) A Flutter widget

D) A debugging tool

Answer: A) A continuous flow of data

21. Which Flutter package is commonly used for state management?

A) Provider

B) Navigator

C) Router

D) StackManager

Answer: A) Provider

22. What does async keyword indicate in Dart?

A) That the function returns immediately

B) That the function contains asynchronous code

C) That the function only runs on Android

D) That the function is deprecated

Answer: B) That the function contains asynchronous code

23. Which function is used to handle errors in a Future?

A) try-catch

B) errorHandler()

C) onError()

D) catchError()

Answer: D) catchError()

24. How do you define a constant in Dart?

A) final x = 10;

B) const x = 10;

C) Both A & B

D) None of the above

Answer: C) Both A & B

25. What is the default build system for Flutter?

A) Gradle

B) Xcode

C) Maven

D) CocoaPods

Answer: A) Gradle

26. What is Bloc used for in Flutter?

A) A state management approach

B) A UI rendering engine

C) A database management system

D) A widget for handling gestures

Answer: A) A state management approach

27. What is the purpose of GestureDetector in Flutter?

A) To detect user interactions like taps and swipes

B) To display animations

C) To fetch data from an API

D) To control device sensors

Answer: A) To detect user interactions like taps and swipes

28. How do you define a function in Dart?

A) void myFunction() {}

B) def myFunction() {}

C) function myFunction() {}

D) new myFunction() {}

Answer: A) void myFunction() {}

29. What is the purpose of build() method in Flutter?

A) It builds the UI for a widget

B) It initializes state variables

C) It runs the main application logic

D) It compiles the Flutter project

Answer: A) It builds the UI for a widget

30. What is the main entry point function in a Flutter application?

A) main()

B) startApp()

C) flutterMain()

D) run()

Answer: A) main()