quickshadowflutter 0.0.2 copy "quickshadowflutter: ^0.0.2" to clipboard
quickshadowflutter: ^0.0.2 copied to clipboard

A Flutter package that adds inner shadow support to any widget. Supports BorderRadius, multiple shadows, and works with Container, Button, Card, or any custom widget. Perfect for neumorphism UI.

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.


Features #

  • ✅ Inner shadow on any widget
  • ✅ Supports BorderRadius (rounded corners & circles)
  • Multiple shadows on a single widget
  • ✅ Perfect for Neumorphism UI
  • QuickShadowContainer convenience widget
  • ✅ Zero external dependencies (pure Flutter)

Getting Started #

Add to your pubspec.yaml:

dependencies:
  quick_shadow: ^0.0.1

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.

6
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that adds inner shadow support to any widget. Supports BorderRadius, multiple shadows, and works with Container, Button, Card, or any custom widget. Perfect for neumorphism UI.

Repository (GitHub)
View/report issues

Topics

#ui #shadow #neumorphism #decoration #widget

License

unknown (license)

Dependencies

flutter

More

Packages that depend on quickshadowflutter