-1

hello world hope you're well looking to have a container with a fixed size witch have in it a Text() mean long text more than the size of the container Thank you for your help

in flutter

MrMoon
  • 11
  • 1
  • 4

1 Answers1

0

Found the solution thanks to Stonik

Try to add scrollDirection (horizontal)

SingleChildScrollView(
scrollDirection: Axis.horizontal,
  child: Container(
      height: 200,
      child: Text(
          "Long text here which is longer than the container height"))),

Default is vertical

or if you want to have with your height then you have to change the order (SingleChildScrollView inside Container)

Container(
    height: 200,
    child: SingleChildScrollView(
        child: Text(
            "Long text here which is longer than the container height"))),
A R
  • 5,035
  • 2
  • 9
  • 29
MrMoon
  • 11
  • 1
  • 4