skip to Main Content

I want to create a row with image and text. TextOverflow.visible didn’t work even if I use expanded with flex widget. Can you help me?
Here is my code

SafeArea(
          child: Scaffold(
              resizeToAvoidBottomInset: true,
              body: CustomScrollView(
                slivers: [
                  SliverFillRemaining(
                    hasScrollBody: false,
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Container(
                            margin: const EdgeInsets.symmetric(horizontal: 5),
                            child: Row(children: [
                              ConstrainedBox(
                                  constraints: BoxConstraints(
                                      maxWidth:
                                          MediaQuery.of(context).size.width *
                                              0.4,
                                      maxHeight:
                                          MediaQuery.of(context).size.width *
                                              0.4),
                                  child: const Image(image: emptySearch)),
                              Row(children: [
                                Text("U - lo Músico?",
                                    overflow: TextOverflow.visible,
                                    style: Theme.of(context)
                                        .textTheme
                                        .displayLarge)
                              ])
                            ])),
                        Container(
                          margin: const EdgeInsets.symmetric(horizontal: 40),
                          child: Form(...))

2

Answers


  1. Chosen as BEST ANSWER

    Thaks for the efford! I've already solve it, just have to change Row(children:[Text...]) for Expanded (child: Text...)


  2. i’m try to solve your problem :

    Use Expanded inside the Row Widget

    Row(children: [
      Expanded(
        child: Text(
          "U - lo Músico?",
          overflow: TextOverflow.visible,
          maxLines: null,
          style: Theme.of(context).textTheme.displayLarge,
        ),
      ),
    ]),
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search