Skip to content

Commit e1eb8ae

Browse files
committed
progress shouldn't be required
1 parent c7df276 commit e1eb8ae

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

flutter_cache_manager/example/lib/plugin_example/progress_indicator.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ProgressIndicator extends StatelessWidget {
88

99
const ProgressIndicator({
1010
Key? key,
11-
required this.progress,
11+
this.progress,
1212
}) : super(key: key);
1313

1414
@override
@@ -21,7 +21,9 @@ class ProgressIndicator extends StatelessWidget {
2121
width: 50.0,
2222
height: 50.0,
2323
child: CircularProgressIndicator(
24-
value: progress.progress,
24+
value: progress != null && progress?.progress != null
25+
? progress?.progress
26+
: null,
2527
),
2628
),
2729
const SizedBox(width: 20),

flutter_cache_manager/lib/src/cache_manager.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:async';
2+
import 'dart:typed_data';
23

34
import 'package:file/file.dart';
45
import 'package:flutter/foundation.dart' show visibleForTesting;

0 commit comments

Comments
 (0)