実現したいこと
初めてflutterを触ってますが、テキストの折り返しがうまくできません。
下記のコードで実装しておりますが、テキストが見切れていエラーが出てしまいます。
maxLinesとoverflowを指定しますが、こちらの原因がわかりません。
どうかわかりますでしょうか。。。。
発生している問題・エラーメッセージ
════════ Exception caught by rendering library ═════════════════════════════════ A RenderFlex overflowed by 704 pixels on the right. The relevant error-causing widget was Row
該当のソースコード
dart
1child: Row( 2 children: [ 3 Expanded( 4 child: Container( 5 height: 150, 6 decoration: BoxDecoration(color: Colors.yellow, border: Border.all(color: Colors.black, width: 0.5)), 7 child: Row( 8 children: [ 9 Container( 10 margin: const EdgeInsets.all(10), 11 width: 150, 12 height: 150, 13 decoration: BoxDecoration( 14 border: Border.all(color: Colors.black, width: 0.5), 15 ), 16 ), 17 // TODO: 折り返す処理を加える 18 const Text( 19 "testtesttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttestttest", 20 style: TextStyle(fontSize: 20), 21 maxLines: 3, 22 overflow: TextOverflow.ellipsis, 23 ), 24 ], 25 ), 26 ), 27 ), 28 ], 29 ),

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2023/02/08 13:44
2023/02/08 23:37
退会済みユーザー
2023/02/09 12:51