This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +8
-18
lines changed
android/src/main/java/io/flutter/plugins/camera Expand file tree Collapse file tree 5 files changed +8
-18
lines changed Original file line number Diff line number Diff line change 1+ ## 0.3.0+1
2+
3+ * Remove initial method call invocation from static camera method.
4+
15## 0.3.0
6+
27* ** Breaking change** . Migrate from the deprecated original Android Support
38 Library to AndroidX. This shouldn't result in any functional changes, but it
49 requires any Android apps using this plugin to [ also
Original file line number Diff line number Diff line change @@ -148,12 +148,6 @@ public static void registerWith(Registrar registrar) {
148148 @ Override
149149 public void onMethodCall (MethodCall call , final Result result ) {
150150 switch (call .method ) {
151- case "init" :
152- if (camera != null ) {
153- camera .close ();
154- }
155- result .success (null );
156- break ;
157151 case "availableCameras" :
158152 try {
159153 String [] cameraNames = cameraManager .getCameraIdList ();
Original file line number Diff line number Diff line change @@ -633,12 +633,7 @@ - (instancetype)initWithRegistry:(NSObject<FlutterTextureRegistry> *)registry
633633}
634634
635635- (void )handleMethodCall : (FlutterMethodCall *)call result : (FlutterResult)result {
636- if ([@" init" isEqualToString: call.method]) {
637- if (_camera) {
638- [_camera close ];
639- }
640- result (nil );
641- } else if ([@" availableCameras" isEqualToString: call.method]) {
636+ if ([@" availableCameras" isEqualToString: call.method]) {
642637 AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession
643638 discoverySessionWithDeviceTypes: @[ AVCaptureDeviceTypeBuiltInWideAngleCamera ]
644639 mediaType: AVMediaTypeVideo
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ import 'package:flutter/widgets.dart';
1010
1111part 'camera_image.dart' ;
1212
13- final MethodChannel _channel = const MethodChannel ('plugins.flutter.io/camera' )
14- // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
15- // https://github.com/flutter/flutter/issues/26431
16- // ignore: strong_mode_implicit_dynamic_method
17- ..invokeMethod ('init' );
13+ final MethodChannel _channel = const MethodChannel ('plugins.flutter.io/camera' );
1814
1915enum CameraLensDirection { front, back, external }
2016
Original file line number Diff line number Diff line change 11name : camera
22description : A Flutter plugin for getting information about and controlling the
33 camera on Android and iOS. Supports previewing the camera feed and capturing images.
4- version : 0.3.0
4+ version : 0.3.0+1
55authors :
66 - Flutter Team <flutter-dev@googlegroups.com>
77 - Luigi Agosti <luigi@tengio.com>
You can’t perform that action at this time.
0 commit comments