'i want the full sample that can split an image into parts using flutter in fact i can not find a hole sample for spliting image into pars in flutter?

When I click the button, the function split the image into 3*3 parts

Image img =Image(image: AssetImage('assets/crossflutter.png'));

int h=3;
int v=3;

when I call the function that split the image into parts

parts= splitImage( inputImage:img,horizontalPieceCount:h,verticalPieceCount:v);

enter image description here

the problem is

enter image description here

How to split an image into equal-sized parts? Just taking an image from asset and splitting it into equal parts in a grid-like manner, so that each image part can be used as a separate image.

List<Image> splitImage({required Image inputImage, required int horizontalPieceCount, required int verticalPieceCount}) {

How to split an image into equal-sized parts? Just taking an image from asset and splitting it into equal parts in a grid-like manner, so that each image part can be used as a separate image.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source