Skip to content

Commit dcb0a8a

Browse files
FarazFaraz
Faraz
authored and
Faraz
committed
v2.0.2--fixMultipleModelControllers
1 parent e83a579 commit dcb0a8a

File tree

4 files changed

+48
-41
lines changed

4 files changed

+48
-41
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v2.0.2
2+
3+
### Fixes
4+
* Fix multiple model controllers issue
5+
* Updated minimum SDK version.
6+
7+
18
## v2.0.1
29

310
### Fixes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Flutter3DViewer.obj(
176176

177177
```yaml
178178
dependencies:
179-
flutter_3d_controller: ^2.0.1
179+
flutter_3d_controller: ^2.0.2
180180
```
181181
182182
### `AndroidManifest.xml` (Android only)
@@ -233,7 +233,7 @@ Modify the `<head>` tag of your `web/index.html` to load the JavaScript, like so
233233
## Frequently Asked Questions
234234
- **The 3D model could not load** : First check the example, if models in examples loads, may be there is problem with your model or your model path.
235235
- **The animation list could not be retrieved** : Check if there are any special characters in the animation names that might cause a JSON encoding error.
236-
- **The 3D model could not load from url** : It might be due to [CORS] security restrictions. The server hosting the model file *must* send appropriate CORS response headers for viewer to be able to load the file. See [google/model-viewer#1015]
236+
- **The 3D model could not load from url** : It might be due to [CORS] security restrictions. The server hosting the model file *must* send appropriate CORS response headers for viewer to be able to load the file. See [google/model-viewer#1015](google/model-viewer#1015)
237237

238238
## Not working with a url on a real iOS device?
239239

example/lib/main.dart

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class _MyHomePageState extends State<MyHomePage> {
8888
IconButton(
8989
onPressed: () async {
9090
List<String> availableAnimations =
91-
await controller.getAvailableAnimations();
91+
await controller.getAvailableAnimations();
9292
debugPrint(
9393
'Animations : $availableAnimations --- Length : ${availableAnimations.length}');
9494
chosenAnimation = await showPickerDialog(
@@ -103,7 +103,7 @@ class _MyHomePageState extends State<MyHomePage> {
103103
IconButton(
104104
onPressed: () async {
105105
List<String> availableTextures =
106-
await controller.getAvailableTextures();
106+
await controller.getAvailableTextures();
107107
debugPrint(
108108
'Textures : $availableTextures --- Length : ${availableTextures.length}');
109109
chosenTexture = await showPickerDialog(
@@ -205,7 +205,7 @@ class _MyHomePageState extends State<MyHomePage> {
205205
//You can have full control of 3d model animations, textures and camera
206206
controller: controller,
207207
src:
208-
'assets/business_man.glb', //3D model with different animations
208+
'assets/business_man.glb', //3D model with different animations
209209
//src: 'assets/sheen_chair.glb', //3D model with different textures
210210
//src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL
211211
),
@@ -225,43 +225,43 @@ class _MyHomePageState extends State<MyHomePage> {
225225
height: 250,
226226
child: inputList.isEmpty
227227
? Center(
228-
child: Text('$title list is empty'),
229-
)
228+
child: Text('$title list is empty'),
229+
)
230230
: ListView.separated(
231-
itemCount: inputList.length,
232-
padding: const EdgeInsets.only(top: 16),
233-
itemBuilder: (ctx, index) {
234-
return InkWell(
235-
onTap: () {
236-
Navigator.pop(context, inputList[index]);
237-
},
238-
child: Container(
239-
height: 50,
240-
padding: const EdgeInsets.all(16),
241-
child: Row(
242-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
243-
children: [
244-
Text('${index + 1}'),
245-
Text(inputList[index]),
246-
Icon(
247-
chosenItem == inputList[index]
248-
? Icons.check_box
249-
: Icons.check_box_outline_blank,
250-
)
251-
],
252-
),
231+
itemCount: inputList.length,
232+
padding: const EdgeInsets.only(top: 16),
233+
itemBuilder: (ctx, index) {
234+
return InkWell(
235+
onTap: () {
236+
Navigator.pop(context, inputList[index]);
237+
},
238+
child: Container(
239+
height: 50,
240+
padding: const EdgeInsets.all(16),
241+
child: Row(
242+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
243+
children: [
244+
Text('${index + 1}'),
245+
Text(inputList[index]),
246+
Icon(
247+
chosenItem == inputList[index]
248+
? Icons.check_box
249+
: Icons.check_box_outline_blank,
250+
)
251+
],
252+
),
253+
),
254+
);
255+
},
256+
separatorBuilder: (ctx, index) {
257+
return const Divider(
258+
color: Colors.grey,
259+
thickness: 0.6,
260+
indent: 10,
261+
endIndent: 10,
262+
);
263+
},
253264
),
254-
);
255-
},
256-
separatorBuilder: (ctx, index) {
257-
return const Divider(
258-
color: Colors.grey,
259-
thickness: 0.6,
260-
indent: 10,
261-
endIndent: 10,
262-
);
263-
},
264-
),
265265
);
266266
},
267267
);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_3d_controller
22
description: The most complete Flutter package for rendering interactive 3D models in various formats (GLB, GLTF, OBJ, FBX), with the ability to control animations, textures, camera, and more.
3-
version: 2.0.1
3+
version: 2.0.2
44
homepage: https://github.com/m-r-davari/flutter_3d_controller
55

66
topics:

0 commit comments

Comments
 (0)