Skip to content
pubscout

control_style

0.1.2, released 8 weeks ago by astonio.com

Applies outer shadows, inner shadows, borders and gradients to Flutter controls and shapes.

WASM-ready
$ flutter pub add control_style
Source repository

What it does

Extends standard Flutter input borders and outlined borders with advanced styling parameters like inner/outer shadows, gradients, and custom border gradients. It allows wrapping standard shapes like RoundedRectangleBorder or OutlineInputBorder to decorate buttons, text fields, cards, and other controls consistently.

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

Use it when

  • You need custom gradients, inner shadows, or outer shadows on buttons, text fields, or chips.
  • You want to animate button or input state changes involving shadows or gradient borders.

Skip it when

  • You only need standard Material Design 3 styling.
  • You are using controls that do not expose a shape field.

Strengths

  • Applies uniform decorations across various Flutter controls and standard shapes.
  • Supports smooth interpolation and animation of custom shadows and border gradients.

Weaknesses

  • Background gradients and inner shadows overlap the inner area of buttons due to Flutter limitations, requiring transparent colors.
  • Shadows may overlap nearby elements.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
TextField(
  decoration: InputDecoration(
    border: DecoratedInputBorder(
      shadow: const [
        BoxShadow(
          color: Colors.blue,
          blurRadius: 12,
        )
      ],
      child: OutlineInputBorder(
        borderRadius: BorderRadius.circular(8),
      ),
    ),
  ),
)

Alternatives

Packages that do the same job and could replace control_style.