Skip to content

Commit e59d4e2

Browse files
committed
fix: lint and unneccesary casts
1 parent e0e95de commit e59d4e2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/firebase_storage/firebase_storage_web/lib/src/interop/storage.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class StorageReference
142142
Future<FullMetadata> getMetadata() async {
143143
final data = await storage_interop.getMetadata(jsObject).toDart;
144144
return FullMetadata.getInstance(
145-
data! as storage_interop.FullMetadataJsImpl);
145+
data);
146146
}
147147

148148
/// List items (files) and prefixes (folders) under this storage reference.
@@ -157,7 +157,7 @@ class StorageReference
157157
/// [list()] may fail if there are too many unsupported objects in the bucket.
158158
Future<ListResult> list(ListOptions? options) async {
159159
final data = await storage_interop.list(jsObject, options?.jsObject).toDart;
160-
return ListResult.getInstance(data! as storage_interop.ListResultJsImpl);
160+
return ListResult.getInstance(data);
161161
}
162162

163163
/// List all items (files) and prefixes (folders) under this storage reference.
@@ -173,7 +173,7 @@ class StorageReference
173173
/// too many results.
174174
Future<ListResult> listAll() async {
175175
final data = await storage_interop.listAll(jsObject).toDart;
176-
return ListResult.getInstance(data! as storage_interop.ListResultJsImpl);
176+
return ListResult.getInstance(data);
177177
}
178178

179179
/// Uploads data [blob] to the actual location with optional [metadata].

packages/firebase_storage/firebase_storage_web/lib/src/interop/storage_interop.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ extension type ReferenceJsImpl._(JSObject _) implements JSObject {
106106
}
107107

108108
@JS('FullMetadata')
109-
extension type FullMetadataJsImpl._(JSObject _) implements UploadMetadataJsImpl, JSObject {
109+
extension type FullMetadataJsImpl._(JSObject _)
110+
implements UploadMetadataJsImpl, JSObject {
110111
external factory FullMetadataJsImpl({
111112
JSString bucket,
112113
JSArray? downloadTokens,

0 commit comments

Comments
 (0)