gunschu / jitsi_meet

Initial commit
209 stars 282 forks source link

The setter 'featureFlag' isn't defined for the type 'JitsiMeetingOptions' #243

Closed realjatinpandey closed 3 years ago

realjatinpandey commented 3 years ago

I am using the jitsi meet package for flutter and I have typed the code as per the documentation https://pub.dev/packages/jitsi_meet of the package, but still, there is some error in the app. The error says

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'.

And this is the joinMeeting function

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);
    }
  }

The error is in the line ..featureFlag = featureFlag; which says

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'.

I have typed everything as per the documentation https://pub.dev/packages/jitsi_meet of the package but still the code does not seems to work. Any help on how to fix this error and make the code working would be of great help.

tuantvu commented 3 years ago

What does your pubspec.yaml look like?

realjatinpandey commented 3 years ago

@tuantvu This is a part of the pubspec.yaml

`cupertino_icons: ^0.1.3

  flutter_gradient_colors:
  uuid:
  intl:
  pin_code_fields:
  flutter_custom_clippers:
  image_picker:
  jitsi_meet: ^3.0.0
  google_fonts:
  shared_preferences: ^0.4.3
  share: ^2.0.1
`
tuantvu commented 3 years ago

The ReadME is out of date, please see the example on how feature flags are set now: https://github.com/gunschu/jitsi_meet/blob/master/jitsi_meet/example/lib/main.dart. I'll make this a task to update the doc in next release.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tuantvu commented 3 years ago

Backlog

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.