fromInt static method

TransactionType fromInt(
  1. int value
)

Implementation

static TransactionType fromInt(int value) {
  return switch (value) {
    0 => TransactionType.Legacy,
    1 => TransactionType.Type1,
    2 => TransactionType.Type2,
    _ => throw Exception('Invalid TransactionType value: $value'),
  };
}