initialize method

  1. @override
Future<void> initialize(
  1. String publicKey
)
override

Initialize the Paystack SDK with public key

Implementation

@override
Future<void> initialize(String publicKey) async {
  try {
    await methodChannel.invokeMethod('initialize', {'publicKey': publicKey});
  } on PlatformException catch (e) {
    throw PaystackError(
      message: e.message ?? 'Failed to initialize Paystack',
      code: e.code,
    );
  }
}