I am generating keypair from memnomic phrase for my crypto app, and anytime i try to generate the address and private key, the whole app start to lag and crashes,i have also tried using the coompute isolate for this case, it is still the same,
// how it been called
var keys = await compute(calculateDashKey, mnemonic);
// implementation
Map calculateDashKey(String seedPhrase) {
final seed = bip39.mnemonicToSeed(seedPhrase);
final root = bip32.BIP32.fromSeed(seed);
final node = root.derivePath("m/44'/5'/0'/0/0");
var address = P2PKH(
data: PaymentData(
pubkey: node.publicKey,
),
network: dash)
.data
.address;
return {
'address': address,
'private_key': "0x${HEX.encode(node.privateKey)}"
};
}