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.
quick_shadow fills that gap with a simple and performant QuickShadow widget using a Canvas-based even-odd path technique.
π Try it Live
β¨ Features
- β Add inner shadow to any widget
- β Supports BorderRadius (rounded corners & circles)
- β Supports multiple shadows
- β Perfect for Neumorphism UI
- β
Includes
QuickShadowContainerconvenience widget - β Zero external dependencies (pure Flutter)
πΈ Screenshots
Add your screenshots inside a
screenshots/folder in your repo root.
| Basic Shadow | Neumorphism | Buttons | Cards |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
π¦ Installation
Add this to your pubspec.yaml:
dependencies:
quick_shadow: ^0.0.3
Then run:
flutter pub get
Import it 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,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFE0E5EC),
borderRadius: BorderRadius.circular(20),
),
child: Text('PRESSED'),
),
)
QuickShadowContainer (Shorthand)
QuickShadowContainer(
width: 200,
height: 60,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFE0E5EC),
borderRadius: BorderRadius.circular(14),
),
shadows: [
Shadow(
color: Colors.black26,
blurRadius: 10,
offset: Offset(4, 4),
),
],
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 the inner 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 |
π‘ Best Use Cases
- Neumorphism UI
- Pressed buttons
- Soft cards
- Inner depth effects
- Modern dashboard components
π€ Contributing
Found a bug or want a new feature?
Open an issue or submit a PR on GitHub:
quick_shadow Repository
Contributions are always welcome.
π License
This package is licensed under the MIT License.
See the LICENSE file for details.



