Flutter web file image picker and upload Firebase storage In this post i am showing full coding of flutter web image picker to upload data in storage fully working code . import 'dart:html' ; selectImageFile(context) async { try { InputElement input = FileUploadInputElement()..accept = 'image/*'; input.click(); setState(() { isLoading = true; }); input.onChange.listen((event) async { var file = input.files.first; var reader = FileReader(); reader.readAsDataUrl(file); reader.onLoadEnd.listen((event1) async { print('loading end'); var ref = storage.ref('complaints').child(basename(file.name)); firebase_storage.SettableMetadata metadata = firebase_storage.SettableMetadata( customMetadata: <String, String>{"uid": user.uid}, ); firebase_storage.UploadTask uploadTask = ref.putBlob(file, metadata); uploadTask.asStream().listen((event) { setState(() { isLoading = true; progress = event.bytesTransferred.toDouble() / e
Gadgets Teach - Provide Tech News, Latest technology news daily, new best tech gadgets reviews which include mobiles, tablets, laptops, video games. Being a tech news site we cover the latest tech news daily online from India and around the world, reviews, updates on technology today from companies like google, apple, samsung and others also new and upcoming mobiles, cameras, laptops, video games - gadgetsteach.com