andro_apps_init 2.2.7
andro_apps_init: ^2.2.7 copied to clipboard
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.7
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,
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. |
child |
Widget |
The widget that the container ultimately renders. |
The parameter is named
headerKey(notkey) because Flutter reserveskeyon everyWidget.
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.