Skip to content
pubscout

flutter_inset_shadow

2.0.3, released 3 years ago by an unverified publisher

Extends BoxShadow and BoxDecoration to support the inset property for inner shadows.

WASM-ready
$ flutter pub add flutter_inset_shadow
Source repository

What it does

Extends Flutter's BoxShadow and BoxDecoration to support an inset property, allowing developers to create inner shadows commonly used in Neumorphism and custom container styling. The rendering algorithm follows the same approach as Blink.

AI-written summary of version 2.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement neumorphic UI designs requiring inner container shadows.
  • You want to add an inset property to standard BoxShadow configurations.

Skip it when

  • You only need standard outer shadows which are already supported natively by Flutter.
  • You cannot accommodate hiding standard Material BoxDecoration and BoxShadow imports.

Strengths

  • Supports all properties of standard BoxShadow.
  • Uses the same hollow-rectangle blurring algorithm as the Chromium rendering engine (Blink).
  • Supports BoxShape.circle and box shadow transitions.

Weaknesses

  • Requires hiding standard BoxShadow and BoxDecoration imports from flutter/material.dart.
  • Replaces core decoration classes instead of operating as a separate standalone widget.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Requires adding the package and hiding BoxShadow and BoxDecoration from the flutter/material import.

import 'package:flutter/material.dart' hide BoxDecoration, BoxShadow;
import 'package:flutter_inset_shadow/flutter_inset_shadow.dart';

Widget build(BuildContext context) {
  return Container(
    decoration: BoxDecoration(
      boxShadow: [
        BoxShadow(
          offset: Offset(1, 2),
          blurRadius: 5,
          spreadRadius: 2,
          color: Colors.green,
          inset: true,
        ),
      ],
    ),
  );
}

Works with

Packages commonly used together with flutter_inset_shadow: ones it builds on, ones built on it, and its own family.