Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreeDModel function not working #22

Open
Shifty34 opened this issue Apr 3, 2023 · 0 comments
Open

ThreeDModel function not working #22

Shifty34 opened this issue Apr 3, 2023 · 0 comments

Comments

@Shifty34
Copy link

Shifty34 commented Apr 3, 2023

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Cylinder Board'),
),
body: Container(
color: Colors.white,
child: Stack(
children: [
Positioned(
left: 0,
top: 0,
child: ThreeDModel(
path: 'assets/board(1).obj',
scale: Vector3.all(0.02),
rotation: Vector3(0, 1, 0),
lighting: true,
texturePath: 'assets/board(2).mtl',
),
),
...cylinders.map((cylinder) {
return Positioned(
left: cylinder.x,
top: cylinder.y,
child: ThreeDModel(
path: 'assets/cylinder (1).obj',
scale: Vector3.all(0.02),
rotation: Vector3(0, 1, 0),
lighting: true,
texturePath: 'assets/cylinder (1).mtl',
),
);
}).toList(),
],
),
),
);
}
}

For this section of my code, although my asset path is correct and I have the latest version of the Flutter_3d_obj, the ThreeDModel lines show the error of 'The method 'ThreeDModel' isn't defined for the type '_BoardState' and that the import of this dependency is unused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant