A powerful, flexible, and platform-aware Flutter image handling package that supports displaying avatars, full-screen image viewing, file/network/asset loading, and gallery saving with minimal setup.
- ✔ Load images from
XFile
, network URLs, or asset paths - ✔ Auto-detect platform and image source
- ✔ Full-screen image viewer with zoom, rotation, and hero animation
- ✔ Circular or rectangular avatar widgets
- ✔ Avatar with online indicator and edit support
- ✔ Customizable placeholder and error widgets
- ✔ Platform-aware image downloading (web, mobile, desktop)
- ✔ Lightweight and easily composable
Add this to your pubspec.yaml
:
dependencies:
reusable_image_widget: ^latest_version
Internally detects platform and source:
XFile
(picked files)- Network URL
- Asset path (starts with
assets/
)
Uses:
FileImage
/Image.file
NetworkImage
/CachedNetworkImage
AssetImage
MemoryImage
(for web)
AppImageViewer(
imageSource: 'assets/images/profile_pic.jpeg',
)
AppImageViewer(
pickedFile: pickedFile, // XFile
)
EditProfileImageViewer(
pickedFile: pickedFile,
imageSource: pickedFile?.path,
radius: 60,
showEditIcon: true,
onTapEdit: () => pickImage(),
)
AvatarWithOnlineIndicator(
imageSource: 'https://example.com/image.jpg',
isOnline: true,
border: true,
shadow: true,
imgRadius: 50,
)
AppAvatar(
isCircle: true,
imageSource: 'https://example.com/image.jpg',
radius: 48,
)
AppAvatar
— root avatar builder (circle or rectangle)AppCircleAvatar
AppRectangleAvatar
EditProfileImageViewer
— avatar with edit icon & full-screen supportAvatarWithOnlineIndicator
— avatar with status badge
final result = await downloadImage(
pickedFile: pickedFile,
imageSource: 'https://example.com/image.jpg',
);
Web download is handled using AnchorElement
and Uint8List blob
download.
Each widget accepts:
placeholder
errorWidget
scale
,fit
,backgroundColor
, etc.
AvatarStyleConstants.defaultRadius
AvatarStyleConstants.avatarPadding
'image.jpg'.isAssetPath // true if starts with 'assets/'
HeroWrapper(
tag: 'profile_pic',
child: AppImageViewer(...),
)
dependency_overrides:
cached_network_image: <latest_version>
photo_view: <latest_version>
image_gallery_saver_plus: <latest_version>
permission_handler: <latest_version>
AvatarTitleGridCard(
title: 'Your Logo',
imageSource: 'assets/icons/logo.jpg',
isCircleAvatar: true,
)
🔊 Note: Previously named
ImageWithTitle
, now moved toreusable_list_item
package.
MIT © 2025 reusable_image_widget authors
Pull requests and issues are welcome!
reusable_image_widget Developed with ❤️ by Shohidul Islam Contributions, issues, and pull requests are welcome!