fromName static method
Implementation
static CoinProposal fromName(String name) {
switch (name) {
case "cip1852":
return CipProposal.cip1852;
case "substrate":
return SubstratePropoosal.substrate;
case "monero":
return MoneroProposal.monero;
default:
return BipProposal.values.firstWhere(
(element) => element.name == name,
orElse: () => throw MessageException(
"Unable to locate a proposal with the given name.",
details: {"Name": name}),
);
}
}