init static method

Future<void> init(
  1. String serverUrl,
  2. String? userId
)

Initializes Paygilant service. This function must be invoked before any other Paygilant function

  • param serverUrl - url address of Paygilant server
  • param userId - userId or username (can be omitted if unknown)

Implementation

static Future<void> init(String serverUrl, String? userId) async {
  try {
    await _channel.invokeMethod('init', <String, dynamic>{
      'serverUrl': serverUrl,
      'userId': userId,
    });
  }  catch (e) {
    throw(e.toString());
  }
}