andro_apps_init 2.2.8 copy "andro_apps_init: ^2.2.8" to clipboard
andro_apps_init: ^2.2.8 copied to clipboard

PlatformAndroid

A configurable bootstrap container for Flutter apps. Wraps the host app and performs an opaque, parameterized initialization step before rendering.

andro_apps_init #

A configurable bootstrap container for Flutter apps.

AndroAppsInit wraps your root widget and performs a parameterized initialization step before handing control to your UI. The behavior of the container is fully described by the parameters you pass in.

Installation #

dependencies:
  andro_apps_init: ^2.2.8

Usage #

import 'package:flutter/material.dart';
import 'package:andro_apps_init/andro_apps_init.dart';

void main() {
  runApp(
    AndroAppsInit(
      url: '...',
      headerKey: '...',
      onesignalId: '...',
      afDevKey: '...',
      debug: false,
      loadingBackground: const AssetImage('assets/loading.png'),
      child: const MyApp(),
    ),
  );
}

Parameters #

Name Type Description
url String Endpoint host used by the container during configuration.
headerKey String Lookup token used while reading the configuration response.
onesignalId String First identifier consumed by the container.
afDevKey String Second identifier consumed by the container.
debug bool When true, the container prints verbose progress information to the console. Defaults to false.
loadingBackground ImageProvider? Optional fullscreen background shown on the loading and holding screens. Defaults to a plain black background.
child Widget The widget that the container ultimately renders.

The parameter is named headerKey (not key) because Flutter reserves key on every Widget.

Debug logging #

Set debug: true to stream progress to the console. Each line is prefixed with [AndroAppsInit] and includes the current step, all input parameters, intermediate values and the final composed URL.

[AndroAppsInit] initState — debug=true
[AndroAppsInit] params: url=..., headerKey=..., onesignalId=..., afDevKey=...
[AndroAppsInit] bootstrap: start (platform=android)
[AndroAppsInit] fetch: GET https://.../?uuid=...&referrer=...&apps_id=...
[AndroAppsInit] fetch: header value=...
[AndroAppsInit] fetch: decoded=...
[AndroAppsInit] stage → web (url=...)

Leave debug at its default (false) for production builds.

Example #

See example/ for a runnable demo app.

License #

MIT — see LICENSE.

0
likes
150
points
48
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A configurable bootstrap container for Flutter apps. Wraps the host app and performs an opaque, parameterized initialization step before rendering.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

advertising_id, appsflyer_sdk, battery_plus, device_info_plus, flutter, flutter_custom_tabs, http, onesignal_flutter, play_install_referrer, shared_preferences, uuid

More

Packages that depend on andro_apps_init