fire_storage_impl 0.0.6 copy "fire_storage_impl: ^0.0.6" to clipboard
fire_storage_impl: ^0.0.6 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 image files (File or Uint8List) to Firebase Storage
  • 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

Installation #

Add this to your pubspec.yaml:

dependencies:
  fire_storage_impl: <latest_version>

Then run:

flutter pub get

Usage #

Upload a File (Mobile or Web) #

final fireStorage = FireStorageServiceImpl();

String? downloadUrl = await fireStorage.uploadFile(
  file:file,
  fileName: 'example_image',
  collectionPath: 'user_uploads',
  uploadingToastTxt: 'Uploading...',
);

Delete a File #

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

Upload Uint8List (e.g. Web image picker) #

final imageData = Uint8List.fromList([...]);

final downloadUrl = await imageData.uploadToFirebaseStorage(
  fileName: 'web_image.jpeg',
  collectionPath: 'web_uploads',
);

Requirements #

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

Dependencies #

  • firebase_storage
  • 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
0
points
226
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

License

unknown (license)

Dependencies

app_toast, firebase_storage, flutter, language_translator

More

Packages that depend on fire_storage_impl