launch static method
Launches the bridge with the given params.
The params object contains the necessary information to construct the launch URI.
The parameters are encrypted using AES256 encryption with a passphrase.
The launch URI is constructed by replacing the query parameters of the params.url with the encrypted parameters.
Throws an exception if the launch fails.
Implementation
static Future launch(BridgeParams params, String passphrase) async {
final rawQuery = params.params.toJson().toString();
final queryParams = Aes256.encrypt(rawQuery, passphrase);
try {
await launchUrl(Uri.parse("${params.url}?meta-data=$queryParams"));
} catch (e) {
throw Exception('Could not launch');
}
}