Turbo Shark is a Flutter-based multithreaded download manager designed to efficiently download files by breaking them into segments and downloading them concurrently. This approach significantly speeds up the download process, especially for large files.
- Multithreaded Downloading: Utilizes Dart isolates to download file segments concurrently, improving download speed.
- Progress Tracking: Provides real-time progress updates for each download.
- Download States: Tracks the state of each download (e.g., in progress, done, failed).
- Customizable Segment Count: Allows you to specify the number of segments to use for downloading.
- User-Friendly UI: Simple and intuitive user interface using custom drawer for navigation.
- Theme Support: Supports dark and light themes.
The core download functionality is encapsulated within the ConcurrentFileDownloader
class. This class is responsible for:
- Segmenting Files: Dividing large files into smaller segments for concurrent download.
- Concurrent Downloads: Utilizing Dart isolates to download these segments simultaneously, improving speed.
- Progress Updates: Sending real-time progress information back to the main thread to update the UI.
- State Management: Tracking the state of each download (in progress, complete, failed) and updating the user interface accordingly.
The following pub.dev packages are used in this project:
provider
: For state management.google_fonts
: For custom fonts in the UI.
You can add these dependencies to your pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
provider: ^6.1.1
google_fonts: ^6.1.0
- Clone the repository:
git clone https://github.com/ThatLinuxGuyYouKnow/turbo-shark
- Navigate to the project directory:
cd turbo_shark
- Install dependencies:
flutter pub get
- Run the app:
flutter run
- Error Handling: The current error handling is basic. More robust error handling and retry mechanisms can be implemented.
- Resuming Downloads: The current implementation doesn't support resuming interrupted downloads.
- UI Polishing: The UI could be improved with better feedback on loading states and error conditions.
- Platform Specifics: Further platform-specific optimizations might be needed for optimal performance.
- Testing: Further testing would help to find bugs.
Contributions are always welcome! If you have any ideas for improvements or find any bugs, feel free to submit a pull request.