Ilya Sulimanov
Ilya Sulimanov

Reputation: 7856

Flutter remove spaces between rows in column

I have a column with 3 rows, How I can remove space between rows?

This is my code:

Widget _buildTable() {
    return Column(
      children: [
      Row(
        children: _getBtns(),
      ),
      Row(
        children: _getBtns(),
      ),
      Row(
        children: _getBtns(),
      ),
    ]);
  }

  List<Widget> _getBtns() {
    final result = <Widget>[];
    for (int i = 0; i < 7; i++) {
      result.add( 
        Expanded(
          child: RaisedButton(color: Colors.green, onPressed: () {}),
        ),
      ); 
    }

    return result;
  }

enter image description here

This is what i would like to get:

enter image description here

Upvotes: 4

Views: 3278

Answers (1)

Andrii Turkovskyi
Andrii Turkovskyi

Reputation: 29468

Set materialTapTargetSize

child: RaisedButton(color: Colors.green, onPressed: () {}, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,),

Upvotes: 5

Related Questions