init static method

Future<MyCameraController> init(
  1. int id,
  2. _MyCameraState myCameraState
)

Implementation

static Future<MyCameraController> init(
  int id,
  _MyCameraState myCameraState,
) async {
  final MethodChannel channel =
      MethodChannel('plugins.flutter.io/my_camera/$id');
  // TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
  await channel.invokeMethod('waitForCamera');
  return MyCameraController._(
    channel,
    myCameraState,
  );
}