Skip to content

Commit 969daef

Browse files
authored
fix crash when allow_cellular is null on iOS (#774)
1 parent 3175512 commit 969daef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/downloader.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ class FlutterDownloader {
162162
filename: item['file_name'] as String?,
163163
savedDir: item['saved_dir'] as String,
164164
timeCreated: item['time_created'] as int,
165-
allowCellular: item['allow_cellular'] as bool,
165+
166+
// allowCellular field is true by default (similar to enqueue())
167+
allowCellular: (item['allow_cellular'] as bool?) ?? true,
166168
);
167169
},
168170
).toList();

0 commit comments

Comments
 (0)