darioielardi / flutter_speed_dial

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

Support for SpeedDialChild to have variable width (Using Extended Fabs as child)? #317

Closed alexboulay closed 1 year ago

alexboulay commented 1 year ago

I wonder if this is already supported but I am struggling to get it working as my extended fabs have a variable width

This is what i'm trying to do:

desired-fab

This is the code I have:

SpeedDial(
                    renderOverlay: false,
                    // childrenButtonSize: Size(300, 56),
                    childPadding: EdgeInsets.only(
                      right: 64,
                      top: 5,
                      bottom: 5,
                    ),
                    childMargin: EdgeInsets.only(right: 64),
                    visible: chatController.isFabVisible.value,
                    spacing: 16,
                    child: Ink.image(
                      image: AssetImage("icons/ai-bot.png"),
                    ),
                    children: [
                      SpeedDialChild(
                        elevation: 0,
                        child: Align(
                          alignment: Alignment.centerLeft,
                          child: FloatingActionButton.extended(
                            onPressed: () => print("hey"),
                            label: Text("Decline"),
                            icon: Icon(Icons.cancel_outlined),
                          ),
                        ),
                      ),
                      SpeedDialChild(
                        elevation: 0,
                        child: FloatingActionButton.extended(
                          onPressed: () => print("hey"),
                          label: Text("Auto-reply off"),
                          icon: Icon(Icons.auto_mode_outlined),
                        ),
                      ),
                    ],
                  )
prateekmedia commented 1 year ago

I guess this is not possible right now.

OziTFA commented 11 months ago

@alexboulay do you have any solution for this ?