ThreeModel constructor
ThreeModel({
- required String name,
- required Function startARSession,
- required ThreeScene scene,
Creates a new instance of ThreeModel
.
name
: A non-empty string representing the name of the 3D model.startARSession
: A function that encapsulates the logic for initiating an AR session for the model.scene
: An instance ofThreeScene
representing the 3D scene/model.
An assertion checks that the provided name
is non-empty to ensure model identification.
Implementation
ThreeModel({
required this.name,
required this.startARSession,
required this.scene,
}) : assert(name.isNotEmpty, 'Model name must not be empty.');