initialize method

  1. @override
Future<bool> initialize()
override

Initialize plugin Must be called before using other methods, preferably before application start

Implementation

@override
Future<bool> initialize() async {
  try {
    final result = await methodChannel.invokeMethod<bool>('initialize');
    return result ?? false;
  } catch (e) {
    debugPrint('Error initializing sing_box: $e');
    return false;
  }
}