Google Flutter Essentials 2 — Questions and Answers
Question 1: Which command creates a new Flutter project named 'myapp'?
- flutter create myapp (Correct answer)
- flutter new myapp
- flutter init myapp
- dart create myapp
Correct answer: flutter create myapp
flutter create scaffolds a new Flutter project with the given name.
Question 2: What language is used to write Flutter applications?
- Dart (Correct answer)
- Kotlin
- JavaScript
- Swift
Correct answer: Dart
Flutter apps are written in the Dart programming language.
Question 3: Which widget is typically used as the root to apply Material Design?
- MaterialApp (Correct answer)
- Scaffold
- Container
- WidgetsApp
Correct answer: MaterialApp
MaterialApp wraps the app and provides Material Design defaults and navigation.
Question 4: What does the hot reload feature do?
- Injects updated code into the running Dart VM, preserving state (Correct answer)
- Rebuilds and reinstalls the entire app
- Clears all app state and restarts
- Compiles the app to native ahead of time
Correct answer: Injects updated code into the running Dart VM, preserving state
Hot reload injects updated source into the running VM while keeping app state.
Question 5: Which widget provides a basic visual layout structure with app bar, body, and floating button?
- Scaffold (Correct answer)
- Column
- MaterialApp
- SafeArea
Correct answer: Scaffold
Scaffold implements the basic Material visual layout structure.
Question 6: In Flutter, everything you see on screen is essentially a:
- Widget (Correct answer)
- View
- Activity
- Fragment
Correct answer: Widget
Flutter's UI is built from a tree of composable widgets.
Question 7: Which method must every widget's build context return?
- A Widget (Correct answer)
- A void
- A String
- A bool
Correct answer: A Widget
The build method returns a Widget describing part of the UI.
Which command creates a new Flutter project named 'myapp'?