You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to open unity over flutter. I am new to flutter. Please help me guys.
I have followed https://pub.dev/packages/flutter_unity_widget this guide step by step.
Have written code in main.dart like bellow but getting issues
// Callback that connects the created controller to the unity controller
void onUnityCreated(controller) {
print('Received :onUnityCreated ');
this._unityWidgetController = controller;
}
`
getting this error. Please let me know what i am doing wrong and how I will solve this issue. Thanks in advance.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building UnityWidget(dirty, state: _UnityWidgetState#6c848):
'package:flutter/src/widgets/basic.dart': Failed assertion: line 733 pos 15: 'borderRadius != null
|| clipper != null': is not true.
The relevant error-causing widget was:
UnityWidget
UnityWidget:file:///C:/D/FlutterProject/flutter_unity_bridge/flutter_unity/lib/main.dart:29:17
When the exception was thrown, this was the stack: #2 new ClipRRect (package:flutter/src/widgets/basic.dart:733:15) #3 _UnityWidgetState.build (package:flutter_unity_widget/src/unity_view.dart:83:12) #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4705:27) #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4588:15) #6 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4763:11) #7 Element.rebuild (package:flutter/src/widgets/framework.dart:4311:5) #8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4566:5) #9 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4754:11) #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4561:5) #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14) #12 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36) #13 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (19 frames) #32 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14) #33 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36) #34 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (253 frames) #287 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14) #288 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36) #289 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (561 frames) #850 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14) #851 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36) #852 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (385 frames)
#1237 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#1238 Element.updateChild (package:flutter/src/widgets/framework.dart:3383:18)
#1239 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
#1240 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
#1241 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1112:18)
#1242 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2531:19)
#1243 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
#1244 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)
#1245 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:924:7)
(elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
Hi, I am trying to open unity over flutter. I am new to flutter. Please help me guys.
I have followed https://pub.dev/packages/flutter_unity_widget this guide step by step.
Have written code in main.dart like bellow but getting issues
`import 'package:flutter/material.dart';
import 'package:flutter_unity_widget/flutter_unity_widget.dart';
void main() {
runApp(MaterialApp(
home: UnityDemoScreen()
));
}
class UnityDemoScreen extends StatefulWidget {
// ignore: prefer_const_constructors_in_immutables
UnityDemoScreen({Key? key}) : super(key: key);
@OverRide
_UnityDemoScreenState createState() => _UnityDemoScreenState();
}
class _UnityDemoScreenState extends State
{
late UnityWidgetController _unityWidgetController;
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body:
Stack(
children: [
UnityWidget(
onUnityCreated: onUnityCreated,
//onUnityMessage: onUnityMessage,
//onUnitySceneLoaded: onUnitySceneLoaded,
fullscreen: false,
),
]
),
),
);
}
// Callback that connects the created controller to the unity controller
void onUnityCreated(controller) {
print('Received :onUnityCreated ');
this._unityWidgetController = controller;
}
`
getting this error. Please let me know what i am doing wrong and how I will solve this issue. Thanks in advance.
An Observatory debugger and profiler on sdk gphone x86 is available at: http://127.0.0.1:49761/aYUv2eD_KzE=/
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building UnityWidget(dirty, state: _UnityWidgetState#6c848):
'package:flutter/src/widgets/basic.dart': Failed assertion: line 733 pos 15: 'borderRadius != null
|| clipper != null': is not true.
The relevant error-causing widget was:
UnityWidget
UnityWidget:file:///C:/D/FlutterProject/flutter_unity_bridge/flutter_unity/lib/main.dart:29:17
When the exception was thrown, this was the stack:
#2 new ClipRRect (package:flutter/src/widgets/basic.dart:733:15)
#3 _UnityWidgetState.build (package:flutter_unity_widget/src/unity_view.dart:83:12)
#4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4705:27)
#5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4588:15)
#6 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4763:11)
#7 Element.rebuild (package:flutter/src/widgets/framework.dart:4311:5)
#8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4566:5)
#9 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4754:11)
#10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4561:5)
#11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#12 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36)
#13 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (19 frames)
#32 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#33 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36)
#34 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (253 frames)
#287 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#288 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36)
#289 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (561 frames)
#850 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#851 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36)
#852 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (385 frames)
#1237 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#1238 Element.updateChild (package:flutter/src/widgets/framework.dart:3383:18)
#1239 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
#1240 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
#1241 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1112:18)
#1242 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2531:19)
#1243 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
#1244 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)
#1245 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:924:7)
(elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
════════════════════════════════════════════════════════════════════════════════════════════════════
The Flutter DevTools debugger and profiler on sdk gphone x86 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:49761/aYUv2eD_KzE=/
The text was updated successfully, but these errors were encountered: