-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin: Camera #427
Comments
I'm not sure if it's available in Flutter, but it seems there is an Android-only "mojo:camera" service class here: https://github.com/domokit/mojo/blob/master/examples/dart/camera_video/lib/main.dart |
So there is no iOS version for now? |
Here's a work-in-progress camera plugin: https://github.com/FaisalAbid/flutter-camera-plugin |
I'm going to close this request, because our strategy is to build out a plugin/interop layer, and allow for a camera plugin to be built. Flutter itself is unlikely to ship a direct camera API, but we fully intend to allow for a plugin to expose and control a camera. |
@sethladd Wondering if there is an open issue for "plugin/interop" layer to subscribe to? Or is it just a combination of FlutterView and message-passing mechanism? |
@pulyaevskiy there are a bunch of pieces.
|
Will flutter only be a viewing layer? Will it be possible to access the systems APIs from dart code in the future? Similar to hoy nativescript works? |
Sorry I couldn't get completely. Right now is it possible from flutter ui to access camera ? If yes can you provide link example or docs? |
@franzsilva Flutter's focus is on being a cross-platform way to write UIs. We try to provide a very nice developer experience when doing so. Because we use a portable language (dart), it is of course possible to write your entire application in Dart and only then call-out to system services on the device when necessary (camera, location, etc.) Our current system for supporting these call-outs is documented at https://flutter.io/platform-services/ with an example at https://github.com/flutter/flutter/tree/master/examples/hello_services. We believe that model needs some improvement, most notably in terms of tooling and supporting an ecosystem of pre-built service plugins. Those are both areas we're working on now, as discussed above. @sandeepreddy-vinta it's possible to access any system functionality, including the Camera, using the methods described above. Doing so is not nearly as easy as we'd like, hence the discussion above about improving such. Another Flutter user @FaisalAbid made an example plugin showing how to access the camera: https://github.com/FaisalAbid/flutter-camera-plugin. Although we've made this all possible today, it's not nearly as easy as we'd like. We'll be improving this soon. |
@eseidelGoogle, the link you gave showing an example with camera no longer exists. |
@laike9m, Erick Ghaumez forked the plugin from Faisal Abid: https://github.com/rxlabz/flutter-camera-plugin The Plugin was developed only for Android with the hello_service example. Keep #8971 in mind. Last week, they did some breaking changes in the ios part of flutter apps. If you try to launch an old example, you have to do some migration stuff. |
Update on this: There's a super rough camera plugin in https://github.com/flutter/image_picker. Besides documentation and tests, the main thing that's missing for M2 is that iOS version needs to be able to take photos (right now it only picks from the gallery). Should be fairly straightforward to add. |
Sorry, but I don't know where write.
|
@ayazzali can you file a new bug? https://github.com/flutter/flutter/issues/new or ask on stack overflow? stackoverflow.com/questions/tagged/flutter . Both of those would be fine places to ask where we can be sure to get you a resolution. This bug is closed and about a different issue, so likely not the right way to reach resolution for your issue. |
Flutter now provides https://github.com/flutter/plugins/tree/master/packages/camera (also published on pub as https://pub.dartlang.org/packages/camera). It's done via a plugin, so others could write fancier camera plugins if so desired. |
Cool, thank you very mach |
How can I achieve 4:3 previewSize and pictureSize? |
concerning https://github.com/flutter/plugins/tree/master/packages/camera is it possible to add feature for streaming the camrea to a server ip. |
Is there any API that not only allows access to camera but allows access to ISO, Shutter Speed, etc.. settings? |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
This is a request for an API to access the device's camera.
The text was updated successfully, but these errors were encountered: