Navaron Bracke

replace camera direction with start options

1 import 'package:flutter/widgets.dart'; 1 import 'package:flutter/widgets.dart';
2 -import 'package:mobile_scanner/src/enums/camera_facing.dart';  
3 import 'package:mobile_scanner/src/enums/torch_state.dart'; 2 import 'package:mobile_scanner/src/enums/torch_state.dart';
4 import 'package:mobile_scanner/src/method_channel/mobile_scanner_method_channel.dart'; 3 import 'package:mobile_scanner/src/method_channel/mobile_scanner_method_channel.dart';
5 import 'package:mobile_scanner/src/mobile_scanner_view_attributes.dart'; 4 import 'package:mobile_scanner/src/mobile_scanner_view_attributes.dart';
6 import 'package:mobile_scanner/src/objects/barcode_capture.dart'; 5 import 'package:mobile_scanner/src/objects/barcode_capture.dart';
  6 +import 'package:mobile_scanner/src/objects/start_options.dart';
7 import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 7 import 'package:plugin_platform_interface/plugin_platform_interface.dart';
8 8
9 /// The platform interface for the `mobile_scanner` plugin. 9 /// The platform interface for the `mobile_scanner` plugin.
@@ -81,7 +81,7 @@ abstract class MobileScannerPlatform extends PlatformInterface { @@ -81,7 +81,7 @@ abstract class MobileScannerPlatform extends PlatformInterface {
81 /// Upon calling this method, the necessary camera permission will be requested. 81 /// Upon calling this method, the necessary camera permission will be requested.
82 /// 82 ///
83 /// The given [cameraDirection] is used as the direction for the camera that needs to be set up. 83 /// The given [cameraDirection] is used as the direction for the camera that needs to be set up.
84 - Future<MobileScannerViewAttributes> start(CameraFacing cameraDirection) { 84 + Future<MobileScannerViewAttributes> start(StartOptions startOptions) {
85 throw UnimplementedError('start() has not been implemented.'); 85 throw UnimplementedError('start() has not been implemented.');
86 } 86 }
87 87