Skip to content

Commit

Permalink
example fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanthrajv committed Apr 25, 2019
1 parent 66bb452 commit ec156c1
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 39 deletions.
17 changes: 11 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
## [0.0.1] - TODO: Add release date.
## [0.0.6] - Fixed Example

* TODO: Describe initial release.
## [0.0.5] - Breaking Change

## [0.0.2] - Updated to provide zoom, angleX, angleY and angleZ args.
* changed the class name from `Object_3D` to `Object3D`

## [0.0.4] - Dart 2 support

## [0.0.3] - Added Example

## [0.0.4] - Dart 2 support
## [0.0.2] - Updated to provide zoom, angleX, angleY and angleZ args.

## [0.0.1] - TODO: Add release date.

* Initial Relese


## [0.0.5] - Breaking Change

* changed the class name from `Object_3D` to `Object3D`
4 changes: 0 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
9740EEBB1CF902C7004384FC /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
Expand Down Expand Up @@ -48,7 +47,6 @@
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEB71CF902C7004384FC /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Flutter/app.flx; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand All @@ -74,7 +72,6 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
9740EEB71CF902C7004384FC /* app.flx */,
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
Expand Down Expand Up @@ -187,7 +184,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9740EEBB1CF902C7004384FC /* app.flx in Resources */,
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
12 changes: 7 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ void main() {
}

class MyApp extends StatelessWidget {

@override
Widget build(BuildContext context) {
return new MaterialApp(
Expand All @@ -15,11 +14,14 @@ class MyApp extends StatelessWidget {
appBar: new AppBar(
title: const Text("Flutter 3D"),
),
body:new Center(
child: new Object3D(size: const Size(400.0, 400.0),path: "assets/file.obj",asset:true),
),
body: new Center(
child: new Object3D(
size: const Size(400.0, 400.0),
path: "assets/file.obj",
asset: true,
),
),
),
);
}
}

24 changes: 1 addition & 23 deletions example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,4 @@
// find child widgets in the widget tree, read text, and verify that the values of widget properties
// are correct.

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import '../lib/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(new MyApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);

// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();

// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
void main() {}
6 changes: 5 additions & 1 deletion lib/flutter_3d_obj.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class Object3D extends StatefulWidget {
}

class _Object3DState extends State<Object3D> {
_Object3DState() {
_Object3DState();

void initState() {
if (widget.asset == true) {
rootBundle.loadString(widget.path).then((String value) {
setState(() {
Expand All @@ -52,8 +54,10 @@ class _Object3DState extends State<Object3D> {
}

useInternal = !(widget.angleX != null || widget.angleY != null || widget.angleZ != null);
super.initState();
}


bool useInternal;

double angleX = 15.0;
Expand Down

0 comments on commit ec156c1

Please sign in to comment.