0

I want display data in gridview column wise from first column bottom to top , second column bottom top top and so on . But not row wise in flutter and also need to calculate the height of the dynamical gridview can any one help me

        Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                width: MediaQuery.of(context).size.width * 0.02,
                child: GridView.builder(
                  shrinkWrap: true,
                  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                      crossAxisCount: 1,
                      childAspectRatio: defaultAspectRatio,
                      crossAxisSpacing: 0.5,
                      mainAxisSpacing: 0.5),
                  itemCount: resultArray.length,
                  itemBuilder: (BuildContext ctx, index) {
                    return ConstrainedBox(
                      constraints:
                          BoxConstraints.tight(const Size(250.0, 150.0)),
                      child: Container(
                        child: InkWell(
                          child: MouseRegion(
                            child: Container(
                              child: Center(
                                child: Text(resultArray[index].toString()),
                              ),
                            ),
                          ),
                        ),
                      ),
                    );
                  },
                ),
              ),

Image

2
  • Add your current result image Commented Oct 20, 2022 at 12:30
  • @RavindraS.Patil please check the image Commented Oct 20, 2022 at 12:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.