feat(app): add recorded artifact gallery to the native run detail

This commit is contained in:
2026-10-21 22:34:21 +01:00
parent 365e72c22a
commit df6524c7d9
13 changed files with 1722 additions and 25 deletions
@@ -0,0 +1,20 @@
import 'dart:js_interop';
import 'dart:js_interop_unsafe';
/// Web external open: a new browser tab. The url is already validated by
/// [resolveArtifactUrl]; it is passed through unchanged and never fetched.
///
/// `window.open` is reached through `js_interop` rather than `dart:html`, so the
/// same source compiles for both the JavaScript and WebAssembly web targets.
Future<bool> openArtifactExternally(Uri uri) async {
try {
final opened = globalContext.callMethod(
'open'.toJS,
uri.toString().toJS,
'_blank'.toJS,
);
return opened.isDefinedAndNotNull;
} catch (_) {
return false;
}
}