Skip to content
pubscout

internet_file

1.3.0, released a year ago by serge.software

Download internet files and optionally cache them locally across all platforms.

WASM-ready
$ flutter pub add internet_file
Source repository

What it does

InternetFile provides a simple API to fetch files from the web and return them as Uint8List. It can also store the file locally using a pluggable storage implementation, supporting progress callbacks and custom headers.

AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Fetching assets like fonts, PDFs or images that need to be cached locally
  • Integrating with plugins that require direct file access on any platform
  • Implementing custom storage logic for web or offline support

Skip it when

  • You only need a single HTTP request without caching or progress tracking
  • You prefer a full-featured HTTP client like Dio for complex request handling

Strengths

  • Cross-platform support (web, mobile, desktop, server)
  • Optional local storage with pluggable implementation
  • Progress callback with received and total bytes
  • Simple API, no code generation required

Weaknesses

  • No advanced caching policies (e.g., TTL, eviction)
  • Relies on http and universal_file, so adding it increases dependencies
  • Limited to file download, not general HTTP requests

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:internet_file/internet_file.dart';

final Uint8List bytes = await InternetFile.get(
  'https://example.com/file.ttf',
  progress: (received, total) {
    print('downloaded $received of $total bytes');
  },
);

Alternatives

Packages that do the same job and could replace internet_file.