don't expose FILAMENT_ASSET_ERROR

This commit is contained in:
Nick Fisher
2023-10-11 15:34:19 +08:00
parent 08ba9400d3
commit 1be2367b4f
3 changed files with 13 additions and 5 deletions

View File

@@ -9,6 +9,8 @@ import 'filament_controller.dart';
typedef AssetManager = int;
const FilamentEntity _FILAMENT_ASSET_ERROR = 0;
///
/// This is a previous iteration of FilamentController that used platform channels for every distinct platform.
/// This is no longer used; currently kept only for reference/posterity.
@@ -245,7 +247,7 @@ class FilamentControllerMethodChannel extends FilamentController {
}
var asset =
await _channel.invokeMethod("loadGlb", [_assetManager, path, unlit]);
if (asset == FILAMENT_ASSET_ERROR) {
if (asset == _FILAMENT_ASSET_ERROR) {
throw Exception("An error occurred loading the asset at $path");
}
return asset;
@@ -659,4 +661,10 @@ class FilamentControllerMethodChannel extends FilamentController {
@override
// TODO: implement pickResult
Stream<FilamentEntity?> get pickResult => throw UnimplementedError();
@override
String? getNameForEntity(FilamentEntity entity) {
// TODO: implement getNameForEntity
throw UnimplementedError();
}
}