FilesystemSanitiserResult constructor

FilesystemSanitiserResult({
  1. required String validOutput,
  2. List<String> errorMessages = const [],
})

Object to return from any filesystem sanitiser defined in FMTCSettings.filesystemSanitiser

FilesystemSanitiserResult.validOutput must be sanitised to be safe enough to be used in the filesystem. FilesystemSanitiserResult.errorMessages can be empty if there were no changes to the input. Alternatively, it can be one or more messages describing the issue with the input.

If the method is used internally in a validation situation, the output must be equal to the input, otherwise the error messages are thrown. This is, for example, the situation when managing stores and names. If the method is used internally in a sanitisation situation, error messages are ignored. This is, for example, the situation when storing map tiles.

Implementation

FilesystemSanitiserResult({
  required this.validOutput,
  this.errorMessages = const [],
});