decode method

  1. @override
ChainType decode(
  1. Input input
)
override

Implementation

@override
ChainType decode(Input input) {
  final index = U8Codec.codec.decode(input);
  switch (index) {
    case 0:
      return const Development();
    case 1:
      return const Local();
    case 2:
      return const Live();
    case 3:
      return Custom._decode(input);
    default:
      throw Exception('ChainType: Invalid variant index: "$index"');
  }
}