ionicfirebaseapp / getwidget

Most popular and easy to use open source UI library with 1000+ Widgets to build flutter app.
https://www.getwidget.dev
MIT License
4.56k stars 606 forks source link

can't change GFButton width, #287

Closed xyhuangjia closed 2 years ago

xyhuangjia commented 2 years ago

my code is this

 GFButton(
        onPressed: widget.onPressed,
        text: widget.title,
        padding: EdgeInsets.all(0),
        materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
        shape: GFButtonShape.pills,
        type: GFButtonType.outline,
        size: GFSize.MEDIUM,
      );

button is too long to me, I can't find way to change it

thecodexhub commented 2 years ago

Hi. You can try wrapping your GFButton widget with the SizedBox widget and give appropriate width. It works fine.

For example,

SizedBox(
  height: 20.0, 
  width: 60.0,  // Change the values according to your needs
  child: GFButton(
    // GFButton properties
  ),
);

And the result 👇

GFButton issue - #287