Home > Software engineering >  Background Gradient Effect Flutter
Background Gradient Effect Flutter

Time:08-11

How can I achieve this gradient background effect in Flutter?

This is what I am trying to achieve

I am working on this as part of a school project but I am relatively new to coding so I am really struggling. Please help.

CodePudding user response:

return Container(
      decoration: BoxDecoration(
        gradient: [List of Your Colors]
      ),
    );

CodePudding user response:

return Container(
  decoration: BoxDecoration(
    gradient: LinearGradient(
      begin: Alignment.centerLeft,
      end: Alignment.centerRight,
      colors: [
        Color(0xff147EFF),
        Color(0xff6236BE)
      ]
    )
  )
);

Add your colors :)

Here more info -> LinearGradient

  • Related