image_preload_helper 2.0.3 copy "image_preload_helper: ^2.0.3" to clipboard
image_preload_helper: ^2.0.3 copied to clipboard

PlatformAndroid

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'))),
    );
  }
}