i am using the following plugin
flutter_native_splash 2.2.17
it is work perfectly but the problem is i only can use one color in the following setup
flutter_native_splash:
color: "#16874c" // here i am not able to use two HEX color as list in order to get gradiant color
i have the following desire gradient
Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.blue,
Colors.black,
]
)
),
),
how can i use that same gradient and provide it to flutter_native_splash
setup
2
Answers
From the docs:
Create a gradient image with any tool, put it inside your assets folder and link it as background_image
If you want to use gradient colors as your background color, you need to create a new file in the drawable folder and name it gradient_background.xml.
Since the gradient background is a combination of colors, specify the custom colors you want to use as a gradient in colors.xml. The maximum number of colors you can use is three: the start color, center color, and end color.
In this file, within the shape tag, specify your gradient. In my example, that’d be a linear gradient with all of the possible three colors.
To choose your gradient color and what angle of the gradient you want, you can use the Online CSS Gradient Generator.
for more info check this article