Skip to content

Commit e83a579

Browse files
FarazFaraz
authored andcommitted
update min sdk
1 parent 4933db3 commit e83a579

File tree

5 files changed

+62
-99
lines changed

5 files changed

+62
-99
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"webview_flutter_wkwebview","path":"/Users/faraz/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.14.0/","native_build":true,"dependencies":[]}],"android":[{"name":"webview_flutter_android","path":"/Users/faraz/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.8/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-10-07 02:35:16.696609","version":"3.22.3"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"webview_flutter_wkwebview","path":"/Users/faraz/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.14.0/","native_build":true,"dependencies":[]}],"android":[{"name":"webview_flutter_android","path":"/Users/faraz/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.8/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-10-14 18:08:53.321095","version":"3.22.3"}

example/lib/main.dart

Lines changed: 55 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MyApp extends StatelessWidget {
1111
@override
1212
Widget build(BuildContext context) {
1313
return MaterialApp(
14-
title: 'Flutter 3D Controller',//
14+
title: 'Flutter 3D Controller',
1515
theme: ThemeData(
1616
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
1717
useMaterial3: true,
@@ -32,8 +32,6 @@ class MyHomePage extends StatefulWidget {
3232

3333
class _MyHomePageState extends State<MyHomePage> {
3434
Flutter3DController controller = Flutter3DController();
35-
Flutter3DController controller2 = Flutter3DController();
36-
3735
String? chosenAnimation;
3836
String? chosenTexture;
3937

@@ -58,24 +56,12 @@ class _MyHomePageState extends State<MyHomePage> {
5856
floatingActionButton: Column(
5957
mainAxisAlignment: MainAxisAlignment.end,
6058
mainAxisSize: MainAxisSize.min,
61-
crossAxisAlignment: CrossAxisAlignment.end,
6259
children: [
63-
Row(
64-
mainAxisAlignment: MainAxisAlignment.end,
65-
children: [
66-
IconButton(
67-
onPressed: () {
68-
controller.playAnimation();
69-
},
70-
icon: const Icon(Icons.play_arrow),
71-
),
72-
IconButton(
73-
onPressed: () {
74-
controller2.playAnimation();
75-
},
76-
icon: const Icon(Icons.play_arrow_outlined),
77-
),
78-
],
60+
IconButton(
61+
onPressed: () {
62+
controller.playAnimation();
63+
},
64+
icon: const Icon(Icons.play_arrow),
7965
),
8066
const SizedBox(
8167
height: 4,
@@ -102,7 +88,7 @@ class _MyHomePageState extends State<MyHomePage> {
10288
IconButton(
10389
onPressed: () async {
10490
List<String> availableAnimations =
105-
await controller.getAvailableAnimations();
91+
await controller.getAvailableAnimations();
10692
debugPrint(
10793
'Animations : $availableAnimations --- Length : ${availableAnimations.length}');
10894
chosenAnimation = await showPickerDialog(
@@ -117,7 +103,7 @@ class _MyHomePageState extends State<MyHomePage> {
117103
IconButton(
118104
onPressed: () async {
119105
List<String> availableTextures =
120-
await controller.getAvailableTextures();
106+
await controller.getAvailableTextures();
121107
debugPrint(
122108
'Textures : $availableTextures --- Length : ${availableTextures.length}');
123109
chosenTexture = await showPickerDialog(
@@ -167,8 +153,18 @@ class _MyHomePageState extends State<MyHomePage> {
167153
children: [
168154
Flexible(
169155
flex: 1,
170-
child: Flutter3DViewer(
171-
src: 'assets/sheen_chair.glb',
156+
child: Flutter3DViewer.obj(
157+
src: 'assets/flutter_dash.obj',
158+
//src: 'https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/flutter_dash_model/flutter_dash.obj',
159+
scale: 5,
160+
// Initial scale of obj model
161+
cameraX: 0,
162+
// Initial cameraX position of obj model
163+
cameraY: 0,
164+
//Initial cameraY position of obj model
165+
cameraZ: 10,
166+
//Initial cameraZ position of obj model
167+
//This callBack will return the loading progress value between 0 and 1.0
172168
onProgress: (double progressValue) {
173169
debugPrint('model loading progress : $progressValue');
174170
},
@@ -214,39 +210,6 @@ class _MyHomePageState extends State<MyHomePage> {
214210
//src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL
215211
),
216212
)
217-
,
218-
Flexible(
219-
flex: 1,
220-
child: Flutter3DViewer(
221-
//If you pass 'true' the flutter_3d_controller will add gesture interceptor layer
222-
//to prevent gesture recognizers from malfunctioning on iOS and some Android devices.
223-
// the default value is true
224-
activeGestureInterceptor: true,
225-
//If you don't pass progressBarColor, the color of defaultLoadingProgressBar will be grey.
226-
//You can set your custom color or use [Colors.transparent] for hiding loadingProgressBar.
227-
progressBarColor: Colors.orange,
228-
//You can disable viewer touch response by setting 'enableTouch' to 'false'
229-
enableTouch: true,
230-
//This callBack will return the loading progress value between 0 and 1.0
231-
onProgress: (double progressValue) {
232-
debugPrint('model loading progress : $progressValue');
233-
},
234-
//This callBack will call after model loaded successfully and will return model address
235-
onLoad: (String modelAddress) {
236-
debugPrint('model loaded : $modelAddress');
237-
},
238-
//this callBack will call when model failed to load and will return failure error
239-
onError: (String error) {
240-
debugPrint('model failed to load : $error');
241-
},
242-
//You can have full control of 3d model animations, textures and camera
243-
controller: controller2,
244-
src:
245-
'assets/business_woman.glb', //3D model with different animations
246-
//src: 'assets/sheen_chair.glb', //3D model with different textures
247-
//src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL
248-
),
249-
)
250213
],
251214
),
252215
),
@@ -262,43 +225,43 @@ class _MyHomePageState extends State<MyHomePage> {
262225
height: 250,
263226
child: inputList.isEmpty
264227
? Center(
265-
child: Text('$title list is empty'),
266-
)
228+
child: Text('$title list is empty'),
229+
)
267230
: ListView.separated(
268-
itemCount: inputList.length,
269-
padding: const EdgeInsets.only(top: 16),
270-
itemBuilder: (ctx, index) {
271-
return InkWell(
272-
onTap: () {
273-
Navigator.pop(context, inputList[index]);
274-
},
275-
child: Container(
276-
height: 50,
277-
padding: const EdgeInsets.all(16),
278-
child: Row(
279-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
280-
children: [
281-
Text('${index + 1}'),
282-
Text(inputList[index]),
283-
Icon(
284-
chosenItem == inputList[index]
285-
? Icons.check_box
286-
: Icons.check_box_outline_blank,
287-
)
288-
],
289-
),
290-
),
291-
);
292-
},
293-
separatorBuilder: (ctx, index) {
294-
return const Divider(
295-
color: Colors.grey,
296-
thickness: 0.6,
297-
indent: 10,
298-
endIndent: 10,
299-
);
300-
},
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+
),
301253
),
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+
),
302265
);
303266
},
304267
);

ios/Flutter/Generated.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ FLUTTER_APPLICATION_PATH=/Users/faraz/StudioProjects/flutter_3d_controller
44
COCOAPODS_PARALLEL_CODE_SIGN=true
55
FLUTTER_TARGET=lib/main.dart
66
FLUTTER_BUILD_DIR=build
7-
FLUTTER_BUILD_NAME=2.0.0
8-
FLUTTER_BUILD_NUMBER=2.0.0
7+
FLUTTER_BUILD_NAME=2.0.1
8+
FLUTTER_BUILD_NUMBER=2.0.1
99
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
1010
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
1111
DART_OBFUSCATION=false

ios/Flutter/flutter_export_environment.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export "FLUTTER_APPLICATION_PATH=/Users/faraz/StudioProjects/flutter_3d_controll
55
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
66
export "FLUTTER_TARGET=lib/main.dart"
77
export "FLUTTER_BUILD_DIR=build"
8-
export "FLUTTER_BUILD_NAME=2.0.0"
9-
export "FLUTTER_BUILD_NUMBER=2.0.0"
8+
export "FLUTTER_BUILD_NAME=2.0.1"
9+
export "FLUTTER_BUILD_NUMBER=2.0.1"
1010
export "DART_OBFUSCATION=false"
1111
export "TRACK_WIDGET_CREATION=true"
1212
export "TREE_SHAKE_ICONS=false"

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ platforms:
1616
web:
1717

1818
environment:
19-
sdk: '>=3.0.6 <4.0.0'
20-
flutter: ">=1.17.0"
19+
sdk: '>=3.0.0 <4.0.0'
20+
flutter: ">=3.0.0"
2121

2222
dependencies:
2323
flutter:

0 commit comments

Comments
 (0)