Skip to content

Commit 95b5f53

Browse files
authored
fix: progress is NaN when both bytesTransferred & totalBytes are 0 (#491)
1 parent 55f04eb commit 95b5f53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/firebase_ui_storage/lib/src/widgets/progress_indicator.dart

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class _BindTaskWidget extends StatelessWidget {
4747
} else {
4848
final taskSnapshot = snapshot.requireData;
4949
progress = taskSnapshot.bytesTransferred / taskSnapshot.totalBytes;
50+
if (progress.isNaN) progress = 0;
5051
}
5152

5253
return builder(context, progress);

0 commit comments

Comments
 (0)