Challenge - 5 Problems
Backdrop Blur Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ ui_behavior
intermediate2:00remaining
What is the visual effect of this Flutter code snippet?
Consider this Flutter widget tree snippet that uses a BackdropFilter with a blur effect. What will the user see on the screen?
Flutter
Stack(
children: [
Image.asset('background.jpg'),
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Container(
color: Colors.black.withOpacity(0),
),
),
],
)Attempts:
2 left
💡 Hint
BackdropFilter applies a blur to the content behind it, but the child container's opacity affects visibility.
✗ Incorrect
BackdropFilter with ImageFilter.blur applies a blur effect to the widgets behind it in the stack. The child Container with transparent color allows the blur to be visible without covering the background.
📝 Syntax
intermediate2:00remaining
Which option correctly applies a blur effect using BackdropFilter in Flutter?
Select the Flutter code snippet that correctly applies a blur effect of 10 pixels on both X and Y axes using BackdropFilter.
Attempts:
2 left
💡 Hint
ImageFilter.blur requires named parameters sigmaX and sigmaY.
✗ Incorrect
Option A uses the correct syntax with named parameters sigmaX and sigmaY. Other options either miss named parameters or use incorrect function calls.
❓ lifecycle
advanced2:00remaining
What happens if you remove the child widget inside BackdropFilter?
In Flutter, what is the effect of omitting the child widget inside a BackdropFilter widget?
Flutter
BackdropFilter( filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), // child: Container(color: Colors.transparent), // omitted )
Attempts:
2 left
💡 Hint
BackdropFilter needs a child widget to define the area where the filter applies.
✗ Incorrect
BackdropFilter applies the filter only to the area occupied by its child. Without a child, it has no size and thus no visible effect.
🔧 Debug
advanced2:00remaining
Why does this BackdropFilter blur not appear on the screen?
Given this Flutter code, why is the blur effect not visible?
Flutter
Stack(
children: [
Image.asset('background.jpg'),
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Container(color: Colors.black.withOpacity(0.5)),
),
],
)Attempts:
2 left
💡 Hint
Check how the child Container's color opacity affects visibility.
✗ Incorrect
A semi-transparent black Container overlays the blurred background, making the blur effect invisible because the dark color covers it.
🧠 Conceptual
expert3:00remaining
How does BackdropFilter differ from a normal blur effect on a widget?
Which statement best describes the difference between BackdropFilter and applying a blur effect directly on a widget in Flutter?
Attempts:
2 left
💡 Hint
Think about what is behind the BackdropFilter versus what the widget contains.
✗ Incorrect
BackdropFilter applies a filter to the pixels behind its child widget, creating a blur of the background. Normal blur effects applied to a widget affect that widget's own content.