FileSource constructor
FileSource(
- String path
Implementation
FileSource(this.path) {
if (kIsWeb) {
throw UnsupportedError('File sources are not supported on web platform');
}
if (path.isEmpty) {
throw ArgumentError('File path cannot be empty');
}
if (!path.startsWith('/') && !RegExp(r'^[A-Za-z]:[/\\]').hasMatch(path)) {
throw ArgumentError('File path must be absolute');
}
}