Figma design I am having difficulty creating a border for a Container in which the color is a gradient. The design is based on a Figma design that I have to code. My idea of wrapping an outer container and padding it inside is not effective. What should I do?
class PoppinButton extends StatelessWidget {
const PoppinButton({Key? key, required this.text}) : super(key: key);
final String text;
@override
Widget build(BuildContext context) {
return Container(
height: 55,
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
gradient: const LinearGradient(
begin: Alignment(1,-1),
end: Alignment(1,-1),
colors: <Color>[Color(0xFFFF53C0),Color(0x00FF53C0),],
// stops: [0.1507, 1.044]
)
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: <Color>[Color(0xFFB6116B),Color(0xFF3B1578)],
stops: [0.1507, 1.044]
)
),
child: Center(
child: Text(text,style: GoogleFonts.poppins(
textStyle: const TextStyle(
color: Colors.white,
fontSize: 18,
)
),),
),
),
);
}
}
Im expecting a correct answer that can help me to fix my problem , tks guy new Edit : this answer code below is not working :((