SVProgressHUD에서 영감을 받은 깔끔하고 가벼운 프로그레스 HUD로, Flutter 앱에 적합합니다. 사용자 경험을 방해하지 않으면서 로딩 표시기, 성공 메시지 및 오류를 간단하고 우아하게 표시할 수 있습니다. 안드로이드와 iOS용으로 설계되었으며, 최소한의 설정으로 기존의 Flutter 프로젝트에 원활하게 통합됩니다. 패키지는 사용자 정의 가능한 외관과 동작을 제공하면서도 성능과 반응성을 유지합니다.
사용 사례
네트워크 요청 중 로딩 상태 표시
작업 후 성공 또는 오류 메시지 표시
폼 제출 중 사용자 경험 향상
백그라운드 작업 중 피드백 제공
모바일 앱에서 로딩 UI 간소화
주요 기능
경량이고 빠름
크로스 플랫폼 지원 (Android 및 iOS)
사용자 정의 가능한 외관
HUD 표시/숨기기용 간단한 API
다양한 메시지 유형(성공, 오류, 정보)을 지원합니다
Flutter 위젯과의 간편한 통합
적합한 대상
최소한의 로딩 인디케이터를 찾는 개발자
지속적인 진행 상황 피드백이 필요한 앱
유연한 UX 전환을 우선시하는 프로젝트
네이티브 플랫폼에서 SVProgressHUD를 사용하는 팀
빠르게 구현할 수 있는 HUD 컴포넌트가 필요한 플러터 앱
고려 사항
기본 스타일링을 초과한 사용자 정의는 제한적
내장 애니메이션 제어 없음
네이티브 플랫폼 렌더링에 의존
복잡한 UI 흐름을 처리하기 위해 추가적인 조치가 필요할 수 있습니다
고도로 맞춤형 HUD 디자인에 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.
flutter_svprogresshud
A clean and lightweight progress HUD for flutter app, based on SVProgressHUD.
The plugin supports almost all of SVProgressHUD APIs, for Android we have almost replicated SVProgressHUD effects (View code).
SVProgressHUD is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call SVProgressHUD.method()).
Use SVProgressHUD wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.
Using SVProgressHUD in your app will usually look as simple as this:
If you'd like to stack HUDs, you can balance out every show call using:
+ (void)popActivity;
The HUD will get dismissed once the popActivity calls will match the number of show calls.
Or show a confirmation glyph before before getting dismissed a little bit later. The display time depends on minimumDismissTimeInterval and the length of the given string.
SVProgressHUD.showInfo(status: 'Useful Information.');
SVProgressHUD.showSuccess(status: 'Great Success!');
SVProgressHUD.showError(status: 'Failed with Error');
Customization
SVProgressHUD can be customized via the following methods:
voidsetDefaultStyle(SVProgressHUDStyle style); // default is SVProgressHUDStyle.LightvoidsetDefaultMaskType(SVProgressHUDMaskType maskType); // default is SVProgressHUDMaskType.NonevoidsetDefaultAnimationType(SVProgressHUDAnimationType type); // default is SVProgressHUDAnimationType.FlatvoidsetMinimumSize(Size minimumSize); // default is Size.zero, can be used to avoid resizingvoidsetRingThickness(num width); // default is 2 ptvoidsetRingRadiu(num radius); // default is 18 ptvoidsetRingNoTextRadius(num radius); // default is 24 ptvoidsetCornerRadius(num cornerRadius); // default is 14 ptvoidsetBorderColor(Color color); // default is nullvoidsetBorderWidth(num width); // default is 0voidsetForegroundColor(Color color); // default is Colors.black, only used for SVProgressHUDStyle.Custom// void setForegroundImageColor(Color color); // default is the same as foregroundColorvoidsetBackgroundColor(Color color); // default is Colors.white, only used for SVProgressHUDStyle.CustomvoidsetBackgroundLayerColor(Color color); // default is [Color colorWithWhite:0 alpha:0.4], only used for SVProgressHUDMaskType.CustomvoidsetImageViewSize(Size size); // default is 28x28 pt// void setShouldTintImages(bool shouldTintImages); // default is true// void setInfoImage(UIImage image); // default is the bundled info image provided by Freepik// void setSuccessImage(UIImage image); // default is bundled success image from Freepik// void setErrorImage(UIImage image); // default is bundled error image from Freepik// void setGraceTimeInterval(num interval); // default is 0 secondsvoidsetMinimumDismissTimeInterval(num interval); // default is 5.0 seconds// void setMaximumDismissTimeInterval(num interval); // default is CGFLOAT_MAXvoidsetFadeInAnimationDuration(num duration); // default is 0.15 secondsvoidsetFadeOutAnimationDuration(num duration); // default is 0.15 secondsvoidsetHapticsEnabled(bool hapticsEnabled); // default is false