fromString static method

HDWalletPurpose fromString(
  1. String purpose
)

Implementation

static HDWalletPurpose fromString(String purpose) {
  switch (purpose) {
    case "m/0'":
      return NO_STRUCTURE;
    case "m/44'":
      return BIP44;
    case "m/49'":
      return BIP49;
    case "m/84'":
      return BIP84;
    default:
      throw ArgumentError("Invalid purpose: $purpose");
  }
}