A. Missing @override annotation before build method
B. Text widget cannot be returned directly
C. StatelessWidget cannot have build method
D. BuildContext parameter is missing
Solution
Step 1: Check Flutter widget conventions
The build method should have @override annotation to indicate it overrides the parent method.
Step 2: Verify other options
Returning Text is valid, StatelessWidget requires build, and BuildContext is present.
Final Answer:
Missing @override annotation before build method -> Option A
Quick Check:
@override missing = B [OK]
Hint: Always add @override for build() in widgets [OK]
Common Mistakes:
Ignoring missing @override warning
Thinking Text can't be returned directly
Believing StatelessWidget lacks build method
5. How does Dart's single-threaded event loop model help Flutter apps maintain smooth UI performance?
hard
A. By allowing UI updates and async tasks to run without blocking each other
B. By running multiple threads simultaneously for UI rendering
C. By forcing all code to run synchronously on the main thread
D. By disabling asynchronous programming to avoid delays
Solution
Step 1: Understand Dart's event loop
Dart uses a single thread with an event loop to handle UI and async tasks efficiently without blocking.
Step 2: Analyze options
By allowing UI updates and async tasks to run without blocking each other correctly describes non-blocking UI updates. Options A, B, and D misunderstand Dart's concurrency model.
Final Answer:
By allowing UI updates and async tasks to run without blocking each other -> Option A
Quick Check:
Event loop = non-blocking UI updates = C [OK]
Hint: Event loop keeps UI smooth by non-blocking tasks [OK]
Common Mistakes:
Thinking Dart uses multiple threads for UI
Assuming all code runs synchronously
Believing async is disabled
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.