unzipx 0.0.2
unzipx: ^0.0.2 copied to clipboard
UnZipX is a lightweight Flutter package that extracts ZIP files from the assets folder and saves them to the app's support directory. It simplifies asset extraction with a single
import 'package:flutter/material.dart';
import 'package:unzipx/unzipx.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
try {
String extractedPath = await UnZipX.init('assets/sample.zip');
print("Files extracted to: $extractedPath");
} catch (e) {
print("Extraction failed: $e");
}
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('UnZipX Example')),
body: Center(child: Text('UnZipX Initialized')),
),
);
}
}