create examples folder
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
import 'package:dart_filament/dart_filament/compatibility/compatibility.dart';
|
||||
import 'package:dart_filament/dart_filament/swift/swift_bindings.g.dart';
|
||||
import 'package:dart_filament/dart_filament/utils/dart_resources.dart';
|
||||
import 'package:ffi/ffi.dart';
|
||||
import 'package:dart_filament/dart_filament.dart';
|
||||
import 'package:dart_filament/dart_filament/dart_filament.g.dart';
|
||||
|
||||
void main() async {
|
||||
var fc = FooChar();
|
||||
var testDir = File(Platform.script.toFilePath()).parent.path;
|
||||
final lib = DartFilamentTexture1(DynamicLibrary.open(
|
||||
"$testDir/../../native/lib/macos/swift/libdartfilamenttexture.dylib"));
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@@ -100,7 +100,7 @@ packages:
|
||||
dart_filament:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
path: "../.."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.5.0"
|
||||
@@ -481,4 +481,4 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
sdks:
|
||||
dart: ">=3.5.0-76.0.dev <4.0.0"
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
@@ -9,7 +9,7 @@ environment:
|
||||
# Add regular dependencies here.
|
||||
dependencies:
|
||||
dart_filament:
|
||||
path: ../
|
||||
path: ../../
|
||||
ffi:
|
||||
|
||||
dev_dependencies:
|
||||
3
dart_filament/examples/web_wasm/.gitignore
vendored
Normal file
3
dart_filament/examples/web_wasm/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://dart.dev/guides/libraries/private-files
|
||||
# Created by `dart pub`
|
||||
.dart_tool/
|
||||
3
dart_filament/examples/web_wasm/CHANGELOG.md
Normal file
3
dart_filament/examples/web_wasm/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 1.0.0
|
||||
|
||||
- Initial version.
|
||||
2
dart_filament/examples/web_wasm/README.md
Normal file
2
dart_filament/examples/web_wasm/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
A sample command-line application with an entrypoint in `bin/`, library code
|
||||
in `lib/`, and example unit test in `test/`.
|
||||
30
dart_filament/examples/web_wasm/analysis_options.yaml
Normal file
30
dart_filament/examples/web_wasm/analysis_options.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
# This file configures the static analysis results for your project (errors,
|
||||
# warnings, and lints).
|
||||
#
|
||||
# This enables the 'recommended' set of lints from `package:lints`.
|
||||
# This set helps identify many issues that may lead to problems when running
|
||||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
|
||||
# style and format.
|
||||
#
|
||||
# If you want a smaller set of lints you can change this to specify
|
||||
# 'package:lints/core.yaml'. These are just the most critical lints
|
||||
# (the recommended set includes the core lints).
|
||||
# The core lints are also what is used by pub.dev for scoring packages.
|
||||
|
||||
include: package:lints/recommended.yaml
|
||||
|
||||
# Uncomment the following section to specify additional rules.
|
||||
|
||||
# linter:
|
||||
# rules:
|
||||
# - camel_case_types
|
||||
|
||||
# analyzer:
|
||||
# exclude:
|
||||
# - path/to/excluded/files/**
|
||||
|
||||
# For more information about the core and recommended set of lints, see
|
||||
# https://dart.dev/go/core-lints
|
||||
|
||||
# For additional information about configuring this file, see
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
25
dart_filament/examples/web_wasm/bin/dart_filament.js
Normal file
25
dart_filament/examples/web_wasm/bin/dart_filament.js
Normal file
File diff suppressed because one or more lines are too long
BIN
dart_filament/examples/web_wasm/bin/dart_filament.wasm
Normal file
BIN
dart_filament/examples/web_wasm/bin/dart_filament.wasm
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// This file is no longer used by emscripten and has been created as a placeholder
|
||||
// to allow build systems to transition away from depending on it.
|
||||
//
|
||||
// Future versions of emscripten will likely stop generating this file at all.
|
||||
20
dart_filament/examples/web_wasm/bin/example_web.dart
Normal file
20
dart_filament/examples/web_wasm/bin/example_web.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:dart_filament/dart_filament/compatibility/compatibility.dart';
|
||||
import 'package:dart_filament/dart_filament/filament_viewer_impl.dart';
|
||||
|
||||
void main(List<String> arguments) async {
|
||||
var fc = FooChar();
|
||||
print("Started!");
|
||||
|
||||
var resourceLoader = flutter_filament_web_get_resource_loader_wrapper();
|
||||
print("Got resource loader!");
|
||||
|
||||
var viewer = FilamentViewer(resourceLoader: resourceLoader);
|
||||
print("created viewer!");
|
||||
|
||||
await viewer.initialized;
|
||||
|
||||
while (true) {
|
||||
await Future.delayed(Duration(milliseconds: 16));
|
||||
}
|
||||
print("Finisehd!");
|
||||
}
|
||||
231
dart_filament/examples/web_wasm/bin/example_web.mjs
Normal file
231
dart_filament/examples/web_wasm/bin/example_web.mjs
Normal file
@@ -0,0 +1,231 @@
|
||||
let buildArgsList;
|
||||
|
||||
// `modulePromise` is a promise to the `WebAssembly.module` object to be
|
||||
// instantiated.
|
||||
// `importObjectPromise` is a promise to an object that contains any additional
|
||||
// imports needed by the module that aren't provided by the standard runtime.
|
||||
// The fields on this object will be merged into the importObject with which
|
||||
// the module will be instantiated.
|
||||
// This function returns a promise to the instantiated module.
|
||||
export const instantiate = async (modulePromise, importObjectPromise) => {
|
||||
let dartInstance;
|
||||
|
||||
function stringFromDartString(string) {
|
||||
const totalLength = dartInstance.exports.$stringLength(string);
|
||||
let result = '';
|
||||
let index = 0;
|
||||
while (index < totalLength) {
|
||||
let chunkLength = Math.min(totalLength - index, 0xFFFF);
|
||||
const array = new Array(chunkLength);
|
||||
for (let i = 0; i < chunkLength; i++) {
|
||||
array[i] = dartInstance.exports.$stringRead(string, index++);
|
||||
}
|
||||
result += String.fromCharCode(...array);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function stringToDartString(string) {
|
||||
const length = string.length;
|
||||
let range = 0;
|
||||
for (let i = 0; i < length; i++) {
|
||||
range |= string.codePointAt(i);
|
||||
}
|
||||
if (range < 256) {
|
||||
const dartString = dartInstance.exports.$stringAllocate1(length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i));
|
||||
}
|
||||
return dartString;
|
||||
} else {
|
||||
const dartString = dartInstance.exports.$stringAllocate2(length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i));
|
||||
}
|
||||
return dartString;
|
||||
}
|
||||
}
|
||||
|
||||
// Prints to the console
|
||||
function printToConsole(value) {
|
||||
if (typeof dartPrint == "function") {
|
||||
dartPrint(value);
|
||||
return;
|
||||
}
|
||||
if (typeof console == "object" && typeof console.log != "undefined") {
|
||||
console.log(value);
|
||||
return;
|
||||
}
|
||||
if (typeof print == "function") {
|
||||
print(value);
|
||||
return;
|
||||
}
|
||||
|
||||
throw "Unable to print message: " + js;
|
||||
}
|
||||
|
||||
// Converts a Dart List to a JS array. Any Dart objects will be converted, but
|
||||
// this will be cheap for JSValues.
|
||||
function arrayFromDartList(constructor, list) {
|
||||
const length = dartInstance.exports.$listLength(list);
|
||||
const array = new constructor(length);
|
||||
for (let i = 0; i < length; i++) {
|
||||
array[i] = dartInstance.exports.$listRead(list, i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
buildArgsList = function(list) {
|
||||
const dartList = dartInstance.exports.$makeStringList();
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
dartInstance.exports.$listAdd(dartList, stringToDartString(list[i]));
|
||||
}
|
||||
return dartList;
|
||||
}
|
||||
|
||||
// A special symbol attached to functions that wrap Dart functions.
|
||||
const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction");
|
||||
|
||||
function finalizeWrapper(dartFunction, wrapped) {
|
||||
wrapped.dartFunction = dartFunction;
|
||||
wrapped[jsWrappedDartFunctionSymbol] = true;
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
// Imports
|
||||
const dart2wasm = {
|
||||
|
||||
_48: v => stringToDartString(v.toString()),
|
||||
_64: () => {
|
||||
let stackString = new Error().stack.toString();
|
||||
let frames = stackString.split('\n');
|
||||
let drop = 2;
|
||||
if (frames[0] === 'Error') {
|
||||
drop += 1;
|
||||
}
|
||||
return frames.slice(drop).join('\n');
|
||||
},
|
||||
_83: s => stringToDartString(JSON.stringify(stringFromDartString(s))),
|
||||
_84: s => printToConsole(stringFromDartString(s)),
|
||||
_98: (ms, c) =>
|
||||
setTimeout(() => dartInstance.exports.$invokeCallback(c),ms),
|
||||
_102: (c) =>
|
||||
queueMicrotask(() => dartInstance.exports.$invokeCallback(c)),
|
||||
_104: (a, i) => a.push(i),
|
||||
_115: a => a.length,
|
||||
_117: (a, i) => a[i],
|
||||
_118: (a, i, v) => a[i] = v,
|
||||
_120: a => a.join(''),
|
||||
_130: (s, p, i) => s.indexOf(p, i),
|
||||
_133: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length),
|
||||
_134: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length),
|
||||
_135: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length),
|
||||
_136: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length),
|
||||
_137: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length),
|
||||
_138: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length),
|
||||
_139: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length),
|
||||
_142: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length),
|
||||
_143: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length),
|
||||
_148: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength),
|
||||
_152: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get),
|
||||
_153: (b, o) => new DataView(b, o),
|
||||
_155: Function.prototype.call.bind(DataView.prototype.getUint8),
|
||||
_157: Function.prototype.call.bind(DataView.prototype.getInt8),
|
||||
_159: Function.prototype.call.bind(DataView.prototype.getUint16),
|
||||
_161: Function.prototype.call.bind(DataView.prototype.getInt16),
|
||||
_163: Function.prototype.call.bind(DataView.prototype.getUint32),
|
||||
_165: Function.prototype.call.bind(DataView.prototype.getInt32),
|
||||
_171: Function.prototype.call.bind(DataView.prototype.getFloat32),
|
||||
_173: Function.prototype.call.bind(DataView.prototype.getFloat64),
|
||||
_194: o => o === undefined,
|
||||
_195: o => typeof o === 'boolean',
|
||||
_196: o => typeof o === 'number',
|
||||
_198: o => typeof o === 'string',
|
||||
_201: o => o instanceof Int8Array,
|
||||
_202: o => o instanceof Uint8Array,
|
||||
_203: o => o instanceof Uint8ClampedArray,
|
||||
_204: o => o instanceof Int16Array,
|
||||
_205: o => o instanceof Uint16Array,
|
||||
_206: o => o instanceof Int32Array,
|
||||
_207: o => o instanceof Uint32Array,
|
||||
_208: o => o instanceof Float32Array,
|
||||
_209: o => o instanceof Float64Array,
|
||||
_210: o => o instanceof ArrayBuffer,
|
||||
_211: o => o instanceof DataView,
|
||||
_212: o => o instanceof Array,
|
||||
_213: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true,
|
||||
_217: (l, r) => l === r,
|
||||
_218: o => o,
|
||||
_219: o => o,
|
||||
_220: o => o,
|
||||
_221: b => !!b,
|
||||
_222: o => o.length,
|
||||
_225: (o, i) => o[i],
|
||||
_226: f => f.dartFunction,
|
||||
_227: l => arrayFromDartList(Int8Array, l),
|
||||
_228: l => arrayFromDartList(Uint8Array, l),
|
||||
_229: l => arrayFromDartList(Uint8ClampedArray, l),
|
||||
_230: l => arrayFromDartList(Int16Array, l),
|
||||
_231: l => arrayFromDartList(Uint16Array, l),
|
||||
_232: l => arrayFromDartList(Int32Array, l),
|
||||
_233: l => arrayFromDartList(Uint32Array, l),
|
||||
_234: l => arrayFromDartList(Float32Array, l),
|
||||
_235: l => arrayFromDartList(Float64Array, l),
|
||||
_236: (data, length) => {
|
||||
const view = new DataView(new ArrayBuffer(length));
|
||||
for (let i = 0; i < length; i++) {
|
||||
view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i));
|
||||
}
|
||||
return view;
|
||||
},
|
||||
_237: l => arrayFromDartList(Array, l),
|
||||
_238: stringFromDartString,
|
||||
_239: stringToDartString,
|
||||
_242: l => new Array(l),
|
||||
_246: (o, p) => o[p],
|
||||
_250: o => String(o)
|
||||
};
|
||||
|
||||
const baseImports = {
|
||||
dart2wasm: dart2wasm,
|
||||
|
||||
|
||||
Math: Math,
|
||||
Date: Date,
|
||||
Object: Object,
|
||||
Array: Array,
|
||||
Reflect: Reflect,
|
||||
};
|
||||
|
||||
const jsStringPolyfill = {
|
||||
"charCodeAt": (s, i) => s.charCodeAt(i),
|
||||
"compare": (s1, s2) => {
|
||||
if (s1 < s2) return -1;
|
||||
if (s1 > s2) return 1;
|
||||
return 0;
|
||||
},
|
||||
"concat": (s1, s2) => s1 + s2,
|
||||
"equals": (s1, s2) => s1 === s2,
|
||||
"fromCharCode": (i) => String.fromCharCode(i),
|
||||
"length": (s) => s.length,
|
||||
"substring": (s, a, b) => s.substring(a, b),
|
||||
};
|
||||
|
||||
dartInstance = await WebAssembly.instantiate(await modulePromise, {
|
||||
...baseImports,
|
||||
...(await importObjectPromise),
|
||||
"wasm:js-string": jsStringPolyfill,
|
||||
});
|
||||
|
||||
return dartInstance;
|
||||
}
|
||||
|
||||
// Call the main function for the instantiated module
|
||||
// `moduleInstance` is the instantiated dart2wasm module
|
||||
// `args` are any arguments that should be passed into the main function.
|
||||
export const invoke = (moduleInstance, ...args) => {
|
||||
const dartMain = moduleInstance.exports.$getMain();
|
||||
const dartArgs = buildArgsList(args);
|
||||
moduleInstance.exports.$invokeMain(dartMain, dartArgs);
|
||||
}
|
||||
|
||||
BIN
dart_filament/examples/web_wasm/bin/example_web.unopt.wasm
Normal file
BIN
dart_filament/examples/web_wasm/bin/example_web.unopt.wasm
Normal file
Binary file not shown.
BIN
dart_filament/examples/web_wasm/bin/example_web.wasm
Normal file
BIN
dart_filament/examples/web_wasm/bin/example_web.wasm
Normal file
Binary file not shown.
27
dart_filament/examples/web_wasm/bin/index.html
Normal file
27
dart_filament/examples/web_wasm/bin/index.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<script type="module">
|
||||
|
||||
import { dart_filament } from "./dart_filament.js";
|
||||
|
||||
let dart2wasm_runtime;
|
||||
let moduleInstance;
|
||||
|
||||
const dartFilamentModulePromise = await WebAssembly.compileStreaming(fetch('dart_filament.wasm'));
|
||||
var df = await dart_filament(dartFilamentModulePromise);
|
||||
console.log(df);
|
||||
|
||||
const dartModulePromise = WebAssembly.compileStreaming(fetch('example_web.wasm'));
|
||||
const imports = {"dart_filament":df};
|
||||
dart2wasm_runtime = await import('./example_web.mjs');
|
||||
moduleInstance = await dart2wasm_runtime.instantiate(dartModulePromise, imports);
|
||||
|
||||
if (moduleInstance) {
|
||||
try {
|
||||
await dart2wasm_runtime.invoke(moduleInstance);
|
||||
} catch (exception) {
|
||||
console.error(`Exception while invoking test: ${exception}`);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
3
dart_filament/examples/web_wasm/lib/example_web.dart
Normal file
3
dart_filament/examples/web_wasm/lib/example_web.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
int calculate() {
|
||||
return 6 * 7;
|
||||
}
|
||||
436
dart_filament/examples/web_wasm/pubspec.lock
Normal file
436
dart_filament/examples/web_wasm/pubspec.lock
Normal file
@@ -0,0 +1,436 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "67.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.4.1"
|
||||
animation_tools_dart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: animation_tools_dart
|
||||
sha256: c4bc4096d43227b573345a3ea3cb26c3af47a70af31cd7d7d3a5b7c99e33d615
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.0.2"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
dart_filament:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../.."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.5.0"
|
||||
ffi:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: frontend_server_client
|
||||
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_multi_server
|
||||
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: io
|
||||
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.1"
|
||||
lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16+1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
node_preamble:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_preamble
|
||||
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
shelf_packages_handler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_packages_handler
|
||||
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
shelf_static:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_static
|
||||
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
source_map_stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_map_stack_trace
|
||||
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.12"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
sha256: d11b55850c68c1f6c0cf00eabded4e66c4043feaf6c0d7ce4a36785137df6331
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.25.5"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.1"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: "4d070a6bc36c1c4e89f20d353bfd71dc30cdf2bd0e14349090af360a029ab292"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.2"
|
||||
tuple:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: tuple
|
||||
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "7475cb4dd713d57b6f7464c0e13f06da0d535d8b2067e188962a59bac2cf280b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.2"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket
|
||||
sha256: bfe704c186c6e32a46f6607f94d079cd0b747b9a489fceeecc93cd3adb98edd5
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
sdks:
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
17
dart_filament/examples/web_wasm/pubspec.yaml
Normal file
17
dart_filament/examples/web_wasm/pubspec.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
name: example_web
|
||||
description: A sample command-line application.
|
||||
version: 1.0.0
|
||||
# repository: https://github.com/my_org/my_repo
|
||||
|
||||
environment:
|
||||
sdk: ^3.3.0
|
||||
|
||||
# Add regular dependencies here.
|
||||
dependencies:
|
||||
dart_filament:
|
||||
path: ../../
|
||||
ffi:
|
||||
|
||||
dev_dependencies:
|
||||
lints: ^3.0.0
|
||||
test: ^1.24.0
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'package:example_web/example_web.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('calculate', () {
|
||||
expect(calculate(), 42);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user