static function
Implementation
InApp static(String folder, String expose) {
List<String> filesPaths = [];
List<FileSystemEntity> list = Directory(folder).listSync(recursive: false);
for (var entity in list) {
FileSystemEntityType type = FileSystemEntity.typeSync(entity.path);
if (type == FileSystemEntityType.file) {
var split = entity.path.split(RegExp(r'/|\\'));
split.removeWhere((element) => element.isEmpty);
split.removeAt(0);
split.removeAt(0);
String p = split.join('/');
filesPaths.add(p);
}
}
return _StaticFilesApp(expose, filesPaths, folder);
}