mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-11-03 23:03:29 +01:00 
			
		
		
		
	change archive library
This commit is contained in:
		@@ -27,7 +27,7 @@ import 'package:flutter_fgbg/flutter_fgbg.dart';
 | 
				
			|||||||
import 'package:obtainium/providers/source_provider.dart';
 | 
					import 'package:obtainium/providers/source_provider.dart';
 | 
				
			||||||
import 'package:http/http.dart';
 | 
					import 'package:http/http.dart';
 | 
				
			||||||
import 'package:android_intent_plus/android_intent.dart';
 | 
					import 'package:android_intent_plus/android_intent.dart';
 | 
				
			||||||
import 'package:archive/archive_io.dart';
 | 
					import 'package:flutter_archive/flutter_archive.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AppInMemory {
 | 
					class AppInMemory {
 | 
				
			||||||
  late App app;
 | 
					  late App app;
 | 
				
			||||||
@@ -264,7 +264,7 @@ class AppsProvider with ChangeNotifier {
 | 
				
			|||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        // Assume XAPK
 | 
					        // Assume XAPK
 | 
				
			||||||
        String xapkDirPath = '${downloadedFile.path}-dir';
 | 
					        String xapkDirPath = '${downloadedFile.path}-dir';
 | 
				
			||||||
        unzipFile(downloadedFile.path, '${downloadedFile.path}-dir');
 | 
					        await unzipFile(downloadedFile.path, '${downloadedFile.path}-dir');
 | 
				
			||||||
        xapkDir = Directory(xapkDirPath);
 | 
					        xapkDir = Directory(xapkDirPath);
 | 
				
			||||||
        var apks = xapkDir
 | 
					        var apks = xapkDir
 | 
				
			||||||
            .listSync()
 | 
					            .listSync()
 | 
				
			||||||
@@ -334,10 +334,8 @@ class AppsProvider with ChangeNotifier {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void unzipFile(String filePath, String destinationPath) {
 | 
					  Future<void> unzipFile(String filePath, String destinationPath) async {
 | 
				
			||||||
    final inputStream = InputFileStream(filePath);
 | 
					    await ZipFile.extractToDirectory(zipFile: File(filePath), destinationDir: Directory(destinationPath));
 | 
				
			||||||
    final archive = ZipDecoder().decodeBuffer(inputStream);
 | 
					 | 
				
			||||||
    extractArchiveToDisk(archive, destinationPath);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Future<void> installXApkDir(DownloadedXApkDir dir,
 | 
					  Future<void> installXApkDir(DownloadedXApkDir dir,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										10
									
								
								pubspec.lock
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								pubspec.lock
									
									
									
									
									
								
							@@ -35,7 +35,7 @@ packages:
 | 
				
			|||||||
    source: hosted
 | 
					    source: hosted
 | 
				
			||||||
    version: "2.0.7"
 | 
					    version: "2.0.7"
 | 
				
			||||||
  archive:
 | 
					  archive:
 | 
				
			||||||
    dependency: "direct main"
 | 
					    dependency: transitive
 | 
				
			||||||
    description:
 | 
					    description:
 | 
				
			||||||
      name: archive
 | 
					      name: archive
 | 
				
			||||||
      sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"
 | 
					      sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"
 | 
				
			||||||
@@ -231,6 +231,14 @@ packages:
 | 
				
			|||||||
    description: flutter
 | 
					    description: flutter
 | 
				
			||||||
    source: sdk
 | 
					    source: sdk
 | 
				
			||||||
    version: "0.0.0"
 | 
					    version: "0.0.0"
 | 
				
			||||||
 | 
					  flutter_archive:
 | 
				
			||||||
 | 
					    dependency: "direct main"
 | 
				
			||||||
 | 
					    description:
 | 
				
			||||||
 | 
					      name: flutter_archive
 | 
				
			||||||
 | 
					      sha256: aec85d1da65e5b33a529db00a86df0b8e92bda78088a7cfaeeba5187701d0d85
 | 
				
			||||||
 | 
					      url: "https://pub.dev"
 | 
				
			||||||
 | 
					    source: hosted
 | 
				
			||||||
 | 
					    version: "5.0.0"
 | 
				
			||||||
  flutter_fgbg:
 | 
					  flutter_fgbg:
 | 
				
			||||||
    dependency: "direct main"
 | 
					    dependency: "direct main"
 | 
				
			||||||
    description:
 | 
					    description:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,7 +63,7 @@ dependencies:
 | 
				
			|||||||
  easy_localization: ^3.0.1
 | 
					  easy_localization: ^3.0.1
 | 
				
			||||||
  android_intent_plus: ^4.0.0
 | 
					  android_intent_plus: ^4.0.0
 | 
				
			||||||
  flutter_markdown: ^0.6.14
 | 
					  flutter_markdown: ^0.6.14
 | 
				
			||||||
  archive: ^3.3.7
 | 
					  flutter_archive: ^5.0.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dev_dependencies:
 | 
					dev_dependencies:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user