GNassro
GNassro

Reputation: 1071

How to delete or change space between columns of flutter_bootstrap

In my flutter project, i created a simple code using flutter_bootstrap, 2 columns inside 1 row, all of them inside BootstrapContainer, i notice that there is a space between the columns, how to delete it or reduce the size of it ?

This is what I got:

enter image description here

And this is the widget that I created:

BootstrapContainer(
          fluid: true,
          padding: EdgeInsets.only(
            top: 10.0
          ),
          children: [
                BootstrapRow(
                  height: 160,
                  children: <BootstrapCol>[
                    BootstrapCol(
                      fit: FlexFit.tight,
                      sizes: 'col-6',
                      child: Container(
                        color: PRIMARY_BACKGROUND_CONTAINER_COLOR,
                          child: Text("some text")
                      ),
                    ),
                    BootstrapCol(
                      sizes: 'col-6',
                      child: Container(
                          color: PRIMARY_BACKGROUND_CONTAINER_COLOR,
                          child: Text("some text")
                      ),
                    ),
                  ],
                ),
              ],
        )

Upvotes: 1

Views: 242

Answers (1)

GNassro
GNassro

Reputation: 1071

the answer is by calling bootstrapGridParameters method

  @override
  Widget build(BuildContext context) {
    bootstrapGridParameters(gutterSize: 0); // this is what i add
    return SingleChildScrollView(
        child: BootstrapContainer(
          fluid: true,
          padding: EdgeInsets.only(
            top: 10.0
          ),
          children: [
                BootstrapRow(
                  height: 160,
                  children: <BootstrapCol>[
                    BootstrapCol(
                      fit: FlexFit.tight,
                      sizes: 'col-6',
                      child: Container(
                        color: PRIMARY_BACKGROUND_CONTAINER_COLOR,
                          child: Text("some text")
                      ),
                    ),
                    BootstrapCol(
                      sizes: 'col-6',
                      child: Container(
                          color: PRIMARY_BACKGROUND_CONTAINER_COLOR,
                          child: Text("some text")
                      ),
                    ),
                  ],
                ),
              ],
        ),
      );
  }

Upvotes: 1

Related Questions