darioielardi / flutter_speed_dial

Flutter plugin to implement a Material Design Speed Dial
https://pub.dev/packages/flutter_speed_dial
MIT License
410 stars 177 forks source link

Not able to cut long label text in SpeedDialChild #326

Open srappose opened 4 months ago

srappose commented 4 months ago

Hi, I am trying to cut too long label text on a SpeedDialChild but I can't find no way to do it. This is an excerpt of my source code:

    SpeedDialChild(      
      child: Icon(Icons.system_update_alt, color: Colors.white),
      backgroundColor: Colors.blue,
      onTap: () async {
        //...
      },
      labelWidget: Expanded(
        child: Row(
          children: [
            Padding(
              padding: const EdgeInsets.only(right: 16.0),
              child: Container(
                padding: EdgeInsets.symmetric(vertical: 6, horizontal: 8),
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(6),
                  color: Colors.blue,
                ),
                child: Text(
                  "Text too much long that I am not able to cut",
                  overflow: TextOverflow.ellipsis,
                  style: TextStyle(
                    backgroundColor: Colors.blue,
                    fontWeight: FontWeight.w500,
                    color: Colors.white,
                    overflow: TextOverflow.ellipsis,
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
)

and below the wrong result that I get:

image

Thank you in advance for your support