diff --git a/lib/src/stdlib/package_lib.dart b/lib/src/stdlib/package_lib.dart index a9f2d9f..5f5771e 100644 --- a/lib/src/stdlib/package_lib.dart +++ b/lib/src/stdlib/package_lib.dart @@ -18,7 +18,20 @@ const lua_exec_dir = "!"; const lua_igmark = "-"; class PackageLib { - static final lua_dirsep = Platform.pathSeparator; + static get lua_dirsep { + try { + return Platform.pathSeparator; + } + catch (e) { + if (e is UnsupportedError) { + // For flutter web + return "/"; + } + else { + throw e; + } + } + } static const Map _pkgFuncs = { "searchpath": _pkgSearchPath,