camera_camera 2.0
important
this is a new version of camera_camera package, i fixed in this version most of the camera bugs such as when the camera crash after changing device orientation and the crash when you take a screenshot and i reshaped the code to be more clean and easy to edit, feel free to contribute if you find any bugs write an issue on the git repos
new features
- add feature zoom!
- add feature flashmode
- add feature change camera, and seletec the cameraside your prefer activated!
- callback for return file your photo, onfile(file yourfile)
- removed return using navigator.pop(context,file)
- refactor in internal structure
guide for instalation
android
you need add in app/build.gradle
minsdkversion 21
ios
you need add in info.plist
<key>nscamerausagedescription</key>
<string>can i use the camera please?</string>
<key>nsmicrophoneusagedescription</key>
<string>can i use the mic please?</string>
flutter
add package in pubspec.yaml
camera_camera: current_version
how to use
camera_camera is widget, you can use anywhere
example 01
return scaffold(
body: cameracamera(
onfile: (file) => print(file);
)
);
example 02
return scaffold(
body: cameracamera(
onfile: (file) => print(file);
),
floatingactionbutton: floatingactionbutton(
onpressed: (){
navigator.push(
context,
materialpageroute(
builder: (_) => cameracamera(
onfile: (file) {
photos.add(file);
//when take foto you should close camera
navigator.pop(context);
setstate(() {});
},
)))
},
child: icon(icons.camera_alt),
),
);
roadmap 2.0
feature | progress |
---|---|
zoom | ✅ |
flash | ✅ |
cameraside select | ✅ |
nullsafety support | ✅ |
add exposure controll | |
add easy mode video | |
add gallery |
contributing
pull requests are welcome. for major changes, please open an issue first to discuss what you would like to change.
please make sure to update tests as appropriate.