XFile constructor
XFile(
- String path, {
- String? mimeType,
- String? name,
- int? length,
- Uint8List? bytes,
- DateTime? lastModified,
- @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.');
}