quick_shadow
A Flutter package that adds inner shadow support to any widget β Container, Button, Card, and more.
Flutter's built-in BoxDecoration only supports outer shadows. This package fills that gap with a simple, performant QuickShadow widget using a Canvas-based even-odd path technique.
π Try it Live
Screenshots
| Basic Shadow | Neumorphism | Buttons | Cards |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Features
- β Inner shadow on any widget
- β Supports BorderRadius (rounded corners & circles)
- β Multiple shadows on a single widget
- β Perfect for Neumorphism UI
- β
QuickShadowContainerconvenience widget - β Zero external dependencies (pure Flutter)
Getting Started
Add to your pubspec.yaml:
dependencies:
quick_shadow: ^0.0.3
Run:
flutter pub get
Then import in your Dart file:
import 'package:quick_shadow/quick_shadow.dart';
Usage
Basic Inner Shadow
QuickShadow(
shadows: [
Shadow(
color: Colors.black38,
blurRadius: 10,
offset: Offset(4, 4),
),
],
borderRadius: BorderRadius.circular(16),
child: Container(
width: 150,
height: 150,
decoration: BoxDecoration(
color: Color(0xFFE0E0E0),
borderRadius: BorderRadius.circular(16),
),
),
)
Neumorphism β Pressed Effect
QuickShadow(
shadows: [
Shadow(color: Colors.black26, blurRadius: 12, offset: Offset(6, 6)),
Shadow(color: Colors.white70, blurRadius: 12, offset: Offset(-6, -6)),
],
borderRadius: BorderRadius.circular(20),
child: Container(
width: 160,
height: 60,
decoration: BoxDecoration(
color: Color(0xFFE0E5EC),
borderRadius: BorderRadius.circular(20),
),
alignment: Alignment.center,
child: Text('PRESSED'),
),
)
QuickShadowContainer (Shorthand)
QuickShadowContainer(
width: 200,
height: 60,
decoration: BoxDecoration(
color: Color(0xFFE0E5EC),
borderRadius: BorderRadius.circular(14),
),
shadows: [
Shadow(
color: Colors.black26,
blurRadius: 10,
offset: Offset(4, 4),
),
],
alignment: Alignment.center,
child: Text('Hello Inner Shadow'),
)
Circular Shape
QuickShadow(
shadows: [
Shadow(color: Colors.black26, blurRadius: 14, offset: Offset(6, 6)),
],
borderRadius: BorderRadius.circular(75),
child: Container(
width: 150,
height: 150,
decoration: BoxDecoration(
color: Color(0xFFE0E5EC),
shape: BoxShape.circle,
),
),
)
API Reference
QuickShadow
| Parameter | Type | Required | Description |
|---|---|---|---|
shadows |
List<Shadow> |
β | List of inner shadows to apply |
borderRadius |
BorderRadius? |
β | Match with child's border radius for proper clipping |
child |
Widget |
β | The widget to apply shadow to |
QuickShadowContainer
| Parameter | Type | Required | Description |
|---|---|---|---|
shadows |
List<Shadow> |
β | List of inner shadows |
decoration |
BoxDecoration |
β | Box decoration (color, borderRadius, etc.) |
width |
double? |
β | Container width |
height |
double? |
β | Container height |
padding |
EdgeInsetsGeometry? |
β | Inner padding |
alignment |
AlignmentGeometry? |
β | Child alignment |
child |
Widget? |
β | Optional child widget |
How Shadow Offset Works
| Offset | Shadow appears on |
|---|---|
Offset(4, 4) |
Top & Left inner edges |
Offset(-4, -4) |
Bottom & Right inner edges |
| Both together | All edges β neumorphism pressed look |
Contributing
Found a bug or want a new feature? Open an issue or PR at GitHub β contributions are welcome!
License
MIT License β see LICENSE file for details.



