How can I create these specific widget which lies inside the weekly deals section?

Issue

enter image description here

How do I create the Box Shadow, the View More option and the 15% off tag as shown in the picture?

Solution

You can have a separate Row with a container. Container can have a Text child to create the 15% off tag.

Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(vertical: 16.0),
      child: Material(
        elevation: 5.0,
        color: color,
        borderRadius: BorderRadius.circular(30.0),
        child: MaterialButton(
          onPressed: onPressed, //may not be needed if the aim is to show % discount only
          minWidth: 200.0,
          height: 42.0,
          child: Text(
            "15% off",
          ),

ElevatedButton can be used for the view More.

Can you send a snap shot for what you mean by Box Shadow?

Answered By – Abdallah Ibrahim

Answer Checked By – Clifford M. (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.