This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Commit 22422af
[camera] Flash functionality for Android and iOS (#3314)
* Move camera to camera/camera
* Fix relative path after move
* First suggestion for camera platform interface
* Remove test coverage folder
* Update the version to 1.0.0
* Remove redundant analysis overrides
* Renamed onLatestImageAvailableHandler definition
* Split CameraEvents into separate streams
* Updated platform interface to have recording methods return XFile instances.
* Update documentation and unit tests to match platform interface changes
* Make file input optional for recording methods in platform interface. Update docs.
* Add missing full stop in docs.
* Run dartfmt. Wrapped docs after max 80 cols. Added missing full stop.
* Implemented & tested first parts of method channel implementation
* Remove unused EventChannelMock class
* Add missing unit tests
* Add availableCameras to method channel implementation
* Updated platform interface
* Update packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
* Update packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
* Added placeholders in default method channel implementation
* Add missing implementations to default method channel implementation
* Fix formatting
* Fix PR feedback
* Add unit test for availableCameras
* Expand availableCameras unit test. Added unit test for takePicture.
* Add unit test for startVideoRecording
* Add unit test for prepareForVideoRecording
* Add unit test for stopVideoRecording
* Add unit test for pauseVideoRecording
* Add unit test for buildView
* Remove TODO comment
* Update packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
* Update packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
* Update packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
* WIP: Dart and Android implementation
* Have resolution stream replay last value on subscription. Replace stream_transform with rxdart.
* Added reverse method channel to replace event channel. Updated initialise and takePicture implementations for android. WIP implementation for startVideoRecording
* Fixed example app for Android. Removed isRecordingVideo and isStreamingImages from buildView method.
* iOS implementation: Removed standard event channel. Added reverse method channel. Updated initialize method. Added resolution changed event. Updated error reporting to use new method channel.
* Added some first tests for camera/camera
* Started splitting initialize method
* More tests and some feedback
* Finish splitting up initialize for iOS
* Update unit tests
* Remove unused listener in plugin
* Fix takePicture method on iOS
* Fix video recording on iOS. Updated platform interface.
* Update unit tests
* Update error handling of video methods in iOS code. Make iOS code more consistent.
* Split initialize method on Android
* Updated startVideoRecording documentation
* Make sure file is returned by stopVideoRecording
* Change cast
* Use correct event-type after initializing
* Fix DartMessenger unit-tests
* Fix formatting
* Fixed tests, formatting and analysis warnings
* Added missing documentation public APIs
* Added missing license to Dart files
* Fix formatting issues
* Updated CHANGELOG and version
* Added more tests
* Formatted code
* Added additional unit-tests to platform_interface
* Fix formatting issues
* Re-added the CameraPreview widget
* Refactored CameraException not to use
* Use import/export instead of part implementation
* fixed formatting
* Resolved additional feedback
* Resolved additional feedback
* Flash WIP
* Implement flash modes for Android
* Update dependency to git repo
* Add missing PictureCaptureRequest class
* Add PR feedback
* Move enums out of Camera.java
* Expanded platform interface so support setting flash mode
* Formatted dart code
* Manually serialize flash mode enum rather than relying on stringification.
* Add default to flash mode serialization
* Fix for unit tests and reformatting
* Fixed CHANGELOG and remove redundant iOS files
* Expose FlashMode through camera package
* Add reqeusted unit tests
* Clean up new tests
* Add unit tests for Android implementation
* Update platform interface dependency to point to pub.dev release.
Co-authored-by: Maurits van Beusekom <maurits@baseflow.com>
Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
Co-authored-by: daniel <daniel.roek@gmail.com>1 parent debfbec commit 22422af
17 files changed
Lines changed: 542 additions & 45 deletions
File tree
- packages/camera/camera
- android/src
- main/java/io/flutter/plugins/camera
- types
- test/java/io/flutter/plugins/camera
- types
- example
- android/app/src/main
- lib
- ios/Classes
- lib
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
Lines changed: 151 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 76 | + | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| |||
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
| 96 | + | |
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| |||
220 | 217 | | |
221 | 218 | | |
222 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
228 | | - | |
| 234 | + | |
229 | 235 | | |
230 | 236 | | |
231 | 237 | | |
| 238 | + | |
232 | 239 | | |
233 | 240 | | |
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
237 | | - | |
| 244 | + | |
238 | 245 | | |
239 | | - | |
| 246 | + | |
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
244 | 316 | | |
245 | 317 | | |
246 | 318 | | |
247 | 319 | | |
248 | 320 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
273 | 337 | | |
274 | | - | |
| 338 | + | |
275 | 339 | | |
276 | 340 | | |
277 | 341 | | |
| |||
314 | 378 | | |
315 | 379 | | |
316 | 380 | | |
317 | | - | |
318 | | - | |
| 381 | + | |
319 | 382 | | |
320 | 383 | | |
321 | 384 | | |
| |||
452 | 515 | | |
453 | 516 | | |
454 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
455 | 566 | | |
456 | 567 | | |
457 | 568 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/types/ResolutionPreset.java
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments