Skip to content

Commit

Permalink
feat: #57-안드로이드 최대 사진 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ji-hunc committed Apr 28, 2024
1 parent 0fe1e6b commit 7e452f9
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _HelperWriteScreenState extends State<QnaWriteScreen> {
IconButton(
onPressed: () async {
if (_currentPhotos >= _maxPhotos) {
makeToast("$_maxPhotos 사진만 가능합니다");
makeToast("최대 $_maxPhotos개의 사진만 가능합니다");
} else {
if (_maxPhotos - _currentPhotos < 2) {
var image = await picker.pickImage(
Expand All @@ -135,10 +135,16 @@ class _HelperWriteScreenState extends State<QnaWriteScreen> {
multiImages = await picker.pickMultiImage(
limit: _maxPhotos - _currentPhotos,
);
setState(() {
images.addAll(multiImages);
_currentPhotos += multiImages.length;
});
if (_currentPhotos + multiImages.length >
4) {
makeToast(
"최대 $_maxPhotos개의 사진만 가능합니다. 다시 선택해주세요.");
} else {
setState(() {
images.addAll(multiImages);
_currentPhotos += multiImages.length;
});
}
}
}
},
Expand Down

0 comments on commit 7e452f9

Please sign in to comment.