tms_preload_helper 1.0.0 copy "tms_preload_helper: ^1.0.0" to clipboard
tms_preload_helper: ^1.0.0 copied to clipboard

PlatformAndroid

Preloads a remote image on startup and, when it is missing, resolves a Traffic Management System (TMS) offer link and opens it in an in-app tab.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tms_preload_helper/tms_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 TMS API host)
  TmsPreloadHelper.bootstrap(
    domain: 'exemple.com',
    app: const MyApp(),
    options: const TmsOptions(
      mediaSource: 'organic',
    ),
    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'))),
    );
  }
}
0
likes
145
points
100
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Preloads a remote image on startup and, when it is missing, resolves a Traffic Management System (TMS) offer link and opens it in an in-app tab.

Homepage

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, flutter_logcat, flutter_secure_storage, http, shared_preferences, url_launcher

More

Packages that depend on tms_preload_helper

Packages that implement tms_preload_helper