isValidInput method

  1. @override
bool isValidInput(
  1. String input
)
override

Optional method to validate if input can be processed by this codec.

input The string to validate. Returns true if the input is valid for this codec, false otherwise.

Implementation

@override
bool isValidInput(String input) {
  if (input.isEmpty) return false;

  // For a pipeline, we can only validate against the last codec
  // since that's what the input should match for decoding
  return codecs.isNotEmpty && codecs.last.isValidInput(input);
}