Riyazat Durrani
Riyazat Durrani

Reputation: 668

responsive Circularprogressindiactor in flutter

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,

              ),
            ),

Upvotes: 0

Views: 181

Answers (1)

Jim
Jim

Reputation: 7601

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,

              ),
            ),

Upvotes: 1

Related Questions