beautifyEffectsTypes static method

List<ZegoBeautyPluginEffectsType> beautifyEffectsTypes({
  1. bool enableBasic = true,
  2. bool enableAdvanced = true,
  3. bool enableMakeup = true,
  4. bool enableStyle = true,
})

beautify Effects Types

Implementation

static List<ZegoBeautyPluginEffectsType> beautifyEffectsTypes({
  bool enableBasic = true,
  bool enableAdvanced = true,
  bool enableMakeup = true,
  bool enableStyle = true,
}) {
  var types = <ZegoBeautyPluginEffectsType>[];
  if (enableBasic) {
    types += ZegoBeautyPluginEffectsType.values.sublist(
        ZegoBeautyPluginEffectsType.beautyBasicSmoothing.index,
        ZegoBeautyPluginEffectsType.beautyBasicDarkCircles.index + 1);
  }

  if (enableAdvanced) {
    types += ZegoBeautyPluginEffectsType.values.sublist(
        ZegoBeautyPluginEffectsType.beautyAdvancedFaceSlimming.index,
        ZegoBeautyPluginEffectsType.beautyAdvancedForeheadSlimming.index + 1);
  }

  if (enableMakeup) {
    types += ZegoBeautyPluginEffectsType.values.sublist(
        ZegoBeautyPluginEffectsType.beautyMakeupLipstickCameoPink.index,
        ZegoBeautyPluginEffectsType
                .beautyMakeupColoredContactsChocolateBrown.index +
            1);
  }

  if (enableStyle) {
    types += ZegoBeautyPluginEffectsType.values.sublist(
        ZegoBeautyPluginEffectsType.beautyStyleMakeupInnocentEyes.index,
        ZegoBeautyPluginEffectsType.beautyStyleMakeupFlawless.index + 1);
  }

  return types;
}