initialize static method

Future<void> initialize(
  1. DigiaConfig config
)

Initializes the Digia SDK with the provided configuration.

Call this once at application startup — typically in main() before runApp() — and await the result before any other Digia call.

Internally this starts the real src services: SharedPreferences, NetworkClient, DSL config loading (remote or local asset depending on the DigiaConfig.flavor), and wires DigiaUIManager.

The SDK enters degraded mode if register is not subsequently called: all calls are accepted and logged, but no experiences are displayed.

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Digia.initialize(DigiaConfig(apiKey: 'prod_xxxx'));
  runApp(const MyApp());
}

Implementation

static Future<void> initialize(DigiaConfig config) {
  return DigiaInstance.instance.initialize(config);
}