pickCamera method

Future<PickerValue> pickCamera({
  1. String? dialogTitle,
  2. PickerFileType type = PickerFileType.any,
})

Start the camera and pick up the captured media file.

It is possible to specify the title of the file dialog to be picked up with dialogTitle.

You can restrict the type of file by specifying type.

カメラを起動し、撮影したメディアファイルをピックアップします。

dialogTitleでピックアップする際のファイルダイアログのタイトルを指定することが可能です。

typeを指定するとファイルの種類を制限することができます。

Implementation

Future<PickerValue> pickCamera({
  String? dialogTitle,
  PickerFileType type = PickerFileType.any,
}) async {
  try {
    _completer = Completer();
    final res = await adapter.pickCamera(
      dialogTitle: dialogTitle,
      type: type,
    );
    notifyListeners();
    _completer?.complete();
    _completer = null;
    return res;
  } catch (e) {
    _completer?.completeError(e);
    _completer = null;
    rethrow;
  } finally {
    _completer?.complete();
    _completer = null;
  }
}