Octo Image는 플레이스홀더, 오류 처리 및 부드러운 페이드 전환과 같은 고급 기능을 갖춘 이미지 로딩을 위한 유연한 Flutter 위젯입니다. 이미지 변환을 지원하며, 여러 플랫폼에서 이미지를 표시하기 위한 깔끔하고 사용자 정의 가능한 인터페이스를 제공합니다. 성능과 개발자 편의성을 위해 설계되었으며, Flutter 앱에서 일반적인 이미지 표시 문제를 간소화합니다. 기존 이미지 로딩 워크플로우와 원활하게 통합되어 로딩 상태 시 시각적 피드백을 통해 사용자 경험을 향상시킵니다.
사용 사례
백업 옵션과 함께 네트워크 이미지 표시
로딩 플레이스홀더 구현
이미지 로드 오류를 우아하게 처리하기
이미지 필터 또는 변환 적용
부드러운 페이드인 효과 만들기
사전로딩을 통한 UI 반응성 향상
주요 기능
플레이스홀더와 오류 위젯을 지원합니다
내장된 이미지 변환 기능
부드러운 페이드 전환
크로스 플랫폼 호환성
사용자 정의 가능한 로딩 및 오류 상태
효율적인 캐싱 및 메모리 관리
적합한 대상
강력한 이미지 로딩을 필요로 하는 앱
향상된 이미지 UX를 원하는 개발자
동적 또는 원격 이미지 소스를 가진 프로젝트
자주 이미지가 업데이트되는 UI 중심 애플리케이션
다양한 플랫폼 간 일관된 이미지 동작을 우선시하는 팀
고려 사항
고급 변환을 위해 추가 설정이 필요합니다
패키지 크기가 약간 증가할 수 있습니다
이미지 전용 사용 사례에 한정
기본 이미지 로딩 라이브러리에 따라 다릅니다
간단한 정적 이미지 표시에 적합하지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
OctoImage
An image library for showing placeholders, error widgets and transform your image.
The CircleAvatar set shows a colored circle with the text inside during loading and when the image failed loading. When the image loads it animates to the image clipped as a circle.
ImageProviders
The recommended one is CachedNetworkImageProvider, as that supports the progress indicator, error and caching.
It also works on Android, iOS, web and macOS, although without caching on the web. Make sure you use at least version 2.2.0.
The second best is NetworkImage, but any ImageProvider works in theory. However, for some ImageProviders (such as MemoryImage)
it doesn't make sense to use OctoImage.
Placeholders and progress indicators
It would be best if you used either a placeholder or a progress indicator, but not both.
Placeholders are only building once the image starts loading, but progress indicators are rebuilt every time new progress information is received.
So if you don't use that progress indication, for example, with a static image, you should use a placeholder.
The most simple progress indicators use a CircularProgressIndicator.
Shows a circularProgressIndicator with indeterminate progress.
frame
Shows the Flutter Placeholder
OctoProgressIndicator
Explanation
circularProgressIndicator
Shows a simple CircularProgressIndicator
Error widgets
Error widgets are shown when the ImageProvider throws an error because the image failed loading. You can build a custom widget, or use the prebuild widgets:
Image builders can be used to adapt the image before it is shown. For example the circleAvatar clips the image in a circle, but you could also add an overlay or anything else.
The builder function supplies a context and a child. The child is the image widget that is rendered.
You get the most out of OctoImage when you use OctoSets. These sets contain a combination of a placeholder or progress indicator,
an image builder and/or an error widget builder. It always contains at least a placeholder or progress indicator and an error widget.
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
PR's with any new prebuild widgets or sets are highly appreciated.
Support
Feel free to open an issue. Make sure to use one of the templates!
Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: [hello@baseflow.com](mailto:hello@baseflow.com)