Flutterで簡単なアプリを実行しようとすると(ラジオボタンとTextとTextFieldの組み合わせ)
以下のようのlお具をはきアプリが描画されず、シミュレータに真っ白な画面が表示されます。(AppBarのところだけはちゃんと表示されています)以下のような大量のログが出ていました。このエラーが何を指しているのか、及びその際の解決策を押していただけると幸いです。
Xcode build done. 23.1s
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during performLayout():
flutter: An InputDecorator, which is typically created by a TextField, cannot have an unbounded width.
flutter: This happens when the parent widget does not provide a finite width constraint. For example, if the
flutter: InputDecorator is contained by a Row, then its width must be constrained. An Expanded widget or a
flutter: SizedBox can be used to constrain the width of the InputDecorator or the TextField that contains it.
flutter: 'package:flutter/src/material/input_decorator.dart':
flutter: Failed assertion: line 945 pos 7: 'layoutConstraints.maxWidth < double.infinity'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: The relevant error-causing widget was:
flutter: TextFormField file:///Users/aoxitaidi/AndroidStudioProjects/flutter_okyaku/lib/main.dart:73:21
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 _RenderDecoration._layout (package:flutter/src/material/input_decorator.dart:945:7)
flutter: #3 _RenderDecoration.performLayout (package:flutter/src/material/input_decorator.dart:1262:44)
flutter: #4 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #5 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #7 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #9 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #11 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
以下省略
回答1件
あなたの回答
tips
プレビュー