File tree Expand file tree Collapse file tree 6 files changed +17
-20
lines changed
Expand file tree Collapse file tree 6 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ class _MyHomePageState extends State<MyHomePage> {
125125 height: 4 ,
126126 ),
127127 IconButton (
128- onPressed: () async {
128+ onPressed: () async {
129129 controller.startRotation (rotationSpeed: 30 );
130130 //controller.pauseRotation();
131131 //controller.stopRotation();
Original file line number Diff line number Diff line change @@ -53,5 +53,4 @@ abstract class IFlutter3DController {
5353
5454 /// Stops the rotation completely and resets the rotation state to the initial position.
5555 void stopRotation ();
56-
5756}
Original file line number Diff line number Diff line change @@ -156,28 +156,28 @@ class Flutter3DDatasource implements IFlutter3DDatasource {
156156 void startRotation ({int ? rotationSpeed = 10 }) {
157157 executeCustomJsCode (
158158 "const modelViewer = document.getElementById(\" $_viewerId \" );"
159- "modelViewer.autoRotateDelay = \" 500\" ;"
160- "modelViewer.autoRotate = \" true\" ;"
161- "modelViewer.rotationPerSecond = \" ${rotationSpeed }deg\" ;" ,
159+ "modelViewer.autoRotateDelay = \" 500\" ;"
160+ "modelViewer.autoRotate = \" true\" ;"
161+ "modelViewer.rotationPerSecond = \" ${rotationSpeed }deg\" ;" ,
162162 );
163163 }
164164
165165 @override
166166 void pauseRotation () {
167167 executeCustomJsCode (
168168 "const modelViewer = document.getElementById(\" $_viewerId \" );"
169- "modelViewer.autoRotate = \" false\" ;"
170- "modelViewer.rotationPerSecond = \" 0deg\" ;" ,
169+ "modelViewer.autoRotate = \" false\" ;"
170+ "modelViewer.rotationPerSecond = \" 0deg\" ;" ,
171171 );
172172 }
173173
174174 @override
175175 void stopRotation () {
176176 executeCustomJsCode (
177177 "const modelViewer = document.getElementById(\" $_viewerId \" );"
178- "modelViewer.autoRotate = \" false\" ;"
179- "modelViewer.rotationPerSecond = \" 0deg\" ;"
180- "modelViewer.resetTurntableRotation(0);" ,
178+ "modelViewer.autoRotate = \" false\" ;"
179+ "modelViewer.rotationPerSecond = \" 0deg\" ;"
180+ "modelViewer.resetTurntableRotation(0);" ,
181181 );
182182 }
183183
Original file line number Diff line number Diff line change @@ -126,28 +126,28 @@ class Flutter3DDatasource implements IFlutter3DDatasource {
126126 void startRotation ({int ? rotationSpeed = 10 }) {
127127 executeCustomJsCode (
128128 "const modelViewer = document.getElementById(\" $_viewerId \" );"
129- "modelViewer.autoRotateDelay = \" 500\" ;"
130- "modelViewer.autoRotate = \" true\" ;"
131- "modelViewer.rotationPerSecond = \" ${rotationSpeed }deg\" ;" ,
129+ "modelViewer.autoRotateDelay = \" 500\" ;"
130+ "modelViewer.autoRotate = \" true\" ;"
131+ "modelViewer.rotationPerSecond = \" ${rotationSpeed }deg\" ;" ,
132132 );
133133 }
134134
135135 @override
136136 void pauseRotation () {
137137 executeCustomJsCode (
138138 "const modelViewer = document.getElementById(\" $_viewerId \" );"
139- "modelViewer.autoRotate = \" false\" ;"
140- "modelViewer.rotationPerSecond = \" 0deg\" ;" ,
139+ "modelViewer.autoRotate = \" false\" ;"
140+ "modelViewer.rotationPerSecond = \" 0deg\" ;" ,
141141 );
142142 }
143143
144144 @override
145145 void stopRotation () {
146146 executeCustomJsCode (
147147 "const modelViewer = document.getElementById(\" $_viewerId \" );"
148- "modelViewer.autoRotate = \" false\" ;"
149- "modelViewer.rotationPerSecond = \" 0deg\" ;"
150- "modelViewer.resetTurntableRotation(0);" ,
148+ "modelViewer.autoRotate = \" false\" ;"
149+ "modelViewer.rotationPerSecond = \" 0deg\" ;"
150+ "modelViewer.resetTurntableRotation(0);" ,
151151 );
152152 }
153153
Original file line number Diff line number Diff line change @@ -78,5 +78,4 @@ class Flutter3DRepository extends IFlutter3DRepository {
7878 void stopRotation () {
7979 _datasource.stopRotation ();
8080 }
81-
8281}
Original file line number Diff line number Diff line change @@ -53,5 +53,4 @@ abstract class IFlutter3DRepository {
5353
5454 /// Stops the rotation completely and resets the rotation state to the initial position.
5555 void stopRotation ();
56-
5756}
You can’t perform that action at this time.
0 commit comments