skip to Main Content
Container(
                  decoration: BoxDecoration(
                    border: Border.all(color: Colors.green.shade100),
                    borderRadius: BorderRadius.circular(12),
                  ),
                  padding: EdgeInsets.all(12),
                  child: Row(
                  children: const [ Text("Pay Now",
                  style: TextStyle(color: Colors.white),
                 ),
                  Icon(
                    Icons.arrow_forward_ios,
                    size: 16,
                    color: Colors.white,
                  )
                  ],
                )
                )

tried using gesture detector, onPressed. all could not work

2

Answers


  1. how about wrapping GestureDetector and onTap?

    GestureDetector(
      onTap: () {
        // onTap event here
      },
      child: Container() // your container
     )
    
    Login or Signup to reply.
  2. How about using InkWell? The difference with GestureDetector is it has ripple effects but it detects less type of gestures from user.

    InkWell(
        onTap: () {
           // go to another page
        },
        child: Container(...)
    );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search