responsive Circularprogressindiactor in flutter

Issue

below code changes the size of the circular progress indicator manually, by wrapping it around the sized box and giving dimensions.
I want to make it responsive so that it can adapt to every screen size.

SizedBox(
              width: 50,
              height: 50,
              child: CircularProgressIndicator(
                 value: 0.5,
                backgroundColor: Color(0xff19454A),
                valueColor: AlwaysStoppedAnimation(Color(0xff0b6f75)),
                strokeWidth: 8,

              ),
            ),

Solution

SizedBox(
              width: MediaQuery.of(context).size.width*0.2,
              height: MediaQuery.of(context).size.width*0.2,
              child: CircularProgressIndicator(
                 value: 0.5,
                backgroundColor: Color(0xff19454A),
                valueColor: AlwaysStoppedAnimation(Color(0xff0b6f75)),
                strokeWidth: 8,

              ),
            ),

Answered By – Jim

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.