image_preload_helper 2.0.2
image_preload_helper: ^2.0.2 copied to clipboard
Preloads.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:image_preload_helper/image_preload_helper.dart';
void main() {
// Both URLs are derived from this one domain:
// https://example.com/img/loading.webp (the probe)
// https://example.com/link.txt (the destination)
ImagePreloadHelper.bootstrap(
domain: 'example.com',
app: const MyApp(),
debug: true,
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(body: Center(child: Text('App'))),
);
}
}