fileIn static method

String? fileIn(
  1. String route, {
  2. String filesRoute = '/open',
})

The file a filesRoute route carries, or null for any other route.

Implementation

static String? fileIn(String route, {String filesRoute = '/open'}) {
  if (!route.startsWith('$filesRoute?')) return null;
  final String? path = Uri.tryParse(route)?.queryParameters['path'];
  return path == null || path.isEmpty ? null : path;
}