Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble running flutter_form_builder example 3.5.5 #157

Closed
uneewk opened this issue Oct 25, 2019 · 1 comment
Closed

Having trouble running flutter_form_builder example 3.5.5 #157

uneewk opened this issue Oct 25, 2019 · 1 comment

Comments

@uneewk
Copy link

uneewk commented Oct 25, 2019

Hello,

I picked up the example from the plugin page and tried to run it. It compiles fine but apk will not install on a Pixel 3a XL API 29 Emulator. I get the following error:

I/flutter (21854): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (21854): The following assertion was thrown building TextField(controller:
I/flutter (21854): TextEditingController#c28c4(TextEditingValue(text: ┤2019-10-24├, selection:
I/flutter (21854): TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream, isDirectional:
I/flutter (21854): false), composing: TextRange(start: -1, end: -1))), focusNode: FocusNode#305dd, decoration:
I/flutter (21854): InputDecoration(labelText: "Appointment Time", suffixIcon: IconButton(Icon, padding:
I/flutter (21854): EdgeInsets.all(8.0)), alignLabelWithHint: false), dirty, state: _TextFieldState#c8ec5):
I/flutter (21854): No Material widget found.
I/flutter (21854): TextField widgets require a Material widget ancestor.
I/flutter (21854): In material design, most widgets are conceptually "printed" on a sheet of material. In Flutter's
I/flutter (21854): material library, that material is represented by the Material widget. It is the Material widget
I/flutter (21854): that renders ink splashes, for instance. Because of this, many material library widgets require that
I/flutter (21854): there be a Material widget in the tree above them.
I/flutter (21854): To introduce a Material widget, you can either directly include one, or use a widget that contains
I/flutter (21854): Material itself, such as a Card, Dialog, Drawer, or Scaffold.
I/flutter (21854): The specific widget that could not find a Material ancestor was:
I/flutter (21854): TextField(controller: TextEditingController#c28c4(TextEditingValue(text: ┤2019-10-24├, selection:
I/flutter (21854): TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream, isDirectional:
I/flutter (21854): false), composing: TextRange(start: -1, end: -1))), focusNode: FocusNode#305dd, decoration:
I/flutter (21854): InputDecoration(labelText: "Appointment Time", suffixIcon: IconButton(Icon, padding:
I/flutter (21854): EdgeInsets.all(8.0)), alignLabelWithHint: false))
I/flutter (21854): The ancestors of this widget were:
I/flutter (21854): DateTimeField-[LabeledGlobalKey<FormFieldState>#35af9]
I/flutter (21854): FormBuilderDateTimePicker
I/flutter (21854): Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center)
I/flutter (21854): _FormScope
I/flutter (21854): WillPopScope
I/flutter (21854): Form-[LabeledGlobalKey#aa314]
I/flutter (21854): FormBuilder-[LabeledGlobalKey#a2363]
I/flutter (21854): Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center)
I/flutter (21854): MyApp
I/flutter (21854): [root]
I/flutter (21854):
I/flutter (21854): Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can
I/flutter (21854): be enabled by passing --track-widget-creation to flutter run or flutter test.
I/flutter (21854):
I/flutter (21854): When the exception was thrown, this was the stack:
I/flutter (21854): #0 debugCheckHasMaterial. (package:flutter/src/material/debug.dart:65:7)
I/flutter (21854): #1 debugCheckHasMaterial (package:flutter/src/material/debug.dart:68:4)
I/flutter (21854): #2 _TextFieldState.build (package:flutter/src/material/text_field.dart:924:12)
I/flutter (21854): #3 StatefulElement.build (package:flutter/src/widgets/framework.dart:4047:27)
I/flutter (21854): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3941:15)
I/flutter (21854): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #14 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #15 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #19 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #20 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #21 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #22 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #24 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5233:32)
I/flutter (21854): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #28 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #29 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #30 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #32 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #33 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #34 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #35 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #36 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #40 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #41 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #42 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #43 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #44 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #45 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #47 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #48 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #49 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #50 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4088:11)
I/flutter (21854): #51 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #52 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #53 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5233:32)
I/flutter (21854): #54 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #55 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #56 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3961:16)
I/flutter (21854): #57 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
I/flutter (21854): #58 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3924:5)
I/flutter (21854): #59 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3919:5)
I/flutter (21854): #60 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3101:14)
I/flutter (21854): #61 Element.updateChild (package:flutter/src/widgets/framework.dart:2904:12)
I/flutter (21854): #62 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:998:16)
I/flutter (21854): #63 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:969:5)
I/flutter (21854): #64 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:915:17)
I/flutter (21854): #65 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2328:19)
I/flutter (21854): #66 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:914:13)
I/flutter (21854): #67 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:795:7)
I/flutter (21854): #68 runApp (package:flutter/src/widgets/binding.dart:845:7)
I/flutter (21854): #69 main (package:flutter_forms/main.dart:5:16)
I/flutter (21854): #70 _runMainZoned.. (dart:ui/hooks.dart:229:25)
I/flutter (21854): #75 _runMainZoned. (dart:ui/hooks.dart:221:5)
I/flutter (21854): #76 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:19)
I/flutter (21854): #77 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
I/flutter (21854): (elided 4 frames from package dart:async)
I/flutter (21854):
I/flutter (21854): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (21854): Another exception was thrown: 'package:flutter/src/material/input_decorator.dart': Failed assertion: line 1611 pos 15: 'textDirection != null': is not true.
I/chatty (21854): uid=10135(com.example.flutter_forms) 1.ui identical 1 line
I/flutter (21854): Another exception was thrown: 'package:flutter/src/material/input_decorator.dart': Failed assertion: line 1611 pos 15: 'textDirection != null': is not true.
I/flutter (21854): Another exception was thrown: No Material widget found.
I/flutter (21854): Another exception was thrown: 'package:flutter/src/material/input_decorator.dart': Failed assertion: line 1611 pos 15: 'textDirection != null': is not true.
I/chatty (21854): uid=10135(com.example.flutter_forms) 1.ui identical 4 lines
I/flutter (21854): Another exception was thrown: 'package:flutter/src/material/input_decorator.dart': Failed assertion: line 1611 pos 15: 'textDirection != null': is not true.
I/flutter (21854): Another exception was thrown: No Directionality widget found.
I/flutter (21854): Another exception was thrown: No Directionality widget found.
I/flutter (21854): Another exception was thrown: Horizontal RenderFlex with multiple children has a null textDirection, so the layout order is undefined.
I/flutter (21854): Another exception was thrown: RenderBox was not laid out: RenderFlex#799cf relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (21854): Another exception was thrown: NoSuchMethodError: The method '>' was called on null.
D/EGL_emulation(21854): eglMakeCurrent: 0xec97f160: ver 2 0 (tinfo 0xe170f0f0)
D/eglCodecCommon(21854): setVertexArrayObject: set vao to 0 (0) 1 0
E/flutter (21854): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Cannot hit test a render box with no size.
E/flutter (21854): The hitTest() method was called on this RenderBox: RenderFlex#0153d:
E/flutter (21854): creator: Column ← MyApp ← [root]
E/flutter (21854): parentData:
E/flutter (21854): constraints: BoxConstraints(w=432.0, h=816.0)
E/flutter (21854): size: MISSING
E/flutter (21854): direction: vertical
E/flutter (21854): mainAxisAlignment: start
E/flutter (21854): mainAxisSize: max
E/flutter (21854): crossAxisAlignment: center
E/flutter (21854): verticalDirection: down
E/flutter (21854): Although this node is not marked as needing layout, its size is not set.
E/flutter (21854): A RenderBox object must have an explicit size before it can be hit-tested. Make sure that the RenderBox in question sets its size during layout.
E/flutter (21854): #0 RenderBox.hitTest. (package:flutter/src/rendering/box.dart:2111:9)
E/flutter (21854): #1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2126:6)
E/flutter (21854): #2 RenderView.hitTest (package:flutter/src/rendering/view.dart:172:13)
E/flutter (21854): #3 RendererBinding.hitTest (package:flutter/src/rendering/binding.dart:364:16)
E/flutter (21854): #4 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:128:7)
E/flutter (21854): #5 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (21854): #6 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (21854): #7 _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter (21854): #8 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (21854): #9 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter (21854): #10 _invoke1 (dart:ui/hooks.dart:263:10)
E/flutter (21854): #11 _dispatchPointerDataPacket (dart:ui/hooks.dart:172:5)
E/flutter (21854):`

I am wondering if anyone has run into this issue before and how it was resolved if they have.
`

@danvick
Copy link
Collaborator

danvick commented Oct 31, 2019

Hi @uneewk,
This can be fixed by wrapping your code with a Scaffold.

Kindly take note of these lines:

I/flutter (21854): No Material widget found.
I/flutter (21854): TextField widgets require a Material widget ancestor.

Refer here

@danvick danvick closed this as completed Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants