inner_shadow_container 1.0.0
inner_shadow_container: ^1.0.0 copied to clipboard
A customizable Flutter widget that adds subtle inner shadow effect to containers.
InnerShadowContainer ๐ช
A customizable Flutter widget that adds a subtle and flexible inner shadow effect to containers โ perfect for neumorphism and modern UI design.
โจ Features
- ๐น Inner shadow from any direction
- ๐น Customizable blur, offset, radius, and color
- ๐น Lightweight and dependency-free
- ๐น Fully customizable and reusable widget
- ๐น Suitable for neumorphic-style UIs
๐ Installation
Add the following to your pubspec.yaml file:
dependencies:
inner_shadow_container: ^1.0.0
Then run:
flutter pub get
๐ง Usage
import 'package:inner_shadow_container/inner_shadow_container.dart';
InnerShadowContainer(
height: 120,
width: 120,
backgroundColor: Colors.white,
borderRadius: 20,
isShadowTopLeft: true,
isShadowBottomRight: true,
child: Center(
child: Icon(Icons.star, size: 40, color: Colors.orange),
),
);
๐ Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
height |
double? |
null |
Height of the container |
width |
double? |
null |
Width of the container |
borderRadius |
double |
12.0 |
Border radius of the container |
backgroundColor |
Color |
Colors.white |
Background color of the container |
isShadowTopLeft |
bool |
false |
Apply inner shadow on top-left side |
isShadowTopRight |
bool |
false |
Apply inner shadow on top-right side |
isShadowBottomRight |
bool |
false |
Apply inner shadow on bottom-right side |
isShadowBottomLeft |
bool |
false |
Apply inner shadow on bottom-left side |
child |
Widget? |
null |
Optional child widget inside the container |
alignment |
Alignment |
Alignment.center |
Alignment of the child inside the container |
๐งช Example App
InnerShadowContainer(
height: 120,
width: 120,
backgroundColor: Colors.white,
borderRadius: 20,
isShadowTopLeft: true,
isShadowBottomRight: true,
child: Icon(Icons.favorite, color: Colors.red, size: 40),
);
๐ก Tip
You can combine multiple sides for richer depth:
isShadowTopLeft: true,
isShadowBottomRight: true,
It works well with soft UI themes like neumorphism.
๐ License
This project is licensed under the MIT License ยฉ 2025 Karan Padaliya
๐ Contributions
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
Made with โค๏ธ in Flutter.