flutterlinear-gradientsflutter-design

How to do a gold / metal static look in Flutter?


I would like to apply some effects on Icons and Cards to get a gold look like on the picture. I assume we would need a LinearGradient and a shadow with another LinearGradient, or perhaps a Stack with a second icon that is slightly larger with a darker LinearGradient. What would be the best way to go about it? I am also aware of the https://pub.dev/packages/shimmer plugin but that is animated, and I am looking for sg static. enter image description here


Solution

  • you can use a container and give it a linear gradient color and add some boreders and it should look like the picture

    here is an example:

    Container(
              width: 100,
              height: 125,
              decoration: BoxDecoration(
                border: Border.all(
                  color: Colors.red,
                  width: 5.0,
                ),
                gradient: LinearGradient(
                  colors: [Colors.yellow, Color(0xffad9c00)],
                  begin: Alignment.topCenter,
                  end: Alignment.bottomCenter,
                ),
              ),
            ),