skip to Main Content

i want to make the circular progress indicator to navigate to a new page ontap function while maintaining the stucture.

 Row(
      children: const [
        Expanded(
          child: AnimatedCircularProgressIndicator(
            percentage: 0.8,
            label: "Flutter",
          ),
        ),
        SizedBox(width: defaultPadding),
        Expanded(
          child: AnimatedCircularProgressIndicator(
            percentage: 0.72,
            label: "REG-NEW",
          ),
        ),
        SizedBox(width: defaultPadding),
        Expanded(
          child: AnimatedCircularProgressIndicator(
            percentage: 0.65,
            label: "Firebase",
          ),
        ),
      ],
    ),

2

Answers


  1. wrap AnimatedCircularProgressIndicator with tappable widget and navigate on tap.

    InkWell(
      onTap: () {
        //nav to new Page
        Navigator.of(context).push(MaterialPageRoute(
          builder: (context) {
            return NewPage();
          },
        ));
      },
      child: AnimatedCircularProgressIndicator(...),
    ),
    

    When ever you need tap even over a widget, you can choose GestureDetector or InkWell..

    Login or Signup to reply.
  2. You can choose InkResponse, InkWell or GesturedDetector. the last 1 only fire function when others are more beauty

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search