fix: out of memory error when uploading large assets on slow internet (#224)

This commit is contained in:
Zack Pollard
2022-06-18 13:36:58 +01:00
committed by GitHub
parent 360c1d9a15
commit e6efc61b3b
6 changed files with 97 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
import 'package:dio/dio.dart';
import 'package:cancellation_token_http/http.dart';
import 'package:equatable/equatable.dart';
import 'package:photo_manager/photo_manager.dart';
@@ -12,7 +12,7 @@ class BackUpState extends Equatable {
final BackUpProgressEnum backupProgress;
final List<String> allAssetOnDatabase;
final double progressInPercentage;
final CancelToken cancelToken;
final CancellationToken cancelToken;
final ServerInfo serverInfo;
/// All available albums on the device
@@ -43,7 +43,7 @@ class BackUpState extends Equatable {
BackUpProgressEnum? backupProgress,
List<String>? allAssetOnDatabase,
double? progressInPercentage,
CancelToken? cancelToken,
CancellationToken? cancelToken,
ServerInfo? serverInfo,
List<AvailableAlbum>? availableAlbums,
Set<AssetPathEntity>? selectedBackupAlbums,