Which widget creates the blur effect for glassmorphism?
BackdropFilter applies a filter (like blur) to everything behind the widget, creating the frosted glass effect.
Create stunning frosted glass and soft shadow UI effects
You can read this lesson publicly. Sign in to unlock exercises, quiz, and FX progress tracking.
Having trouble? AI is here to help
Ask context-aware questions about this lesson. Free plan: 5 questions/day. Upgrade to Premium for higher daily limits.
Use the AI button at the bottom of the screen
Glassmorphism creates frosted glass effects using blur and transparency to simulate a sheet of frosted glass layered over your content. Neumorphism uses soft, opposing shadows to create subtle raised or depressed surfaces that mimic physical objects. Both design trends add visual depth and a modern aesthetic to your Flutter applications.
1// ── GLASSMORPHISM ──2import 'dart:ui';34class GlassCard extends StatelessWidget {5final Widget child;6const GlassCard({super.key, required this.child});78@override9Widget build(BuildContext context) {10return ClipRRect(11borderRadius: BorderRadius.circular(20),12child: BackdropFilter(13filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),14child: Container(15decoration: BoxDecoration(16color: Colors.white.withOpacity(0.2),17borderRadius: BorderRadius.circular(20),18border: Border.all(color: Colors.white.withOpacity(0.3)),19),20padding: const EdgeInsets.all(20),21child: child,22),23),24);25}26}2728// ── NEUMORPHISM ──29class NeuCard extends StatelessWidget {30final Widget child;31const NeuCard({super.key, required this.child});3233@override34Widget build(BuildContext context) {35return Container(36decoration: BoxDecoration(37color: const Color(0xFFE0E5EC),38borderRadius: BorderRadius.circular(20),39boxShadow: [40// Light shadow (top-left)41const BoxShadow(42color: Colors.white,43offset: Offset(-6, -6),44blurRadius: 15,45),46// Dark shadow (bottom-right)47BoxShadow(48color: Colors.grey.shade400,49offset: const Offset(6, 6),50blurRadius: 15,51),52],53),54padding: const EdgeInsets.all(20),55child: child,56);57}58}5960// Pressed (concave) Neumorphism:61Container(62decoration: BoxDecoration(63color: const Color(0xFFE0E5EC),64borderRadius: BorderRadius.circular(20),65boxShadow: [66BoxShadow(color: Colors.grey.shade400, offset: const Offset(-3, -3), blurRadius: 8),67const BoxShadow(color: Colors.white, offset: Offset(3, 3), blurRadius: 8),68],69),70)
BackdropFilter for glassmorphism can be expensive. Use RepaintBoundary around it and avoid using it on rapidly animating content. Neumorphism is lighter on performance.
Advanced visual styles should pass a usability and performance gate:
Beautiful interfaces must remain clear and responsive under real usage conditions.
Create stunning frosted glass and soft shadow UI effects. Animation gives feedback and personality to UI when it supports user intent clearly.
Operate with production and interview-level clarity.
Animate only what helps understanding, and keep transition timing consistent.
Good motion guides attention; bad motion distracts and can hurt performance.
Animation architecture should separate timing logic from reusable visual components.
As your app grows, keep UI, state, and data responsibilities separate so each part stays testable and easier to modify.
BackdropFilter applies a filter (like blur) to everything behind the widget, creating the frosted glass effect.
Neumorphism uses a light shadow on one side and dark shadow on the other, simulating soft light on a surface.
Without clipping, BackdropFilter blurs everything behind it. ClipRRect constrains the effect to the widget's shape.
Something seems incorrect, unclear, or missing? Let us know.
FlutterCraft editorial lessons are reviewed by experienced Flutter developers and updated to stay aligned with modern Flutter and Dart best practices.
Reference docs: Flutter Documentation, Dart Language Tour, and official package documentation where relevant.
Sign in to continue with exercises and quiz for this lesson.
Sign In to Continue