Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.1 kB
16
Indexable
Never
Widget buildPhotoGridView111() {
    return StaggeredGrid.count(
      crossAxisCount: 4,
      mainAxisSpacing: 4,
      crossAxisSpacing: 4,
      children: [
        StaggeredGridTile.count(
          crossAxisCellCount: 2,
          mainAxisCellCount: 2,
          child: resultImages.length > 0
              ? Image(
                  image: FileImage(resultImages[0]),
                  width: double.infinity,
                  height: 250,
                  fit: BoxFit.cover,
                )
              : SizedBox(),
        ),
        StaggeredGridTile.count(
          crossAxisCellCount: 2,
          mainAxisCellCount: 1,
          child: resultImages.length > 1
              ? Image(
                  image: FileImage(resultImages[1]),
                  width: 120,
                  height: 120,
                  fit: BoxFit.cover,
                )
              : SizedBox(),
        ),
        StaggeredGridTile.count(
          crossAxisCellCount: 1,
          mainAxisCellCount: 1,
          child: resultImages.length > 2
              ? Image(
                  image: FileImage(resultImages[2]),
                  width: 120,
                  height: 120,
                  fit: BoxFit.cover,
                )
              : SizedBox(),
        ),
        StaggeredGridTile.count(
          crossAxisCellCount: 1,
          mainAxisCellCount: 1,
          child: resultImages.length > 3
              ? Image(
                  image: FileImage(resultImages[3]),
                  width: 120,
                  height: 120,
                  fit: BoxFit.cover,
                )
              : SizedBox(),
        ),
        StaggeredGridTile.count(
          crossAxisCellCount: 4,
          mainAxisCellCount: 2,
          child: resultImages.length > 4
              ? Image(
                  image: FileImage(resultImages[4]),
                  width: double.infinity,
                  height: 250,
                  fit: BoxFit.cover,
                )
              : SizedBox(),
        ),
      ],
    );
  }