XFile constructor

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

Construct a CrossFile object from its path.

Optionally, this can be initialized with bytes and length so no http requests are performed to retrieve data later.

name may be passed from the outside, for those cases where the effective path of the file doesn't match what the user sees when selecting it (like in web)

Implementation

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