# switchCamera method Null safety

Future<int?> switchCamera(

1. bool isFrontCamera

)

Switch camera

Note: this API supports only the Android and iOS platforms

Parameters:

isFrontCamera: true: front camera

isFrontCamera: false: rear camera

## Implementation

    Future<int?> switchCamera(bool isFrontCamera) {
      return _channel
          .invokeMethod('switchCamera', {"isFrontCamera": isFrontCamera});
    }