This commit is contained in:
Juan Felipe Duarte
2023-04-09 08:59:13 -05:00
parent 598f2c114b
commit 5d4d9fa779
8 changed files with 172 additions and 47 deletions
-24
View File
@@ -1,24 +0,0 @@
import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_storage/firebase_storage.dart';
// final FirebaseStorage storage = FirebaseStorage.instance;
// Future<bool> uploadImage(File image) async {
// final String namefile = image.path.split('/').last;
// Reference ref = storage.ref().child('profile').child(namefile);
// final UploadTask uploadTask = ref.putFile(image);
// final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true);
// final String url = await snapshot.ref.getDownloadURL();
// if (snapshot.state == TaskState.success) {
// return true;
// } else {
// return false;
// }
// }