Created
September 11, 2022 06:18
-
-
Save nbnD/ace6ca409a1041881f1a7548af641ac9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GridView.builder( | |
itemCount: fileList.length, | |
gridDelegate: | |
const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3), | |
itemBuilder: (BuildContext context, int i) { | |
return Container( | |
padding: const EdgeInsets.all(10), | |
child: Stack( | |
children: <Widget>[ | |
SizedBox( | |
height: 100, | |
width: 100, | |
child: Image.file(File(fileList[i]!.path),fit: BoxFit.cover,), | |
), | |
Positioned( | |
right: 1, | |
child: GestureDetector( | |
onTap: () { | |
setState(() { | |
dltImages(fileList[i]); | |
}); | |
}, | |
child: const Icon(Icons.cancel, color: Colors.red), | |
)) | |
], | |
), | |
); | |
}, | |
), | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment