Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neumorphic / neomorphic design in Flutter

I've seen several articles recently about neomorphic design in Flutter. How do I implement that in my own project?

enter image description here

I know it is something about the decoration, but what specifically do I add?

Container(
  width: 100,
  height: 100,
  decoration: BoxDecoration(
    ???
  ),
),
like image 929
Suragch Avatar asked Feb 25 '26 21:02

Suragch


1 Answers

You can play around with the actual colors but here is a light and dark example. If you see a different color scheme you like better then just take a screenshot and use Gimp or some other image editing software to get the hex colors from it.

Neumorphic light

enter image description here

  • Background color: Color(0xFFEFEEEE)
  • Light shadow: Colors.white.withOpacity(0.8),
  • Dark shadow: Colors.black.withOpacity(0.1)

Code

Container(
  width: 100,
  height: 100,
  decoration: BoxDecoration(
    boxShadow: [
      BoxShadow(
        color: Colors.white.withOpacity(0.8),
        offset: Offset(-6.0, -6.0),
        blurRadius: 16.0,
      ),
      BoxShadow(
        color: Colors.black.withOpacity(0.1),
        offset: Offset(6.0, 6.0),
        blurRadius: 16.0,
      ),
    ],
    color: Color(0xFFEFEEEE),
    borderRadius: BorderRadius.circular(12.0),
  ),
),

Neumorphic dark

enter image description here

  • Background color: Color(0xFF292D32)
  • Light shadow: Colors.white.withOpacity(0.1),
  • Dark shadow: Colors.black.withOpacity(0.4)

Code

Container(
  width: 100,
  height: 100,
  decoration: BoxDecoration(
    boxShadow: [
      BoxShadow(
        color: Colors.white.withOpacity(0.1),
        offset: Offset(-6.0, -6.0),
        blurRadius: 16.0,
      ),
      BoxShadow(
        color: Colors.black.withOpacity(0.4),
        offset: Offset(6.0, 6.0),
        blurRadius: 16.0,
      ),
    ],
    color: Color(0xFF292D32),
    borderRadius: BorderRadius.circular(12.0),
  ),
),

Pub packages

  • flutter_neumorphic
  • clay_containers
  • neumorphic
  • nm_generators

See also

These articles and code were helpful in researching this.

  • Neumorphism in user interfaces
  • Neumorphism (Soft UI) in User interface design - Tutorial
  • Dark Neumorphism UI Trend 2020
  • Neumorphic designs with Flutter
  • neuomorphic_container Pub package
like image 130
Suragch Avatar answered Feb 27 '26 10:02

Suragch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!