이미지 피커를 사용한 카메라 기능 구현
SafeArea(
child: Column(
children: [
ElevatedButton.icon(
onPressed: () {
getImage(ImageSource.camera);
},
icon: Icon(Icons.camera_alt_outlined),
label: Text(
'학생증을 찍어주세요',
style: TextStyle(
fontFamily: 'salt',
color: Colors.white,
fontSize: 30),
),
),
Container(
color: Colors.white,
width: 300,
height: 200,
child: Center(
child: _image == null
? Text(
'학생증 사진이 없어요 ㅠㅠ.',
style: TextStyle(
fontFamily: 'salt',
color: Colors.black,
fontSize: 30),
)
: Image.file(File(_image!.path))),
),
추가해야 할 기능