shouldGenerate method

  1. @override
IOSink? shouldGenerate(
  1. PigeonOptions options,
  2. FileType _
)
override

Returns an IOSink instance to be written to if the GeneratorAdapter should generate.

If it returns null, the GeneratorAdapter will be skipped.

Implementation

@override
IOSink? shouldGenerate(PigeonOptions options, FileType _) {
  if (options.dartTestOut != null) {
    return _openSink(options.dartTestOut, basePath: options.basePath ?? '');
  } else {
    return null;
  }
}