init static method

Future<Wingify?> init(
  1. WingifyInitOptions options
)

Initializes the Wingify SDK.

Returns a Wingify instance on success, or null if an error occurs.

Implementation

static Future<Wingify?> init(WingifyInitOptions options) async {
  final wingify = Wingify();
  try {
    await wingify.attach(options);
    return wingify;
  } catch (e) {
    logMessage(
        'Wingify: Error: ${e is PlatformException ? (e.message ?? '') : e}');
    return null;
  }
}