Dart로만 완전히 구현된 다양한 로딩 애니메이션을 제공하는 가벼운 Flutter 패키지입니다. 외부 종속성 없이 부드럽고 사용자 정의 가능한 로딩 표시기를 제공합니다. Android, iOS, 웹, macOS, Windows, Linux를 지원하며, 여러 플랫폼에서 앱의 로딩 상태를 표시하는 데 이상적입니다. 통합 및 사용이 간편하여 비동기 작업 중 사용자 경험을 향상시키기에 적합합니다.
사용 사례
양식에서 로딩 상태 표시
데이터 가져오기 중 진행 상황 표시
페이지 전환 중 UI 개선
백그라운드 작업에서 시각적 피드백 제공
사용자 정의 로딩 화면 만들기
주요 기능
순수한 Dart 구현
추가 종속성 없음
크로스 플랫폼 지원
여러 가지 애니메이션 스타일
사용자 정의하기 쉬움
경량 크기
적합한 대상
간단한 로딩 UI
다중 플랫폼을 대상으로 하는 앱
외부 라이브러리를 피하는 개발자
모바일 및 웹 앱의 사용자 인터페이스 개선
기존 프로젝트에 빠르게 통합
고려 사항
기본 로딩 애니메이션만 가능
색상과 크기 외에 고급 사용자 정의 옵션이 없습니다
저사양 기기에서는 애니메이션이 성능이 떨어질 수 있습니다
복잡한 로딩 로직에 적합하지 않습니다
내장된 오류 또는 성공 상태 부족
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
LoadingIndicator
A collection of out of the box loading animations written in pure dart, no extra dependency, inspired by loaders.css and NVActivityIndicatorView.
Demo
Now, you can click this site to preview.3D effect will be invalid in web.
Use the release helper from the latest master checkout to calculate the next
version from the existing stable tags and update the root pubspec.yaml and
CHANGELOG.md:
patch, minor, and major are supported, as well as an explicit version
such as 4.0.2. The helper refreshes tags from origin and ignores local tags
that no longer exist remotely. It accepts a release tag that is either in the
current history or fully represented by cherry-picked commits, and refuses to
continue when the latest tag cannot be matched to the current history. For an
automatic patch, it asks GitHub for notes before changing files and copies the
returned Markdown into the dated changelog entry. A real patch
run (not --dry-run) requires a clean master matching origin/master,
updates only the root pubspec.yaml and CHANGELOG.md, commits them, pushes
master, creates and pushes the next version tag, and invokes gh release create with
the generated notes. It does not modify
example/pubspec.yaml. gh must be installed and authenticated. The existing
tag-triggered workflow safely skips release creation when the script has
already created it. minor, major, and explicit versions update the local
root pubspec.yaml and CHANGELOG.md with a placeholder, then print the
release-notes command.
Usage
Simple but powerful parameters
LoadingIndicator(
indicatorType: Indicator.ballPulse, // Required: animation type
colors: const [Colors.white], // Optional: color collection
strokeWidth: 2, // Optional: stroke and line width
backgroundColor: Colors.black, // Optional: widget background
pathBackgroundColor: Colors.black, // Optional: stroke background
)
strokeWidth controls the bar width of lineScale, lineScaleParty,
lineScalePulseOut, lineScalePulseOutRapid, and lineSpinFadeLoader.
When omitted, these indicators keep their original size-derived bar width.
Without a controller, every indicator plays continuously. To control playback,
create and dispose a LoadingIndicatorController with your widget:
_controller.pause(); // Freeze the current frame immediately.await _controller.pauseAt(0.5); // Pause the next time progress reaches 50%.await _controller.pauseAt(
1.0,
behavior: LoadingIndicatorPauseBehavior.jumpToTarget,
); // Advance the complete animation group to the target and pause now.
_controller.resume();
progress is the normalized position (0.0 to 1.0) of an indicator's
reference animation track: 0.0 is the start of a loop and 1.0 is its final
frame before reset. pauseAt completes only after the indicator has paused.
Replacing a pending command or disposing the controller completes that Future
with LoadingIndicatorCommandCanceled. One controller can be attached to only
one LoadingIndicator at a time; the last command sent while detached is
applied on the next attachment.
Migrating from 3.x
Version 4.0 removes the pause widget parameter. Replace it with a controller:
Copyright 2019 Tino Guo.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.