models property

Future<List<ModelSourceModel>?> get models

Defines properties of 3D models in collection. Requires model source type.

Implementation

Future<List<ModelSourceModel>?> get models async {
  final localStyle = style;
  if (localStyle == null) return null;
  final raw = (await localStyle.getStyleSourceProperty(id, "models")).value;
  if (raw == null) return null;
  return (raw as Map<Object?, Object?>).entries.map((entry) {
    return ModelSourceModel.fromJson(
      entry.key as String,
      Map<String, dynamic>.from(entry.value as Map),
    );
  }).toList();
}