fire_storage_impl 0.1.1 copy "fire_storage_impl: ^0.1.1" to clipboard
fire_storage_impl: ^0.1.1 copied to clipboard

A lightweight Firebase Storage implementation for Flutter apps with support for file upload, deletion, toast notifications, and localization.

fire_storage_impl #

A lightweight Dart/Flutter package for simplified Firebase Storage file uploading and deletion, supporting both mobile and web platforms. It includes toast notifications and localized error messages via a translator service.

Features #

  • Upload files with XFile (cross‑platform)
  • Delete uploaded files from Firebase Storage
  • Toast message integration using app_toast
  • Context-free localization support via .translateWithoutContext()
  • Automatic file name generation when not provided
  • Upload progress tracking via onProgress callback
  • Safe storage path building with StoragePathExtensions

Installation #

Add this to your pubspec.yaml:

dependencies:
  fire_storage_impl: <latest_version>

Then run:

flutter pub get

Usage #

Upload a File with XFile #

final fireStorage = FireStorageServiceImpl();

final file = XFile('/path/to/image.jpg');

final url = await fireStorage.uploadFile(
  file: file,
  category: 'images',
  collectionPath: 'user_uploads',
  onProgress: (progress) {
    print('Upload progress: $progress');
  },
);

Delete a File #

final success = await fireStorage.deleteFile(
  imgUrl: url!,
  successTxt: 'Deleted successfully!',
);

Build Safe Storage Path #

final fullPath = StoragePathExtensions.buildStoragePath(
  category: 'images',
  collectionPath: 'profile_pics',
  fullName: 'avatar.png',
);

Requirements #

  • Firebase Core & Firebase Storage setup
  • Add app_toast and translator dependencies
  • Internet permission (mobile)

Dependencies #

  • firebase_storage
  • cross_file
  • app_toast
  • translator (custom)

License #

This README.md provides installation instructions, basic usage examples, error handling, and additional features. Make sure to replace the version placeholder with the actual version number when you publish it on pub.flutter-io.cn.


Developed and Maintained with ❤️ by Shohidul Islam / GenieCoder. Contributions welcome!

0
likes
150
points
385
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Firebase Storage implementation for Flutter apps with support for file upload, deletion, toast notifications, and localization.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

app_toast, cross_file, firebase_storage, flutter, language_translator, mime

More

Packages that depend on fire_storage_impl