checkFile method Null safety
- dynamic request
Method for checking a file. Uses the parameter request, but it's NOT a Shelf package request. It uses a dynamic parameter to get a uri.pathSegments
Implementation
bool checkFile(dynamic request) {
if (request.uri.pathSegments.length >= 2) {
return request.uri.pathSegments[request.uri.pathSegments.length - 2] ==
'file' &&
config.storage != null;
}
return false;
}