flutter_percent_indicator icon indicating copy to clipboard operation
flutter_percent_indicator copied to clipboard

arcType: ArcType.HALF, it occupying size for full circle

Open Salam-pc opened this issue 3 years ago • 1 comments

Even though I'm using arcType: ArcType.HALF, it still uses a circle Size, so it shows a vacuum space between this and the next widget

// ignore_for_file: prefer_const_constructors

import 'package:flutter/material.dart'; import 'package:percent_indicator/percent_indicator.dart';

void main() { runApp(MyApp()); }

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold(body: MyHomePage()), ); } }

class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ CircularPercentIndicator( radius: 120.0, animation: true, animationDuration: 2000, lineWidth: 10.0, percent: .56, reverse: false, arcBackgroundColor: Colors.grey[700], arcType: ArcType.HALF, center: const Text("20 hours"), circularStrokeCap: CircularStrokeCap.round, backgroundColor: Colors.transparent, progressColor: Colors.green, ), Text('data') ], ), ), ); } }

Salam-pc avatar May 16 '22 10:05 Salam-pc

You can use SizedBox and SingleChildScrollView with NeverScrollableScrollPhysics as explained here.

arzakmiftakhul avatar Jun 06 '22 02:06 arzakmiftakhul