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

패키지 상세v0.0.5

progress_timeline

더 큰 프로세스 내의 다양한 단계를 표시하는 데 사용할 수 있는 타임라인 위젯입니다.

30일 다운로드
18
좋아요
39
Pub 점수
40

패키지 설치

flutter pub add progress_timeline

패키지 개요

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

progress_timeline 패키지는 Flutter에서 사용 가능한 사용자 정의 가능한 타임라인 위젯을 제공하며, 더 큰 프로세스 내 단계를 시각적으로 표현하도록 설계되었습니다. 순차적인 단계를 통해 진행 상황을 추적할 수 있도록 도와주며, 워크플로우, 온보딩 흐름 또는 프로젝트 마일스톤에 적합합니다. 이 위젯은 선형 및 수직 레이아웃을 모두 지원하며, 표시기, 레이블 및 진행 표시기를 사용자 정의할 수 있는 옵션도 제공합니다. 가볍고 기존의 Flutter 앱에 쉽게 통합될 수 있습니다. 이 패키지는 오픈소스이며 커뮤니티가 유지 관리하고 있습니다.

사용 사례

  • 온보딩 흐름
  • 프로젝트 마일스톤 추적
  • 주문 처리 상태
  • 사용자 여정 시각화
  • 작업 완료 진행률

주요 기능

  • 사용자 지정 가능한 타임라인 레이아웃
  • 시각적 진행 표시기
  • 단계 레이블 지원
  • 유연한 스타일 옵션
  • 오픈소스이며 지속적으로 유지 관리되고 있습니다

적합한 대상

  • 가이드된 워크플로를 구축하는 앱 개발자
  • 시각적 진행 추적을 필요로 하는 디자이너
  • 단계별 사용자 안내가 필요한 프로젝트
  • 프로세스 표현을 위한 간단하면서도 효과적인 UI

고려 사항

  • 기본 타임라인 기능에 제한됨
  • 내장 애니메이션 지원 없음
  • 매우 긴 시퀀스에 최적화되지 않음
  • 업데이트를 위해 외부 유지보수에 의존

원본 README

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

timeline_horizontal

A Flutter Widget to make interactive Progress Timeline.

This widget can be used to make provide an interactive timeline view of a bigger process. Fluid Animations while switching between stages.

Installation

To use this package:

Add the following to your pubspec.yaml file:

dependencies:
    progress_timeline: ^0.0.5
How to Use

Import the library

import 'package:progress_timeline/progress_timeline.dart';

Create a ProgressTimeline object in the state of your Activity

class _MyPageState extends State<MyPage> {
  ProgressTimeline progressTimeline;
.
.
.
}

Create a list of all the stages in your entire process and initialize the progressTimeline variable in initState.

@override
  void initState() {
  List<SingleState> allStages = [
    SingleState(stateTitle: "Stage 1"),
    SingleState(stateTitle: "Stage 2"),
    SingleState(stateTitle: "Stage 3"),
    SingleState(stateTitle: "Stage 4"),
  ];
    screenProgress = new ProgressTimeline(
        states: allStages,
    );
    super.initState();
  }

Add progressTimeline to your build method.

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        children: <Widget>[
           //add the widget
           progressTimeline,
        ],
      ),
    );
  }

Features

Goto Next Stage

call the .gotoNextStage() method to move forward to the next stage in the process.

.
  onPressed: () {
    screenProgress.gotoNextStage();
  },
.
Goto Previous Stage

call the .gotoPreviousStage() method to move back to the last stage in the process.

.
  onPressed: () {
    screenProgress.gotoPreviousStage();
  },
.
Fail Current Stage

call the .failCurrentStage() method to mark the current stage as failed.

.
  onPressed: () {
    screenProgress.failCurrentStage();
  },
.

Customization

You can pass your own Icons, Colors and Sizes for the respective parts of the timeline.

Pass Custom Icons for each type of stage

While initializing the ProgressTimeline widget, pass Icon values for these stages: checked, unchecked, failed, current

@override
  void initState() {
    screenProgress = new ProgressTimeline(
      states: allStages,
      //pass custom icons for each stage.
      checkedIcon: Icon(
        Icons.check_box,
        color: Colors.greenAccent,
      ),
      uncheckedIcon: ..,
      currentIcon: ..,
      failedIcon: ..,
      
    );
    super.initState();
  }
Customize Connector properties

While initializing the ProgressTimeline widget, customize the connector properties to suit your need.

@override
  void initState() {
    screenProgress = new ProgressTimeline(
      states: allStages,
      connectorColor: Colors.blueAccent,
      connectorLength: 120.0,
      connectorWidth: 10.0,
    );
    super.initState();
  }
Customize Icon Size

While initializing the ProgressTimeline widget, customize the Icon Size according to your preference.

@override
  void initState() {
    screenProgress = new ProgressTimeline(
      states: allStages,
      iconSize: 20.0,
      //NOTE: when using bigger icon sizes, modify the height parameter accordingly
      //default value is 100
      height: 200,
    );
    super.initState();
  }
Customize Stage Title TextStyle

While initializing the ProgressTimeline widget, customize the TextStyle of how the stage title is displayed

@override
  void initState() {
    screenProgress = new ProgressTimeline(
      states: allStages,
      textStyle: TextStyle(
        fontSize: 24,
        color: Colors.pink
      ),
    );
    super.initState();
  }

List of all customizable params

Params Type default-value
height double 100
checkedIcon Icon Icon ( Icons.check_circle, color: Colors.green, size:25 );
currentIcon Icon Icon ( Icons.adjust, color: Colors.green, size:25 );
failedIcon Icon Icon ( Icons.highlight_off, color: Colors.redAccent, size:25 );
uncheckedIcon Icon Icon ( Icons.radio_button_unchecked, color: Colors.green, size:25 );
connectorColor Color Colors.green
connectorLength double 40
connectorWidth double 5
iconSize double 25
textStyle TextStyle TextStyle()

카테고리

의존성

의존성 목록 1 개

소스 저장소

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

아직 데이터가 없습니다.