패키지, 저장소 및 앱 카테고리 검색

dashed_circular_progress_bar 표지
패키지 상세v0.0.6

dashed_circular_progress_bar

점선 원형 진행률 바는 작업의 진행 상황을 원형으로 표시하며 색상, 스타일 및 모양을 사용자 정의할 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4.5천
좋아요
117
Pub 점수
160

패키지 설치

flutter pub add dashed_circular_progress_bar

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter용 사용자 정의 가능한 점선 원형 진행률 바로, 작업 진행 상황을 원형 형식으로 시각적으로 표현합니다. 다양한 색상, 선 스타일 및 형태를 지원하여 앱에서 로딩 인디케이터 또는 진행 추적에 적합합니다. 가볍고 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼과 호환됩니다. pub 명령어를 사용해 쉽게 통합하고 앱 테마에 맞게 맞춤화할 수 있습니다.

사용 사례

  • 로딩 표시기
  • 양식 내 진행 상황 추적
  • 작업 완료 시각화
  • 사용자 정의 UI 요소
  • 인터랙티브 대시보드

주요 기능

  • 점선 테두리 스타일
  • 사용자 정의 색상 및 너비
  • 크기 조절 가능한 원형
  • 크로스 플랫폼 호환성
  • pub를 통한 간편한 통합
  • 애니메이션을 지원합니다

적합한 대상

  • 시각적 피드백을 원하는 앱 개발자
  • 독특한 진행률 표시기를 원하는 디자이너
  • 플랫폼 간 호환성 컴포넌트가 필요한 프로젝트
  • UI 중심 애플리케이션
  • 미니멀리즘 디자인 미학

고려 사항

  • 원형 레이아웃에만 제한됨
  • 내장 텍스트 레이블 없음
  • 수동 애니메이션 제어 필요
  • 선형 진행에 적합하지 않음
  • 다크 모드를 위해 추가적인 스타일링이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Dashed circular progress bar

Open source flutter package, Dashed circular progress bar for flutter apps.

Getting Started

Installing

Add this line to the pubspec.yaml file below the dependencies:

dependencies:
  dashed_circular_progress_bar: ^0.0.6

Now to use, import this package into the desired file as follows:

import 'package:dashed_circular_progress_bar/dashed_circular_progress_bar.dart';

Basic examples

Here are some simple examples you can use to create this package:

Example 1 - Simple progress bar
simple_example_gif

First of all, to access the amount of progress when doing animation, you need to define a ValueNotifier:

final ValueNotifier<double> _valueNotifier = ValueNotifier(0);

Then add it to the widget:

DashedCircularProgressBar.aspectRatio(
  aspectRatio: 1, // width ÷ height
  valueNotifier: _valueNotifier,
  progress: 478,
  maxProgress: 670,
  corners: StrokeCap.butt,
  foregroundColor: Colors.blue,
  backgroundColor: const Color(0xffeeeeee),
  foregroundStrokeWidth: 36,
  backgroundStrokeWidth: 36,
  animation: true,
  child: Center(
    child: ValueListenableBuilder(
      valueListenable: _valueNotifier,
      builder: (_, double value, __) => Text(
        '${value.toInt()}%',
        style: const TextStyle(
          color: Colors.black,
          fontWeight: FontWeight.w300,
          fontSize: 60
        ),
      ),
    ),
  ),
)
Example 2 - Dashed background progress bar
simple_example_gif
DashedCircularProgressBar.aspectRatio(
  aspectRatio: 2, // width ÷ height
  progress: 34,
  startAngle: 270,
  sweepAngle: 180,
  circleCenterAlignment: Alignment.bottomCenter,
  foregroundColor: Colors.black,
  backgroundColor: const Color(0xffeeeeee),
  foregroundStrokeWidth: 3,
  backgroundStrokeWidth: 2,
  backgroundGapSize: 2,
  backgroundDashSize: 1,
  seekColor: Colors.yellow,
  seekSize: 22,
  animation: true,
)
Example 3 - More complex progress bar
more_complex_example_gif
DashedCircularProgressBar.aspectRatio(
  aspectRatio: 1, // width ÷ height
  valueNotifier: _valueNotifier,
  progress: 37,
  startAngle: 225,
  sweepAngle: 270,
  foregroundColor: Colors.green,
  backgroundColor: const Color(0xffeeeeee),
  foregroundStrokeWidth: 15,
  backgroundStrokeWidth: 15,
  animation: true,
  seekSize: 6,
  seekColor: const Color(0xffeeeeee),
  child: Center(
    child: ValueListenableBuilder(
      valueListenable: _valueNotifier,
      builder: (_, double value, __) => Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Text(
            '${value.toInt()}%',
            style: const TextStyle(
              color: Colors.black,
              fontWeight: FontWeight.w300,
              fontSize: 60
            ),
          ),
          Text(
            'Accuracy',
            style: const TextStyle(
              color: Color(0xffeeeeee),
              fontWeight: FontWeight.w400,
              fontSize: 16
            ),
          ),
        ],
      )
    ),
  ),
)
Example 4 - Dashed progress bar

You can also use the desired dimensions instead of aspect ratio.

dashed_example_gif
DashedCircularProgressBar.square(
  dimensions: 350,
  progress: 180,
  maxProgress: 360,
  startAngle: -27.5,
  foregroundColor: Colors.redAccent,
  backgroundColor: const Color(0xffeeeeee),
  foregroundStrokeWidth: 7,
  backgroundStrokeWidth: 7,
  foregroundGapSize: 5,
  foregroundDashSize: 55,
  backgroundGapSize: 5,
  backgroundDashSize: 55,
  animation: true,
  child: const Icon(
    Icons.favorite,
    color: Colors.redAccent,
    size: 126
  ),
)
Example 5 - Play with circle center alignment

By changing the center, you can specify the location of the progress bar.

play_with_circle_center_alignment_example.png

For example to make a progress bar in the shape of the first image (first row, first image from the left):

DashedCircularProgressBar.aspectRatio(
  aspectRatio: 1, // width / height
  progress: 60,
  startAngle: 90,
  sweepAngle: 90,
  corners: StrokeCap.butt,
  foregroundStrokeWidth: 7,
  backgroundStrokeWidth: 7,
  circleCenterAlignment: Alignment.topLeft,
  foregroundColor: Colors.white,
  backgroundColor: const Color(0x22000000),
  animation: true
)

Parameters description

Parameter Default Description
width
double
0 Progress bar width.
height
double
0 Progress bar height.
aspectRatio
double
0 Progress aspect ratio.
progress
double
0 Current value of progress bar.
maxProgress
double
100 Maximum value of progress.
startAngle
double
0 The starting angle of the arc.
sweepAngle
double
360 The sweep angle of the arc.
foregroundStrokeWidth
double
2 Foreground arc thickness.
backgroundStrokeWidth
double
2 Background arc thickness.
foregroundColor
Color
Colors.blue Foreground arc color.
backgroundColor
Color
Colors.white Background arc color.
corners
StrokeCap
StrokeCap.round Styles to use for arcs endings.
foregroundGapSize
double
0 Foreground arc gap size.
foregroundDashSize
double
0 Foreground arc dash size.
backgroundGapSize
double
0 Background arc gap size.
backgroundDashSize
double
0 Background arc dash size.
seekSize
double
0 Progress bar seek size.
seekColor
Color
Colors.blue Progress bar seek color.
circleCenterAlignment
Alignment
Alignment.center Align center of progress bar.
animation
bool
false Active progress bar animation.
animationDuration
Duration
Duration(seconds: 1) Progress bar animation duration.
animationCurve
Curve
Curves.easeOut Progress bar animation curve.
onAnimationEnd
void Function()?
null This function is called when animation ended.
ltr
bool
true Specifies how to draw arcs from right to left or vice versa.
child
Widget?
null This widget is placed on the progress bar.
valueNotifier
ValueNotifier?
null Animated value notifier.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.