anchor.diff:      });
     }
   
  +  _toggleTorch() async {
  +    final videoTrack = _localStream.getVideoTracks().firstWhere((track) => track.kind == "video");
  +    final has = await videoTrack.hasTorch();
  +    if (has) {
  +      print("[TORCH] Current camera supports torch mode");
  +      setState(() => _isTorchOn = !_isTorchOn);
  +      await videoTrack.setTorch(_isTorchOn);
  +      print("[TORCH] Torch state is now ${_isTorchOn ? "on" : "off"}");
  +    } else {
  +      print("[TORCH] Current camera does not support torch mode");
  +    }
  +  }
  +
  +  _toggleCamera() async {
  +    final videoTrack = _localStream.getVideoTracks().firstWhere((track) => track.kind == "video");
  +    await videoTrack.switchCamera();
  +  }
  +
     _captureFrame() async {
       String filePath;
       if (Platform.isAndroid) {
  
positive.code:   MediaStream _localStream;
    final _localRenderer = new RTCVideoRenderer();
    bool _inCalling = false;
    MediaRecorder _mediaRecorder;
    get _isRec => _mediaRecorder != null;
  
  
negative.code:         title: new Text('GetUserMedia API Test'),
          actions: _inCalling
              ? <Widget>[
                  new IconButton(
                    icon: Icon(_isTorchOn ? Icons.flash_off : Icons.flash_on),
                    onPressed: _toggleTorch,
                  ),
                  new IconButton(
                    icon: Icon(Icons.switch_video),
                    onPressed: _toggleCamera,
                  ),
                  new IconButton(
                    icon: Icon(Icons.camera),
                    onPressed: _captureFrame,
  