PathsToUris method

List<Uri> PathsToUris(
  1. List<String>? paths
)

helper method to convert list of string paths to list uris

Implementation

List<Uri> PathsToUris(List<String>? paths) {
  var list = List<Uri>.empty(growable: true);
  if (paths != null && paths.isNotEmpty) {
    for (var path in paths) {
      if (path.isNotEmpty) {
        list.add(Uri(path: path));
      }
    }
  }
  return list;
}