Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/199.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 二传手';featureFlag';isn';t为类型';JitsiMeetingOptions';_Android_Flutter_Dart_Jitsi - Fatal编程技术网

Android 二传手';featureFlag';isn';t为类型';JitsiMeetingOptions';

Android 二传手';featureFlag';isn';t为类型';JitsiMeetingOptions';,android,flutter,dart,jitsi,Android,Flutter,Dart,Jitsi,我正在为flifter使用jitsi-meet包,我已经根据包的文档键入了代码,但是应用程序中仍然存在一些错误。错误是 The setter 'featureFlag' isn't defined for the type 'JitsiMeetingOptions'. Try importing the library that defines 'featureFlag', correcting the name to the name of an existing setter, or def

我正在为flifter使用jitsi-meet包,我已经根据包的文档键入了代码,但是应用程序中仍然存在一些错误。错误是

The setter 'featureFlag' isn't defined for the type 'JitsiMeetingOptions'.
Try importing the library that defines 'featureFlag', correcting the name to the name of an existing setter, or defining a setter or field named 'featureFlag'.
这就是joinMeeting功能

joinMeeting() async {
    print(code);
    try {
      FeatureFlag featureFlag = FeatureFlag();
      featureFlag.welcomePageEnabled = false;
      featureFlag.resolution = FeatureFlagVideoResolution.MD_RESOLUTION;
      featureFlag.addPeopleEnabled = false;
      featureFlag.calendarEnabled = false;
      featureFlag.callIntegrationEnabled = false;
      featureFlag.inviteEnabled = false;
      featureFlag.kickOutEnabled = false;
      featureFlag.liveStreamingEnabled = false;
      featureFlag.meetingPasswordEnabled = false;
      featureFlag.recordingEnabled = false;
      featureFlag.serverURLChangeEnabled = false;
      featureFlag.tileViewEnabled = false;
      featureFlag.videoShareButtonEnabled = false;

      if (Platform.isIOS) {
        featureFlag.pipEnabled = false;
      }

      var options = JitsiMeetingOptions()
        ..room = code // Required, spaces will be trimmed
        ..userDisplayName = username == null ? 'Unidentified' : username
        ..audioMuted = false
        ..videoMuted = false
        ..featureFlag = featureFlag;

      await JitsiMeet.joinMeeting(options);
    } catch (err) {
      print(err);
    }
  }
错误出现在..featureFlag=featureFlag;上面说

 The setter 'featureFlag' isn't defined for the type 'JitsiMeetingOptions'.
    Try importing the library that defines 'featureFlag', correcting the name to the name of an existing setter, or defining a setter or field named 'featureFlag'.

我已经按照包的文档键入了所有内容,但代码似乎仍然不起作用。关于如何修复此错误并使代码正常工作的任何帮助都将非常有用。

新版本的jitsi meet plugin 3.0.0中更改了featureflag,但更改后的代码没有在发布开发的主页中提到,即。因此,请查看示例页面,其中提到了新更改的语法,即

例如,您的代码应该如下所示,找出需要根据新版本更改的语法:-

_joinMeeting() async {
String serverUrl =
    serverText.text?.trim()?.isEmpty ?? "" ? null : serverText.text;

// Enable or disable any feature flag here
// If feature flag are not provided, default values will be used
// Full list of feature flags (and defaults) available in the README
Map<FeatureFlagEnum, bool> featureFlags = {
  FeatureFlagEnum.WELCOME_PAGE_ENABLED: false,
};
if (!kIsWeb) {
  // Here is an example, disabling features for each platform
  if (Platform.isAndroid) {
    // Disable ConnectionService usage on Android to avoid issues (see README)
    featureFlags[FeatureFlagEnum.CALL_INTEGRATION_ENABLED] = false;
  } else if (Platform.isIOS) {
    // Disable PIP on iOS as it looks weird
    featureFlags[FeatureFlagEnum.PIP_ENABLED] = false;
  }
}
// Define meetings options here
var options = JitsiMeetingOptions()
  ..room = roomText.text
  ..serverURL = serverUrl
  ..subject = subjectText.text
  ..userDisplayName = nameText.text
  ..userEmail = emailText.text
  ..iosAppBarRGBAColor = iosAppBarRGBAColor.text
  ..audioOnly = isAudioOnly
  ..audioMuted = isAudioMuted
  ..videoMuted = isVideoMuted
  ..featureFlags.addAll(featureFlags)
  ..webOptions = {
    "roomName": roomText.text,
    "width": "100%",
    "height": "100%",
    "enableWelcomePage": false,
    "chromeExtensionBanner": null,
    "userInfo": {"displayName": nameText.text}
  };
\u joinMeeting()异步{
字符串服务器URL=
serverText.text?.trim()?.isEmpty???“”?null:serverText.text;
//在此启用或禁用任何功能标志
//如果未提供功能标志,将使用默认值
//自述文件中提供的功能标志(和默认值)的完整列表
地图功能标志={
FeatureFlagnum.WELCOME\u页面\u已启用:false,
};
如果(!kIsWeb){
//下面是一个示例,为每个平台禁用功能
if(Platform.isAndroid){
//在Android上禁用ConnectionService以避免问题(请参阅自述)
featureFlags[FeatureFlagnum.CALL_INTEGRATION_ENABLED]=false;
}else if(Platform.isIOS){
//在iOS上禁用PIP,因为它看起来很奇怪
featureFlags[FeatureFlagnum.PIP_ENABLED]=false;
}
}
//在此处定义会议选项
var options=JitsiMeetingOptions()
..room=roomText.text
..服务器URL=服务器URL
…主题=主题文本。文本
..userDisplayName=nameText.text
..userEmail=emailText.text
..IOSAPPBARGBACOLOR=IOSAPPBARGBACOLOR.text
…仅限音频=仅限音频
..audioMuted=isAudioMuted
..videoMuted=isVideoMuted
..featureFlags.addAll(featureFlags)
…网络选项={
“roomName”:roomText.text,
“宽度”:“100%”,
“高度”:“100%”,
“enableWelcomePage”:false,
“chromeExtensionBanner”:空,
“userInfo”:{“displayName”:nameText.text}
};

如果这对您有帮助,请将答案标记为正确并投票。新版本发布后,我正在修改语法bcz,我在代码中的许多地方都使用了它们。