SankofaBootstrap class

One-call bootstrap that does everything main would otherwise hand-wire:

  1. Read sankofa.yaml from the asset bundle.
  2. Call Sankofa.instance.init with the parsed apiKey + endpoint.
  3. If Deploy is enabled and a loader was provided, apply any KBC patch staged on disk via Sankofa.instance.deploy.tryApplyStagedKbcPatch.
  4. Schedule notifyKbcPatchReady after the first frame (so the time-window crash detector treats this boot as healthy when rendering succeeds).

Returns a SankofaBootstrapResult the host can inspect to drive custom UI (e.g. show a "Patch applied" banner). Boilerplate-free:

import 'package:dynamic_modules/dynamic_modules.dart';
import 'package:sankofa_flutter/sankofa_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final boot = await Sankofa.bootstrap(
    options: SankofaBootstrapOptions(loader: loadModuleFromBytes),
  );
  runApp(MyApp(bootResult: boot));
}

This is the Option-B path for engine-auto-init: the engine doesn't inject anything before the Dart main isolate, but the SDK collapses all the boilerplate into one Dart call. Phase 2 of engine-auto-init (full pre-isolate apply in the engine) is gated on multi-day engine work and is not required for v1 customers.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

run({SankofaBootstrapOptions options = const SankofaBootstrapOptions()}) Future<SankofaBootstrapResult>
Run the bootstrap. Idempotent — calling twice is harmless (the second call is a no-op because Sankofa.instance is already initialized).