initialize method

Future<void> initialize({
  1. String notificationIconResourceType = 'mipmap',
  2. String notificationIconResourceName = 'ic_launcher',
  3. String providerBundleIdentifier = '',
  4. String groupIdentifier = '',
})

Initializes the V2Ray client with notification settings and a status change callback. notificationIconResourceType specifies the type of the notification icon (e.g., 'mipmap'). notificationIconResourceName specifies the name of the notification icon (e.g., 'ic_launcher'). Returns a Future that completes when initialization is done.

Implementation

Future<void> initialize({
  String notificationIconResourceType = 'mipmap',
  String notificationIconResourceName = 'ic_launcher',
  String providerBundleIdentifier = '',
  String groupIdentifier = '',
}) async {
  await FlutterV2rayPlatform.instance.initializeV2Ray(
    onStatusChanged: onStatusChanged,
    notificationIconResourceType: notificationIconResourceType,
    notificationIconResourceName: notificationIconResourceName,
    providerBundleIdentifier: providerBundleIdentifier,
    groupIdentifier: groupIdentifier,
  );
}