You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
On Sun, Oct 18, 2020 at 8:11 AM firatagdas ***@***.***> wrote:
I was working on FirebaseStorage Web support.
class UploadTaskSnapshotWeb extends TaskSnapshotPlatform {
firebase.UploadTaskSnapshot _uploadTaskSnapshot;
UploadTaskSnapshotWeb(this._uploadTaskSnapshot) :
super(convertToPlatformTaskState(_uploadTaskSnapshot.state), <String, dynamic> {
'bytesTransferred': _uploadTaskSnapshot.bytesTransferred,
'metadata': _uploadTaskSnapshot.metadata != null ? FullMetaDataWeb(_uploadTaskSnapshot.metadata, skipDateTime: true) : null,
'totalBytes': _uploadTaskSnapshot.totalBytes
});
@OverRide
ReferencePlatform get ref {
var ref = _uploadTaskSnapshot.ref;
return ReferenceWeb(FirebaseStorageWeb(app: Firebase.app()), ref.fullPath, ref);
}
}
class FullMetaDataWeb extends FullMetadata {
FullMetaDataWeb(firebase.FullMetadata fullMetadata)
: assert(fullMetadata != null), super(<String, dynamic> {
'bucket': fullMetadata.bucket,
'cacheControl': fullMetadata.cacheControl,
'contentDisposition': fullMetadata.contentDisposition,
'contentEncoding': fullMetadata.contentEncoding,
'contentLanguage': fullMetadata.contentLanguage,
'contentType': fullMetadata.contentType,
'customMetadata': fullMetadata.customMetadata,
'fullPath': fullMetadata.fullPath,
'generation': fullMetadata.generation,
'metadataGeneration': fullMetadata.metageneration,
'md5Hash': fullMetadata.md5Hash,
'name': fullMetadata.name,
'size': fullMetadata.size,
'creationTimeMillis': fullMetadata.timeCreated?.millisecond,
'updatedTimeMillis': fullMetadata.updated?.millisecond
}
);
}
This code throws an exception because, accessing FullMetaData.timeCreated
directly calls DateTime.parse without null safety.
https://github.com/FirebaseExtended/firebase-dart/blob/master/firebase/lib/src/storage.dart#L217
I know there is no reason to access timeCreated during State Changes
until it completes... But for the plugin sakes, it is necessary.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#350>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEFCURKJBTRORY44DFR7TSLMATPANCNFSM4SVEROOQ>
.
I was working on FirebaseStorage Web support.
This code throws an exception because, accessing FullMetaData.timeCreated directly calls
DateTime.parse
without null safety. https://github.com/FirebaseExtended/firebase-dart/blob/master/firebase/lib/src/storage.dart#L217I know there is no reason to access
timeCreated
during State Changes until it completes... But for the plugin sakes, it is necessary.The text was updated successfully, but these errors were encountered: