XFile.fromData constructor

XFile.fromData(
  1. Uint8List bytes, {
  2. String? mimeType,
  3. String? name,
  4. int? length,
  5. DateTime? lastModified,
  6. String? path,
  7. @visibleForTesting CrossFileTestOverrides? overrides,
})

Construct a CrossFile object from its data.

On the web, the path is ignored if the bytes are provided, as the underlying Blob URL is used as the path.

Implementation

XFile.fromData(
  Uint8List bytes, {
  String? mimeType,
  String? name,
  int? length,
  DateTime? lastModified,
  String? path,
  @visibleForTesting CrossFileTestOverrides? overrides,
}) : super(path) {
  throw UnimplementedError(
    'CrossFile is not available in your current platform.',
  );
}